From a811e85c2321e19316185e9755693d7f7b0f6957 Mon Sep 17 00:00:00 2001 From: Titus Mombaecher Date: Thu, 7 Aug 2025 16:28:00 +0200 Subject: [PATCH 1/4] require --measure-throughput to be >=0, was causing confusion --- MooreScripts/scripts/testbench.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/MooreScripts/scripts/testbench.py b/MooreScripts/scripts/testbench.py index 134057006..d3c9f6fc6 100755 --- a/MooreScripts/scripts/testbench.py +++ b/MooreScripts/scripts/testbench.py @@ -32,6 +32,13 @@ def scenario(s): return importlib.import_module("." + s, scenarios.__package__) +def non_negative_float(value): + ivalue = float(value) + if ivalue < 0: + raise argparse.ArgumentTypeError(f"Invalid value: {ivalue}. Must be >= 0.") + return ivalue + + parser = argparse.ArgumentParser(allow_abbrev=False) parser.add_argument( "architecture", @@ -107,8 +114,8 @@ parser.add_argument( parser.add_argument( "--measure-throughput", default=10, - type=float, - help="How long to measure throughput for.", + type=non_negative_float, + help="How long to measure throughput for. Has to be >=0. If specifying 0 will run over all files in the directory.", ) parser.add_argument( "--delay-tp-measurement", -- GitLab From bcf5c1e2115f5d774256b50dddd93452554c69f3 Mon Sep 17 00:00:00 2001 From: Titus Mombaecher Date: Thu, 7 Aug 2025 16:29:58 +0200 Subject: [PATCH 2/4] fix MBM buffer issue and allow CalibMon Savesets writing in testbench --- MooreOnlineConf/options/calib.py | 2 ++ MooreOnlineConf/options/online.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MooreOnlineConf/options/calib.py b/MooreOnlineConf/options/calib.py index f9855c0c6..cc2a23200 100644 --- a/MooreOnlineConf/options/calib.py +++ b/MooreOnlineConf/options/calib.py @@ -35,5 +35,7 @@ public_tools = [ stateProvider_with_simplified_geom() ] +options.output_type = 'None' + with config_pp_2025(), reconstruction.bind(from_file=False): run_moore(options, make_lines, public_tools) diff --git a/MooreOnlineConf/options/online.py b/MooreOnlineConf/options/online.py index ba74e0005..ceb8266f5 100644 --- a/MooreOnlineConf/options/online.py +++ b/MooreOnlineConf/options/online.py @@ -32,7 +32,7 @@ application.setup_fifolog() application.setup_mbm_access('Events', True) for name, configurable in allConfigurables.items(): - if isinstance(configurable, OutputAlg): + if isinstance(configurable, OutputAlg) and task_type != "CalibMon": writer = application.setup_mbm_output( 'Output', name=configurable.name()) writer.MBM_maxConsumerWait = 10 @@ -61,7 +61,8 @@ application.monSvc.disableDeclareInfoHistos = True if task_type == "RecoMon": # intermediate saveset period in seconds, for RecoMon a bit more often than for the others application.updateAndReset.saverCycle = 300 -elif task_type == "CalibMon": +elif task_type == "CalibMon" and not is_testbench: + ## note that contrary to the testbench Online CalibMon only produces histograms at the end of the run application.monSvc.HistUpdateOnStop = True application.updateAndReset.saveHistograms = 0 elif task_type != "HLT2": -- GitLab From 3add937b82d0a6f4fcbce2e66b12af35a327beac Mon Sep 17 00:00:00 2001 From: Gitlab CI Date: Thu, 7 Aug 2025 14:36:32 +0000 Subject: [PATCH 3/4] Fixed formatting patch generated by https://gitlab.cern.ch/lhcb/MooreOnline/-/jobs/59923933 --- MooreScripts/scripts/testbench.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MooreScripts/scripts/testbench.py b/MooreScripts/scripts/testbench.py index d3c9f6fc6..adf99f382 100755 --- a/MooreScripts/scripts/testbench.py +++ b/MooreScripts/scripts/testbench.py @@ -35,7 +35,8 @@ def scenario(s): def non_negative_float(value): ivalue = float(value) if ivalue < 0: - raise argparse.ArgumentTypeError(f"Invalid value: {ivalue}. Must be >= 0.") + raise argparse.ArgumentTypeError( + f"Invalid value: {ivalue}. Must be >= 0.") return ivalue @@ -115,7 +116,8 @@ parser.add_argument( "--measure-throughput", default=10, type=non_negative_float, - help="How long to measure throughput for. Has to be >=0. If specifying 0 will run over all files in the directory.", + help= + "How long to measure throughput for. Has to be >=0. If specifying 0 will run over all files in the directory.", ) parser.add_argument( "--delay-tp-measurement", -- GitLab From e2409315a74b05c375f484ee3f44bfdd046c9b2b Mon Sep 17 00:00:00 2001 From: Titus Mombaecher Date: Thu, 7 Aug 2025 16:04:41 +0000 Subject: [PATCH 4/4] unintentionally committed, reverting this part --- MooreOnlineConf/options/online.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MooreOnlineConf/options/online.py b/MooreOnlineConf/options/online.py index ceb8266f5..58c3f8d97 100644 --- a/MooreOnlineConf/options/online.py +++ b/MooreOnlineConf/options/online.py @@ -32,7 +32,7 @@ application.setup_fifolog() application.setup_mbm_access('Events', True) for name, configurable in allConfigurables.items(): - if isinstance(configurable, OutputAlg) and task_type != "CalibMon": + if isinstance(configurable, OutputAlg): writer = application.setup_mbm_output( 'Output', name=configurable.name()) writer.MBM_maxConsumerWait = 10 -- GitLab