Skip to content

Commit

Permalink
Merge pull request #40094 from missirol/devel_hltToolsUpdate_125X
Browse files Browse the repository at this point in the history
various improvements to HLT-development tools [`12_5_X`]
  • Loading branch information
cmsbuild authored Nov 21, 2022
2 parents e660fdf + 46a9f81 commit cef6dba
Show file tree
Hide file tree
Showing 13 changed files with 849 additions and 635 deletions.
13 changes: 8 additions & 5 deletions HLTrigger/Configuration/scripts/hltCheckPrescaleModules
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#! /usr/bin/env python3

from __future__ import print_function
#!/usr/bin/env python3
import sys
import types
import re
Expand All @@ -17,7 +15,12 @@ if len(sys.argv) != 2:
sys.exit(1)

# whitelist paths exempt from validation
whitelist = ('HLTriggerFirstPath', 'HLTriggerFinalPath')
whitelist = [
'HLTriggerFirstPath',
'HLTriggerFinalPath',
'Status_OnCPU',
'Status_OnGPU',
]

# load the menu and get the "process" object
menu = types.ModuleType('menu')
Expand All @@ -28,7 +31,7 @@ process = menu.process
# get all paths
paths = process.paths_()

# keep track of precaler names, and of duplicates
# keep track of prescaler names, and of duplicates
prescalerNames = set()
duplicateNames = set()

Expand Down
24 changes: 17 additions & 7 deletions HLTrigger/Configuration/scripts/hltGetConfiguration
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python3

from __future__ import print_function
import sys, os
import sys
import os
import argparse
from HLTrigger.Configuration.extend_argparse import *

import HLTrigger.Configuration.Tools.confdb as confdb
from HLTrigger.Configuration.extend_argparse import *
import HLTrigger.Configuration.Tools.confdb as confdb
import HLTrigger.Configuration.Tools.options as options

# define an argparse parser to parse our options
Expand Down Expand Up @@ -243,8 +242,19 @@ parser.add_argument('--help',
# parse command line arguments and options
config = parser.parse_args(namespace = options.HLTProcessOptions())

cmdArgs = sys.argv
cmdArgs[0] = os.path.basename(sys.argv[0])
# do not include db-proxy options in 1st-line comment
cmdArgs, skipNext = [], False
for cmdArg in sys.argv:
if skipNext:
skipNext = False
continue
if cmdArg.startswith('--dbproxy'):
if cmdArg.startswith('--dbproxyh') or cmdArg.startswith('--dbproxyp'):
skipNext = '=' not in cmdArg
continue
cmdArgs += [cmdArg]
cmdArgs[0] = os.path.basename(cmdArgs[0])

cmdLine = ' '.join(cmdArgs)
print('# ' + cmdLine)
print()
Expand Down
Loading

0 comments on commit cef6dba

Please sign in to comment.