@@ -158,7 +158,7 @@ subprocess.run(base_cmsdriver_command, shell=True, cwd=output_dir)
158158# Step 2: Use edmConfigDump to dump the full configuration
159159print (f"Dumping the full configuration using edmConfigDump to { dumped_config_file } " )
160160with open (dumped_config_file , "w" ) as dump_file , open (log_file , "w" ) as log :
161- subprocess .run (f"edmConfigDump { base_config_file } " , shell = True , stdout = dump_file , stderr = log )
161+ subprocess .run (f"edmConfigDump --prune { base_config_file } " , shell = True , stdout = dump_file , stderr = log )
162162
163163# Step 3: Extract the list of HLT paths from the dumped configuration
164164print (f"Extracting HLT paths from { dumped_config_file } ..." )
@@ -168,7 +168,7 @@ with open(dumped_config_file, "r") as f:
168168 config_content = f .read ()
169169
170170# Use regex to find all HLT and L1T paths defined in process.schedule
171- unsorted_hlt_paths = re .findall (r"process\.(HLT_[A-Za-z0-9_]+|L1T_[A-Za-z0-9_]+|DST_[A-Za-z0-9_]+)" , config_content )
171+ unsorted_hlt_paths = re .findall (r"process\.(HLT_[A-Za-z0-9_]+|L1T_[A-Za-z0-9_]+|DST_[A-Za-z0-9_]+|MC_[A-Za-z0-9_]+ )" , config_content )
172172
173173# Remove duplicates and sort alphabetically
174174hlt_paths = sorted (set (unsorted_hlt_paths ))
@@ -228,7 +228,7 @@ for path_name in hlt_paths:
228228 def replace_hlt_paths (match ):
229229 all_paths = match .group (2 ).split (", " )
230230 # Keep non-HLT/L1T paths and include only the current HLT or L1T path
231- filtered_paths = [path for path in all_paths if not re .match (r"process\.(HLT_|L1T_)" , path ) or f"process.{ path_name } " in path ]
231+ filtered_paths = [path for path in all_paths if not re .match (r"process\.(HLT_|L1T_|DST_|MC_ )" , path ) or f"process.{ path_name } " in path ]
232232 return match .group (1 ) + ", " .join (filtered_paths ) + match .group (3 )
233233
234234 # Apply the regex to remove all HLT and L1T paths except the current one
@@ -332,7 +332,10 @@ print("All cmsRun jobs submitted.")
332332# Step 9: Compare all HLT root files using hltDiff
333333def compare_hlt_results (input_dir , num_events , max_workers = 4 ):
334334 # List all root files starting with "HLT_" or "L1T_" in the output directory
335- root_files = [f for f in os .listdir (input_dir ) if f .endswith (".root" ) and (f .startswith ("HLT_" ) or f .startswith ("L1T_" ))]
335+ root_files = [f for f in os .listdir (input_dir ) if f .endswith (".root" ) and (f .startswith ("HLT_" ) \
336+ or f .startswith ("L1T_" ) \
337+ or f .startswith ("DST_" ) \
338+ or f .startswith ("MC_" ))]
336339
337340 # Base file (hltrun output) to compare against
338341 base_root_file = os .path .join (input_dir , "hlt.root" )
0 commit comments