Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various improvements to HLT-development tools [12_5_X] #40094

Merged
merged 2 commits into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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