diff --git a/TopTagger/python/TopTagger.py b/TopTagger/python/TopTagger.py index 6fc831ed..839db5a1 100644 --- a/TopTagger/python/TopTagger.py +++ b/TopTagger/python/TopTagger.py @@ -273,7 +273,11 @@ def getTopsFromExampleFile(tt, event): event.GetEntry(iEvt) - print "Event #:", event.event + try: + evtNum = getattr(event, options.evtBranch) + print "Event #:", evtNum + except AttributeError: + print "Event #:", iEvt if options.example: tops = getTopsFromExampleFile(tt, event)