Skip to content

Commit 5ede3eb

Browse files
committed
Add hard-coded Run4 HLT flavours.
1 parent 6c73647 commit 5ede3eb

File tree

2 files changed

+20
-42
lines changed

2 files changed

+20
-42
lines changed

Configuration/HLT/python/autoHLT.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
# cmsDriver.py hlt -s HLT:@relval
33

44
autoHLT = {
5-
'fake' : 'Fake',
6-
'fake1' : 'Fake1',
7-
'fake2' : 'Fake2',
8-
'relval50ns' : 'Fake',
9-
'relval25ns' : 'Fake1',
10-
'relval2016' : 'Fake2',
11-
'relval2017' : 'Fake2',
12-
'relval2018' : 'Fake2',
13-
'relval2022' : 'Fake2',
14-
'relval2023' : 'Fake2',
15-
'relval2024' : 'Fake2',
16-
'relval2025' : '2025v12',
17-
'relvalRun4' : '75e33',
18-
'test' : 'GRun',
5+
'fake' : 'Fake',
6+
'fake1' : 'Fake1',
7+
'fake2' : 'Fake2',
8+
'relval50ns' : 'Fake',
9+
'relval25ns' : 'Fake1',
10+
'relval2016' : 'Fake2',
11+
'relval2017' : 'Fake2',
12+
'relval2018' : 'Fake2',
13+
'relval2022' : 'Fake2',
14+
'relval2023' : 'Fake2',
15+
'relval2024' : 'Fake2',
16+
'relval2025' : '2025v12',
17+
'relvalRun4' : '75e33',
18+
'relvalRun4_timing' : '75e33_timing',
19+
'relvalRun4_scouting' : 'NGTScouting',
20+
'test' : 'GRun',
1921
}

HLTrigger/Configuration/scripts/hltPhase2UpgradeIntegrationTests

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,6 @@ _PH2_GEOMETRY = f"Extended{_settings.DEFAULT_VERSION}"
1818
# Get the actual era name from the version key
1919
_PH2_ERA_NAME = _settings.properties['Run4'][_settings.DEFAULT_VERSION]['Era']
2020

21-
# Function to display help information
22-
def print_help():
23-
help_text = """
24-
This script runs HLT test configurations for the CMS Phase2 upgrade.
25-
26-
Arguments:
27-
--menu : HLT menu to run
28-
--globaltag : GlobalTag for the CMS conditions (required)
29-
--geometry : Geometry setting for the CMS process (required)
30-
--events : Number of events to process (default: 1)
31-
--threads : Number of threads to use (default: 1)
32-
--parallelJobs : Number of parallel cmsRun and hltDiff executions (default: 4)
33-
--restrictPathsTo : Restrict paths to be run to a user defined subset (e.g. "HLT_Ele*")
34-
--procModifiers : Optionally use one (or more) cmssw processModifier
35-
--cachedInput : Optionally use an existing RAW data file (do not regenerate it from scratch)
36-
--dryRun : Optionally do not run any of the configuration created
37-
38-
Example usage:
39-
hltPhase2UpgradeIntegrationTests --globaltag auto:phase2_realistic_T33 --geometry Extended2026D110 --events 10 --threads 4
40-
"""
41-
print(help_text)
42-
4321
# Function to run a shell command and handle errors
4422
def run_command(command, log_file=None, workdir=None):
4523
try:
@@ -75,8 +53,10 @@ def compare_single_file(root_file, base_root_file, num_events, output_dir):
7553
return None # Return None if no issues are found
7654

7755
# Argument Parser for command-line configuration
56+
from Configuration.HLT.autoHLT import autoHLT
7857
parser = argparse.ArgumentParser(description="Run HLT Test Configurations")
79-
parser.add_argument("--menu", default="75e33_timing", help="HLT menu to test")
58+
parser.add_argument("--menu", default="75e33_timing",
59+
choices=[v for k, v in autoHLT.items() if "Run4" in k], help="HLT menu to test")
8060
parser.add_argument("--globaltag", default=_PH2_GLOBAL_TAG, help="GlobalTag for the CMS conditions")
8161
parser.add_argument("--geometry", default=_PH2_GEOMETRY, help="Geometry setting for the CMS process") # Auto-generated geometry default
8262
parser.add_argument("--era", default=_PH2_ERA_NAME, help="Era setting for the CMS process") # Convert _PH2_ERA to string
@@ -96,11 +76,7 @@ print(f"Script started at {start_timestamp}")
9676
print("------------------------------------------------------------")
9777

9878
# Parse arguments
99-
try:
100-
args = parser.parse_args()
101-
except SystemExit:
102-
print_help()
103-
sys.exit(0)
79+
args = parser.parse_args()
10480

10581
menu = args.menu
10682
global_tag = args.globaltag

0 commit comments

Comments
 (0)