@@ -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
4422def 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
7857parser = 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" )
8060parser .add_argument ("--globaltag" , default = _PH2_GLOBAL_TAG , help = "GlobalTag for the CMS conditions" )
8161parser .add_argument ("--geometry" , default = _PH2_GEOMETRY , help = "Geometry setting for the CMS process" ) # Auto-generated geometry default
8262parser .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}")
9676print ("------------------------------------------------------------" )
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
10581menu = args .menu
10682global_tag = args .globaltag
0 commit comments