AttributeError for eventsProcessed in latest key4hep stack (-r 2026-02-01)

Hello,
I ran into an error : AttributeError: 'TNetXNGFile' object has no attribute 'eventsProcessed' when using the latest key4hep stack (source /cvmfs/sw.hsf.org/key4hep/setup.sh -r 2026-02-01)

Interestingly, this same pipeline works perfectly for older stack (source /cvmfs/sw.hsf.org/key4hep/setup.sh -r 2025-05-29).

I believe this is happening because the 2025-05-29 release uses ROOT 6.32, while the 2026-02-01 release was updated to ROOT 6.38. It looks like PyROOT’s lookup in run_analysis.py (infile.eventsProcessed.GetVal()) is causing this error with the newer ROOT version.

To get around it, I changed that line to: infile.Get("eventsProcessed").GetVal()

After recompiling FCCAnalyses, this seems to solve the issue. Maybe we need to address this upstream, or please correct me if I am missing something.

Cheers,
Shreyas

Hi @sbakare,

nice catch, can you create a PR with this fix?

Best,
Juraj

Hello @jsmiesko ,

I have updated the eventsProcessed extraction logic to handle the new stack and added a fallback warning for missing metadata. I have submitted a Pull Request with the fix here:

Best,
Shreyas

1 Like