Skip to content
Snippets Groups Projects
Commit 4cda231e authored by Johannes Elmsheuser's avatar Johannes Elmsheuser
Browse files

Merge branch 'add-option-to-run-only-one-sig-in-new-jo' into 'master'

Add option to run only one sig in new jo

See merge request atlas/athena!39425
parents 01fad6ae b5ca2c4d
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)
......
# #
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
# #
from AthenaConfiguration.ComponentAccumulator import CompFactory from AthenaConfiguration.ComponentAccumulator import CompFactory
...@@ -7,29 +7,29 @@ from AthenaConfiguration.MainServicesConfig import MainServicesCfg ...@@ -7,29 +7,29 @@ from AthenaConfiguration.MainServicesConfig import MainServicesCfg
from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags from AthenaConfiguration.AllConfigFlags import ConfigFlags as flags
from AthenaCommon.Configurable import Configurable from AthenaCommon.Configurable import Configurable
Configurable.configurableRun3Behavior=1 Configurable.configurableRun3Behavior = 1
flags.Detector.GeometryPixel = True flags.Detector.GeometryPixel = True
flags.Detector.GeometrySCT = True flags.Detector.GeometrySCT = True
flags.Detector.GeometryTRT = True flags.Detector.GeometryTRT = True
flags.Detector.GeometryID = True flags.Detector.GeometryID = True
flags.Detector.GeometryBpipe = True flags.Detector.GeometryBpipe = True
flags.Detector.GeometryCavern = False flags.Detector.GeometryCavern = False
flags.Detector.GeometryPixel = True flags.Detector.GeometryPixel = True
flags.Detector.GeometrySCT = True flags.Detector.GeometrySCT = True
flags.Detector.GeometryTRT = True flags.Detector.GeometryTRT = True
flags.Detector.GeometryLAr = True flags.Detector.GeometryLAr = True
flags.Detector.GeometryTile = True flags.Detector.GeometryTile = True
flags.Detector.GeometryMDT = True flags.Detector.GeometryMDT = True
flags.Detector.GeometryTGC = True flags.Detector.GeometryTGC = True
flags.Detector.GeometryCSC = True flags.Detector.GeometryCSC = True
flags.Detector.GeometryRPC = True flags.Detector.GeometryRPC = True
flags.Detector.RecoPixel = True flags.Detector.RecoPixel = True
flags.Detector.RecoSCT = True flags.Detector.RecoSCT = True
# Output configuration - currently testing offline workflow # Output configuration - currently testing offline workflow
...@@ -44,17 +44,17 @@ flags.Scheduler.ShowDataFlow = True ...@@ -44,17 +44,17 @@ flags.Scheduler.ShowDataFlow = True
flags.Scheduler.ShowControlFlow = True flags.Scheduler.ShowControlFlow = True
flags.Scheduler.EnableVerboseViews = True flags.Scheduler.EnableVerboseViews = True
flags.Exec.MaxEvents=50 flags.Exec.MaxEvents = 50
flags.Input.isMC = False flags.Input.isMC = False
flags.Common.isOnline=True flags.Common.isOnline = True
flags.IOVDb.GlobalTag="CONDBR2-HLTP-2018-01" flags.IOVDb.GlobalTag = "CONDBR2-HLTP-2018-01"
flags.Concurrency.NumThreads=1 flags.Concurrency.NumThreads = 1
flags.Concurrency.NumConcurrentEvents=1 flags.Concurrency.NumConcurrentEvents = 1
flags.InDet.useSctDCS=False flags.InDet.useSctDCS = False
flags.InDet.usePixelDCS=False flags.InDet.usePixelDCS = False
# command line handling # command line handling
# options that are defined in: AthConfigFlags are handled here # options that are defined in: AthConfigFlags are handled here
...@@ -65,37 +65,36 @@ flags.fillFromArgs(parser=parser) ...@@ -65,37 +65,36 @@ flags.fillFromArgs(parser=parser)
flags.lock() flags.lock()
from AthenaCommon.Constants import INFO,DEBUG,WARNING from AthenaCommon.Constants import INFO, DEBUG, WARNING
acc = MainServicesCfg( flags ) acc = MainServicesCfg(flags)
acc.getService('AvalancheSchedulerSvc').VerboseSubSlots = True acc.getService('AvalancheSchedulerSvc').VerboseSubSlots = True
# this delcares to the scheduer that EventInfo object is produced # this delcares to the scheduer that EventInfo object is produced
acc.addEventAlgo( CompFactory.SGInputLoader( Load = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )] ), acc.addEventAlgo(CompFactory.SGInputLoader(Load=[('xAOD::EventInfo', 'StoreGateSvc+EventInfo')]), "AthAlgSeq")
"AthAlgSeq" )
from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
acc.merge(ByteStreamReadCfg( flags )) acc.merge(ByteStreamReadCfg(flags))
from TriggerJobOpts.TriggerHistSvcConfig import TriggerHistSvcConfig from TriggerJobOpts.TriggerHistSvcConfig import TriggerHistSvcConfig
acc.merge(TriggerHistSvcConfig( flags )) acc.merge(TriggerHistSvcConfig(flags))
from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT_newJO import generateMenu as generateHLTMenu from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT_newJO import generateMenu as generateHLTMenu
from TriggerJobOpts.TriggerConfig import triggerRunCfg from TriggerJobOpts.TriggerConfig import triggerRunCfg
acc.merge( triggerRunCfg( flags, seqName = "AthMasterSeq", menu=generateHLTMenu ) ) acc.merge(triggerRunCfg(flags, seqName="AthMasterSeq", menu=generateHLTMenu))
from RegionSelector.RegSelConfig import regSelCfg from RegionSelector.RegSelConfig import regSelCfg
acc.merge( regSelCfg( flags ) ) acc.merge(regSelCfg(flags))
# The L1 presacles do not get created in the avoce menu setup # The L1 presacles do not get created in the avoce menu setup
from TrigConfigSvc.TrigConfigSvcCfg import createL1PrescalesFileFromMenu from TrigConfigSvc.TrigConfigSvcCfg import createL1PrescalesFileFromMenu
createL1PrescalesFileFromMenu(flags) createL1PrescalesFileFromMenu(flags)
acc.getEventAlgo( "TrigSignatureMoniMT" ).OutputLevel=DEBUG acc.getEventAlgo("TrigSignatureMoniMT").OutputLevel = DEBUG
acc.getEventAlgo( "L1Decoder" ).ctpUnpacker.UseTBPBits=True # test setup acc.getEventAlgo("L1Decoder").ctpUnpacker.UseTBPBits = True # test setup
...@@ -116,10 +115,10 @@ acc.foreach_component("*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING # ...@@ -116,10 +115,10 @@ acc.foreach_component("*HLTTop/*GenericMonitoringTool*").OutputLevel = WARNING #
acc.printConfig(withDetails=False, summariseProps=True, printDefaults=True) acc.printConfig(withDetails=False, summariseProps=True, printDefaults=True)
fname = "runHLT_standalone_newJO.pkl" fName = "runHLT_standalone_newJO.pkl"
print( "Storing config in the file {}".format( fname ) ) print("Storing config in the file {}".format(fName))
with open(fname, "wb") as p: with open(fName, "wb") as p:
acc.store( p ) acc.store(p)
p.close() p.close()
status = acc.run() status = acc.run()
if status.isFailure(): if status.isFailure():
......
...@@ -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