Skip to content
Snippets Groups Projects
Commit 87f3b164 authored by Tomasz Bold's avatar Tomasz Bold
Browse files

Option to run part of the menu in newJO

parent 35251298
No related branches found
No related tags found
No related merge requests found
...@@ -206,6 +206,10 @@ def createTriggerFlags(): ...@@ -206,6 +206,10 @@ def createTriggerFlags():
# name of the trigger menu # name of the trigger menu
flags.addFlag('Trigger.triggerMenuSetup', 'LS2_v1') flags.addFlag('Trigger.triggerMenuSetup', 'LS2_v1')
# modify the slection of chains that are run (default run all), see more in GenerateMenuMT_newJO
flags.addFlag('Trigger.triggerMenuModifier', ['all'])
# name of the trigger menu # name of the trigger menu
flags.addFlag('Trigger.generateMenuDiagnostics', False) flags.addFlag('Trigger.generateMenuDiagnostics', False)
......
...@@ -35,11 +35,28 @@ def obtainChainsOfMenu(flags): ...@@ -35,11 +35,28 @@ def obtainChainsOfMenu(flags):
return setupMenuModule.setupMenu(flags) return setupMenuModule.setupMenu(flags)
def acceptChain(chainDict, whichSignatures):
"""
Helper to accept chains to be part of the menu depending on their name or which signatures they belong to.
If the keyword "all" is present all chains that are in the menu are accepted.
If the keyword "emptyMenu" is present other keywords are checked.
They can be name of signature: e.g. Muon or name of chain(s) HLT_j50_L1J30
Leaving the "emptyMenu" keyword only results in no chains that are configured. As a consequence would cause an issue somewhere downstream.
"""
if "all" in whichSignatures:
return True
if "emptyMenu" in whichSignatures:
if chainDict["chainName"] in whichSignatures: #explicit list of chains specified
return True
if all( [ sig in whichSignatures for sig in chainDict['signatures'] ]): # all signatures for the chain are mentioned
return True
return False
def generateMenu(flags): def generateMenu(flags):
""" """
Using flags generate appropriate Control Flow Graph wiht all HLT algorithms Using flags generate appropriate Control Flow Graph wiht all HLT algorithms
""" """
# convert to chainDefs # convert to chainDefs
...@@ -75,7 +92,8 @@ def generateMenu(flags): ...@@ -75,7 +92,8 @@ def generateMenu(flags):
for chain in chains: for chain in chains:
# TODO topo threshold # TODO topo threshold
mainChainDict = dictFromChainName( chain ) mainChainDict = dictFromChainName( chain )
if not acceptChain( mainChainDict, flags.Trigger.triggerMenuModifier ):
continue
counter += 1 counter += 1
mainChainDict['chainCounter'] = counter mainChainDict['chainCounter'] = counter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment