Is there a limit on the number of entries that TTreeReader can read?

Hello experts,

I am having problem reading a tree with 10M entries with TTreeReader. I didn’t get any error or warning and my code could finish running without crashing.The only problem is that only 70% of the entries (events) got processed. Therefore I am wondering if there is a limit on the number of entries that TTreeReader can read.

Here is what I did:

int NeventsToAnalyze=reader.GetEntries();
int count=0;  
while(reader.Next()){
        /*Fill histograms*/
        count+=1;
        if (count%(int)(NeventsToAnalyze/10)==0) std::cout << "Processed " << count << " events - " << 100.0*(double)count/(double)NeventsToAnalyze << "% \n";
}
cout<<"Finished processing all the events"<<endl;

The print out stopped at 70% of the events were processed and then showed “Finished processing all the events”

Thanks,
Xiaoyu

ROOT Version: 6.24/06
Platform: Not Provided
Compiler: Not Provided


Instead of “int”, try with “Long64_t”.

Thanks for your reply! I still got the same result: only 70% of the events were processed.

What do you get if you only do this inside the loop (remove the other lines inside the loop)?

while(reader.Next()){
  count+=1;
}
cout<<"count = "<< count << endl;

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.