TChain slow down more than one file

I am attempting to run a selector on a large number of files combined using TChain. Each file has several million events but only a few thousand will be retained. I make the chain using the code below, with the selector process command also included. I have a print statement so I can follow the processing of the files, and I notice that the first root file processes in a snap, very quickly. As ROOT begins to process the second file the slowdown makes it unusable, even waiting over night. Whereas a single file is processed using the same selector macro in two minutes or less. (I also played around with adding the PROOF commands and it seemed to speed but didn’t work for other reasons). Is there another way to open the files or clear the buffer that I should know about?

[code]void makechain(){
//void makechain(void){
TChain chain(“tree”);

chain.Add(“3395_60606.root”);
chain.Add(“3396_60606.root”);
chain.Add(“3401_60606.root”);

chain.Process(“E_total_hist.C”);
}
[/code]
void makechain(){
//void makechain(void){
TChain chain(“tree”);

chain.Add(“3395_60606.root”);
chain.Add(“3396_60606.root”);
chain.Add(“3401_60606.root”);

chain.Process(“E_total_hist.C”);
}

Here are links to the root files:

dropbox.com/s/s6ob9ujht2lu4 … .root?dl=0
dropbox.com/s/k0jugj4e85oio … .root?dl=0
dropbox.com/s/4rvaqpsucnka4 … .root?dl=0
E_total_hist.h (3.1 KB)
E_total_hist.C (12.3 KB)

Hi,

The files are not there anymore…

Cheers, Bertrand.

Also, which version of ROOT did you try this? Can you re-try with v6-08-00?

Thanks,
Philippe.

[SOLVED]

I needed to use SetLocalEntry instead of SetEntry. That fixed it.