@@ -18,27 +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- --globaltag : GlobalTag for the CMS conditions (required)
28- --geometry : Geometry setting for the CMS process (required)
29- --events : Number of events to process (default: 1)
30- --threads : Number of threads to use (default: 1)
31- --parallelJobs : Number of parallel cmsRun and hltDiff executions (default: 4)
32- --restrictPathsTo : Restrict paths to be run to a user defined subset (e.g. "HLT_Ele*")
33- --procModifiers : Optionally use one (or more) cmssw processModifier
34- --cachedInput : Optionally use an existing RAW data file (do not regenerate it from scratch)
35- --dryRun : Optionally do not run any of the configuration created
36-
37- Example usage:
38- hltPhase2UpgradeIntegrationTests --globaltag auto:phase2_realistic_T33 --geometry Extended2026D110 --events 10 --threads 4
39- """
40- print (help_text )
41-
4221# Function to run a shell command and handle errors
4322def run_command (command , log_file = None , workdir = None ):
4423 try :
@@ -74,7 +53,10 @@ def compare_single_file(root_file, base_root_file, num_events, output_dir):
7453 return None # Return None if no issues are found
7554
7655# Argument Parser for command-line configuration
56+ from Configuration .HLT .autoHLT import autoHLT
7757parser = argparse .ArgumentParser (description = "Run HLT Test Configurations" )
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" )
7860parser .add_argument ("--globaltag" , default = _PH2_GLOBAL_TAG , help = "GlobalTag for the CMS conditions" )
7961parser .add_argument ("--geometry" , default = _PH2_GEOMETRY , help = "Geometry setting for the CMS process" ) # Auto-generated geometry default
8062parser .add_argument ("--era" , default = _PH2_ERA_NAME , help = "Era setting for the CMS process" ) # Convert _PH2_ERA to string
@@ -94,12 +76,9 @@ print(f"Script started at {start_timestamp}")
9476print ("------------------------------------------------------------" )
9577
9678# Parse arguments
97- try :
98- args = parser .parse_args ()
99- except SystemExit :
100- print_help ()
101- sys .exit (0 )
79+ args = parser .parse_args ()
10280
81+ menu = args .menu
10382global_tag = args .globaltag
10483era = args .era
10584geometry = args .geometry
@@ -112,6 +91,7 @@ proc_modifiers = args.procModifiers # Store the procModifiers option
11291# Print the values in a nice formatted manner
11392print (f"{ 'Configuration Summary' :^40} " )
11493print ("=" * 40 )
94+ print (f"HLT Menu: { menu } " )
11595print (f"Global Tag: { global_tag } " )
11696print (f"Geometry: { geometry } " )
11797print (f"Era: { era } " )
@@ -143,7 +123,7 @@ os.makedirs(output_dir)
143123# If cachedInput is provided, use it as the input for the base cmsDriver command
144124if args .cachedInput :
145125 base_cmsdriver_command = (
146- f"cmsDriver.py Phase2 -s L1P2GT,HLT:75e33_timing "
126+ f"cmsDriver.py Phase2 -s L1P2GT,HLT:{ menu } "
147127 f"--conditions { global_tag } -n { num_events } --eventcontent FEVTDEBUGHLT "
148128 f"--geometry { geometry } --era { era } --filein { args .cachedInput } --fileout { output_dir } /hlt.root --no_exec "
149129 f"--mc --nThreads { num_threads } "
@@ -154,7 +134,7 @@ if args.cachedInput:
154134 )
155135else :
156136 base_cmsdriver_command = (
157- f"cmsDriver.py Phase2 -s L1P2GT,HLT:75e33_timing "
137+ f"cmsDriver.py Phase2 -s L1P2GT,HLT:{ menu } "
158138 f"--conditions { global_tag } -n { num_events } --eventcontent FEVTDEBUGHLT "
159139 f"--geometry { geometry } --era { era } --filein file:{ output_dir } /step1.root --fileout { output_dir } /hlt.root --no_exec "
160140 f"--nThreads { num_threads } "
0 commit comments