From 3dcd9dd7bf70b5a04e8dbe6411d6edd29cc8a722 Mon Sep 17 00:00:00 2001 From: Shreyas Bakare Date: Wed, 18 Mar 2026 12:41:11 +0100 Subject: [PATCH 1/2] Fix eventsProcessed XRootD lookup and add fallback warning - Replaced PyROOT dynamic lookup with explicit .Get() to fix AttributeError on ROOT 6.38. - Removed GetListOfKeys() loop by fetching the parameter directly. - Added LOGGER.warning to alert users if cross-section scaling falls back to the current tree's entry count. --- python/run_analysis.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/python/run_analysis.py b/python/run_analysis.py index b7c88f2fb67..19abd292f30 100644 --- a/python/run_analysis.py +++ b/python/run_analysis.py @@ -531,10 +531,15 @@ def run_histmaker(args, rdf_module, anapath): # Skip check for processed events in case of first stage if get_element(rdf_module, "prodTag") is None: infile = ROOT.TFile.Open(str(file_name), 'READ') - for key in infile.GetListOfKeys(): - if 'eventsProcessed' == key.GetName(): - nevents_meta += infile.eventsProcessed.GetVal() - break + + # Fetch parameter directly to bypass PyROOT dynamic lookup + events_param = infile.Get("eventsProcessed") + + if events_param: + nevents_meta += events_param.GetVal() + else: + LOGGER.warning('Missing "eventsProcessed" in %s! Cross-section scaling may fall back to filtered event count.', file_name) + infile.Close() if args.test: break From 4efd3efe50b293df5b0bd63ec395e2a7ccd3f8b3 Mon Sep 17 00:00:00 2001 From: Shreyas Bakare <56884503+ShreyasBakare@users.noreply.github.com> Date: Tue, 21 Jul 2026 16:13:12 +0200 Subject: [PATCH 2/2] Update log level for missing eventsProcessed Change log level from warning to debug for missing eventsProcessed. --- python/run_analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/run_analysis.py b/python/run_analysis.py index 767e123b9e2..eb162c2c127 100644 --- a/python/run_analysis.py +++ b/python/run_analysis.py @@ -541,7 +541,7 @@ def run_histmaker(args, rdf_module, anapath): if events_param: nevents_meta += events_param.GetVal() else: - LOGGER.warning('Missing "eventsProcessed" in %s! Cross-section scaling may fall back to filtered event count.', file_name) + LOGGER.debug('Missing "eventsProcessed" in %s! Cross-section scaling may fall back to filtered event count.', file_name) infile.Close() if args.test: