Segfault after ERROR leaf:

I have a set of ROOT files produced using ROOT 5.34 that I’m reading with 6.22 to slim down. These files appear to be incompatible with TTreeReader so I can’t use RDataFrame as I usually would (which is part of the reason they’re being slimmed and rewritten).

Some of these files appear to be corrupt, and generate the error:

ERROR leaf:px, len=1050318452 and max=225
ERROR leaf:py, len=1050318452 and max=225
ERROR leaf:pz, len=1050318452 and max=225

Once this happens, the code then segfaults. Is there some way to detect when this has happened and skip that event (or file) in the TChain? I’ve tried checking if the return value of TChain::GetEntry is either <= 0 or very large, but the code segfaults without printing output indicating that this condition has been triggered.

I think @pcanal can help

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