Hi, rooters,
in a little C+±program, I use some smaller chains to sort some files, and one big chain to use all data. To get the big chain, I simply add the smaller chains:
—snip—
TChain strahlon=new TChain(“T”);
TChain strahloff=new TChain(“T”);
/// —4 more chains–
// …
strahlon->Add("strahl/strahlon.root",0);
strahloff->Add("strahl/strahloff.root",0);
// ----filling the other chains–
// …
Int_t allnum=0;
TChain *all=new TChain(“T”);
allnum+=all->Add(strahlon);
allnum+=all->Add(strahloff);
// …
cerr<<"Files total:"<<allnum<<endl; // !!! This Number is right !!
cerr<<"Events total:"<<all>GetEntries()<<endl; // !!! Completly wrong !!
—snip—
If I use the same code on the same files in a root-script, I get the right number of Events. The number of entries is equal to kBigNumber times the number of files in all, so the compiled program seems to ignore the option of TChain::Add(char *filename). As I use wildcards, I don’t want to use the TChain::AddFile() method. Any other hints what I’m doing wrong?
I’m using root 4.00/08