Dear ROOTers,
I have a chain of ROOT trees:
TChain* CollectionTree = new TChain("CollectionTree"); CollectionTree->Add("many files *.root");
for which I create an entrylist
CollectionTree->Draw(">>seltrackevents",cut,"entrylist"); TEntryList *seltrackevents = (TEntryList*)gDirectory->Get ("seltrackevents");
Then I try to look through my entrylist in the following way:
Int_t jj = -1;
seltrackevents->GetEntry(0);
do {
jj = seltrackevents->Next(); cout << "jj = " << jj << endl; CollectionTree->GetEntry(jj); //
} while(jj != -1);
This works correctly only for the 1st file of the chain, since jj is always the event number within the given file 'local event number' as opposed 'global event number' for the whole chain. Please let me know what I should use instead/on top of jj = seltrackevents->Next(); to make sure that I get the event from the correct chain file.
Thanks for any help,
Hovhannes
Received on Tue Jun 22 2010 - 20:39:41 CEST
This archive was generated by hypermail 2.2.0 : Wed Jun 23 2010 - 11:50:01 CEST