Only partially loop in TChain with pyROOT

Hi all,

I have got a wield result when I loop in TChain with pyROOT: only a few events are actually looped even the total number of events is more than a hundred! The related codes are as following

ch = root.TChain("events")                                                                                                          
for entry in ch:                                                                                               

More information:

  1. The ch.GetEntries() give correct number of events
  2. If I use “hadd” to merge all root files into one before add to the chain, the result will be correct
  3. Using C++ code of TChain with the same method and same root files will provide correct results

Any idea of what happens?

Best regards,

ROOT Version: 5.34
Platform: CentOS Linux 7
Compiler: linuxx8664gcc


I see that you are using ROOT 5, which is unfortunately no longer supported. Please update to a newer version of ROOT where this issue should be fixed.

Copy. Thanks!

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