Skip to content

Commit

Permalink
Merge branch 'HEP-FCC:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bistapf authored Sep 16, 2024
2 parents a411f19 + e032e91 commit 5168305
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ def get_entries(inpath: str) -> int:
'''
nevents = None
with ROOT.TFile(inpath, 'READ') as infile:
tt = infile.Get("events")
nevents = tt.GetEntries()
try:
nevents = infile.Get("events").GetEntries()
except AttributeError:
LOGGER.error('Input file is missing "events" TTree!\nAborting...')
sys.exit(3)
return nevents


Expand Down

0 comments on commit 5168305

Please sign in to comment.