Skip to content
Snippets Groups Projects
Commit b976c3f8 authored by Stewart Martin-Haugh's avatar Stewart Martin-Haugh Committed by Adam Edward Barton
Browse files

Add new parallel HLTBootstrap sequence for L1Decoder and CacheCreators.

Also put L1Decoder into the sequence at the correct point already in
runHLT_standalone.py. Addresses ATR-21657
parent e1c600cc
No related branches found
No related tags found
No related merge requests found
...@@ -9,15 +9,17 @@ atlas_add_component( TrigUpgradeTest ...@@ -9,15 +9,17 @@ atlas_add_component( TrigUpgradeTest
LINK_LIBRARIES AthenaBaseComps TrigSteeringEvent DecisionHandlingLib TrigCompositeUtilsLib LINK_LIBRARIES AthenaBaseComps TrigSteeringEvent DecisionHandlingLib TrigCompositeUtilsLib
) )
atlas_add_test( emu_step_processing foreach(test emu_step_processing emu_step_menu_processing)
SCRIPT test/test_emu_step_processing.sh set( rundir ${CMAKE_CURRENT_BINARY_DIR}/unitTestRun_${test} )
file( REMOVE_RECURSE ${rundir} )
file( MAKE_DIRECTORY ${rundir} )
atlas_add_test( ${test}
SCRIPT test/test_${test}.sh
LOG_SELECT_PATTERN "TrigSignatureMoniMT.*INFO HLT_.*|TrigSignatureMoniMT.*-- #[0-9]+ (Events|Features).*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*|TriggerSummaryStep.*+++ leg.*" LOG_SELECT_PATTERN "TrigSignatureMoniMT.*INFO HLT_.*|TrigSignatureMoniMT.*-- #[0-9]+ (Events|Features).*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*|TriggerSummaryStep.*+++ leg.*"
PROPERTIES WORKING_DIRECTORY ${rundir}
) )
endforeach()
atlas_add_test( emu_step_menu_processing
SCRIPT test/test_emu_step_menu_processing.sh
LOG_SELECT_PATTERN "TrigSignatureMoniMT.*INFO HLT_.*|TrigSignatureMoniMT.*-- #[0-9]+ (Events|Features).*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*|TriggerSummaryStep.*+++ leg.*"
)
# Install files from the package: # Install files from the package:
atlas_install_joboptions( share/*.py ) atlas_install_joboptions( share/*.py )
......
...@@ -21,8 +21,13 @@ def thresholdToChains( chains ): ...@@ -21,8 +21,13 @@ def thresholdToChains( chains ):
########################################################################### ###########################################################################
def generateL1DecoderAndChainsManually(topSequence): def generateL1DecoderAndChainsManually(topSequence):
generateEmuEvents() generateEmuEvents()
from AthenaCommon.CFElements import seqOR,parOR
hltTop = seqOR("HLTTop")
hltBeginSeq = parOR("HLTBeginSeq")
hltTop += hltBeginSeq
topSequence += hltTop
l1Decoder = generateL1Decoder() l1Decoder = generateL1Decoder()
topSequence += l1Decoder hltBeginSeq += l1Decoder
generateChainsManually() generateChainsManually()
from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import makeHLTTree from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import makeHLTTree
from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT
...@@ -32,8 +37,14 @@ def generateL1DecoderAndChainsManually(topSequence): ...@@ -32,8 +37,14 @@ def generateL1DecoderAndChainsManually(topSequence):
########################################################################### ###########################################################################
def generateL1DecoderAndChainsByMenu(topSequence): def generateL1DecoderAndChainsByMenu(topSequence):
generateEmuEvents() generateEmuEvents()
from AthenaCommon.CFElements import seqOR,parOR
hltTop = seqOR("HLTTop")
hltBeginSeq = parOR("HLTBeginSeq")
hltTop += hltBeginSeq
topSequence += hltTop
l1Decoder = generateL1Decoder()
hltBeginSeq += l1Decoder
l1Decoder = generateL1Decoder() l1Decoder = generateL1Decoder()
topSequence += l1Decoder
generateEmuMenu() generateEmuMenu()
......
...@@ -43,6 +43,7 @@ for option in defaultOptions: ...@@ -43,6 +43,7 @@ for option in defaultOptions:
TriggerFlags.generateMenuDiagnostics=True TriggerFlags.generateMenuDiagnostics=True
topSequence = AlgSequence() topSequence = AlgSequence()
if opt.doMenu is True: if opt.doMenu is True:
generateL1DecoderAndChainsByMenu(topSequence) generateL1DecoderAndChainsByMenu(topSequence)
else: else:
......
...@@ -63,7 +63,7 @@ acc.merge(TriggerHistSvcConfig( flags )) ...@@ -63,7 +63,7 @@ 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, 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 ) )
......
...@@ -506,7 +506,7 @@ def triggerMergeViewsAndAddMissingEDMCfg( edmSet, hypos, viewMakers, decObj, dec ...@@ -506,7 +506,7 @@ def triggerMergeViewsAndAddMissingEDMCfg( edmSet, hypos, viewMakers, decObj, dec
def triggerRunCfg( flags, menu=None ): def triggerRunCfg( flags, seqName = None, menu=None ):
""" """
top of the trigger config (for real triggering online or on MC) top of the trigger config (for real triggering online or on MC)
Returns: ca only Returns: ca only
...@@ -518,7 +518,7 @@ def triggerRunCfg( flags, menu=None ): ...@@ -518,7 +518,7 @@ def triggerRunCfg( flags, menu=None ):
acc.merge( L1ConfigSvcCfg(flags) ) acc.merge( L1ConfigSvcCfg(flags) )
acc.merge( triggerIDCCacheCreatorsCfg( flags ) ) acc.merge( triggerIDCCacheCreatorsCfg( flags, seqName ) )
from L1Decoder.L1DecoderConfig import L1DecoderCfg from L1Decoder.L1DecoderConfig import L1DecoderCfg
l1DecoderAcc, l1DecoderAlg = L1DecoderCfg( flags ) l1DecoderAcc, l1DecoderAlg = L1DecoderCfg( flags )
...@@ -571,19 +571,19 @@ def triggerRunCfg( flags, menu=None ): ...@@ -571,19 +571,19 @@ def triggerRunCfg( flags, menu=None ):
return acc return acc
def triggerIDCCacheCreatorsCfg(flags): def triggerIDCCacheCreatorsCfg(flags, seqName = None):
""" """
Configures IDC cache loading, for now unconditionally, may make it menu dependent in future Configures IDC cache loading, for now unconditionally, may make it menu dependent in future
""" """
acc = ComponentAccumulator() acc = ComponentAccumulator(sequenceName = seqName)
from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg
acc.merge( MuonCacheCfg() ) acc.merge( MuonCacheCfg(), sequenceName = seqName )
from MuonConfig.MuonRdoDecodeConfig import MuonPrdCacheCfg from MuonConfig.MuonRdoDecodeConfig import MuonPrdCacheCfg
acc.merge( MuonPrdCacheCfg() ) acc.merge( MuonPrdCacheCfg(), sequenceName = seqName )
from TrigInDetConfig.TrigInDetConfig import InDetIDCCacheCreatorCfg from TrigInDetConfig.TrigInDetConfig import InDetIDCCacheCreatorCfg
acc.merge( InDetIDCCacheCreatorCfg() ) acc.merge( InDetIDCCacheCreatorCfg(), sequenceName = seqName )
return acc return acc
...@@ -613,7 +613,7 @@ if __name__ == "__main__": ...@@ -613,7 +613,7 @@ if __name__ == "__main__":
return menuCA return menuCA
acc = triggerRunCfg( ConfigFlags, testMenu ) acc = triggerRunCfg( ConfigFlags, seqName = None, menu = testMenu )
Configurable.configurableRun3Behavior=0 Configurable.configurableRun3Behavior=0
from AthenaConfiguration.ComponentAccumulator import appendCAtoAthena from AthenaConfiguration.ComponentAccumulator import appendCAtoAthena
appendCAtoAthena( acc ) appendCAtoAthena( acc )
......
...@@ -439,16 +439,16 @@ createL1PrescalesFileFromMenu() ...@@ -439,16 +439,16 @@ createL1PrescalesFileFromMenu()
from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg from TrigConfigSvc.TrigConfigSvcCfg import L1ConfigSvcCfg
CAtoGlobalWrapper(L1ConfigSvcCfg,None) CAtoGlobalWrapper(L1ConfigSvcCfg,None)
# ---------------------------------------------------------------
# Level 1 simulation
# ---------------------------------------------------------------
if opt.doL1Sim:
from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
topSequence += Lvl1SimulationSequence(ConfigFlags)
# --------------------------------------------------------------- # ---------------------------------------------------------------
# HLT prep: RoIBResult and L1Decoder # HLT prep: RoIBResult and L1Decoder
# --------------------------------------------------------------- # ---------------------------------------------------------------
# main HLT top sequence
from AthenaCommon.CFElements import seqOR,parOR
hltTop = seqOR("HLTTop")
hltBeginSeq = parOR("HLTBeginSeq")
hltTop += hltBeginSeq
l1decoder = None l1decoder = None
if opt.doL1Unpacking: if opt.doL1Unpacking:
if globalflags.InputFormat.is_bytestream(): if globalflags.InputFormat.is_bytestream():
...@@ -464,15 +464,25 @@ if opt.doL1Unpacking: ...@@ -464,15 +464,25 @@ if opt.doL1Unpacking:
l1decoder.L1TriggerResult = "L1TriggerResult" if opt.enableL1Phase1 else "" l1decoder.L1TriggerResult = "L1TriggerResult" if opt.enableL1Phase1 else ""
if opt.enableL1Phase1: if opt.enableL1Phase1:
from L1Decoder.L1DecoderConfig import getL1TriggerResultMaker from L1Decoder.L1DecoderConfig import getL1TriggerResultMaker
topSequence += conf2toConfigurable(getL1TriggerResultMaker()) hltBeginSeq += conf2toConfigurable(getL1TriggerResultMaker())
if TriggerFlags.doTransientByteStream(): if TriggerFlags.doTransientByteStream():
transTypeKey = ("TransientBSOutType","StoreGateSvc+TransientBSOutKey") transTypeKey = ("TransientBSOutType","StoreGateSvc+TransientBSOutKey")
l1decoder.ExtraInputs += [transTypeKey] l1decoder.ExtraInputs += [transTypeKey]
topSequence += conf2toConfigurable(l1decoder) hltBeginSeq += conf2toConfigurable(l1decoder)
else: else:
from TrigUpgradeTest.TestUtils import L1EmulationTest from TrigUpgradeTest.TestUtils import L1EmulationTest
topSequence += L1EmulationTest() hltBeginSeq += L1EmulationTest()
topSequence += hltTop
# ---------------------------------------------------------------
# Level 1 simulation
# ---------------------------------------------------------------
if opt.doL1Sim:
from TriggerJobOpts.Lvl1SimulationConfig import Lvl1SimulationSequence
hltBeginSeq += Lvl1SimulationSequence(ConfigFlags)
# --------------------------------------------------------------- # ---------------------------------------------------------------
# HLT generation # HLT generation
...@@ -566,7 +576,7 @@ if opt.doWriteBS: ...@@ -566,7 +576,7 @@ if opt.doWriteBS:
#------------------------------------------------------------- #-------------------------------------------------------------
ConfigFlags.lock() ConfigFlags.lock()
from TriggerJobOpts.TriggerConfig import triggerIDCCacheCreatorsCfg from TriggerJobOpts.TriggerConfig import triggerIDCCacheCreatorsCfg
CAtoGlobalWrapper(triggerIDCCacheCreatorsCfg,ConfigFlags) CAtoGlobalWrapper(triggerIDCCacheCreatorsCfg, ConfigFlags, seqName="HLTBeginSeq")
# B-jet output # B-jet output
......
...@@ -31,7 +31,7 @@ from builtins import map ...@@ -31,7 +31,7 @@ from builtins import map
from builtins import range from builtins import range
from collections import OrderedDict from collections import OrderedDict
# Classes to configure the CF graph, via Nodes # Classes to configure the CF graph, via Nodes
from AthenaCommon.CFElements import parOR, seqAND, seqOR from AthenaCommon.CFElements import parOR, seqAND
from AthenaCommon.AlgSequence import dumpSequence from AthenaCommon.AlgSequence import dumpSequence
from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFDot import stepCF_DataFlow_to_dot, stepCF_ControlFlow_to_dot, all_DataFlow_to_dot, create_dot from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFDot import stepCF_DataFlow_to_dot, stepCF_ControlFlow_to_dot, all_DataFlow_to_dot, create_dot
from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming from TriggerMenuMT.HLTMenuConfig.Menu.MenuComponentsNaming import CFNaming
...@@ -126,24 +126,19 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None): ...@@ -126,24 +126,19 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
topSequence = AlgSequence() topSequence = AlgSequence()
# connect to L1Decoder # find main HLT top sequence (already set up in runHLT_standalone)
l1decoder = [ d for d in topSequence.getChildren() if d.getType() == "L1Decoder" ] from AthenaCommon.CFElements import findSubSequence
if len(l1decoder) != 1 : hltBeginSeq = findSubSequence(topSequence, "HLTBeginSeq")
raise RuntimeError(" Can't find 1 instance of L1Decoder in topSequence, instead found this in topSequence "+str(topSequence.getChildren()) ) l1decoder = [ d for d in hltBeginSeq.getChildren() if d.getType() == "L1Decoder" ]
# take L1Decoder out of topSeq
topSequence.remove( l1decoder )
# main HLT top sequence
hltTop = seqOR("HLTTop")
# put L1Decoder here
hltTop += l1decoder
# add the HLT steps Node # add the HLT steps Node
steps = seqAND("HLTAllSteps") steps = seqAND("HLTAllSteps")
hltTop = findSubSequence(topSequence, "HLTTop")
hltTop += steps hltTop += steps
hltEndSeq = parOR("HLTEndSeq")
hltTop += hltEndSeq
# make DF and CF tree from chains # make DF and CF tree from chains
finalDecisions = decisionTreeFromChains(steps, triggerConfigHLT.configsList(), triggerConfigHLT.dictsList(), newJO) finalDecisions = decisionTreeFromChains(steps, triggerConfigHLT.configsList(), triggerConfigHLT.dictsList(), newJO)
...@@ -151,8 +146,8 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None): ...@@ -151,8 +146,8 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
for step in finalDecisions: for step in finalDecisions:
flatDecisions.extend (step) flatDecisions.extend (step)
summary= makeSummary("Final", flatDecisions) summary = makeSummary("Final", flatDecisions)
hltTop += summary hltEndSeq += summary
# TODO - check we are not running things twice. Once here and once in TriggerConfig.py # TODO - check we are not running things twice. Once here and once in TriggerConfig.py
...@@ -168,7 +163,7 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None): ...@@ -168,7 +163,7 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
Configurable.configurableRun3Behavior=1 Configurable.configurableRun3Behavior=1
summaryAcc, summaryAlg = triggerSummaryCfg( ConfigFlags, hypos ) summaryAcc, summaryAlg = triggerSummaryCfg( ConfigFlags, hypos )
Configurable.configurableRun3Behavior=0 Configurable.configurableRun3Behavior=0
hltTop += conf2toConfigurable( summaryAlg ) hltEndSeq += conf2toConfigurable( summaryAlg )
appendCAtoAthena( summaryAcc ) appendCAtoAthena( summaryAcc )
decObj = collectDecisionObjects( hypos, filters, l1decoder[0], summaryAlg ) decObj = collectDecisionObjects( hypos, filters, l1decoder[0], summaryAlg )
decObjHypoOut = collectHypoDecisionObjects(hypos, inputs=False, outputs=True) decObjHypoOut = collectHypoDecisionObjects(hypos, inputs=False, outputs=True)
...@@ -176,17 +171,17 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None): ...@@ -176,17 +171,17 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None):
monAcc, monAlg = triggerMonitoringCfg( ConfigFlags, hypos, filters, l1decoder[0] ) monAcc, monAlg = triggerMonitoringCfg( ConfigFlags, hypos, filters, l1decoder[0] )
edmAlg = triggerMergeViewsAndAddMissingEDMCfg(['AOD', 'ESD'], hypos, viewMakers, decObj, decObjHypoOut) edmAlg = triggerMergeViewsAndAddMissingEDMCfg(['AOD', 'ESD'], hypos, viewMakers, decObj, decObjHypoOut)
Configurable.configurableRun3Behavior=0 Configurable.configurableRun3Behavior=0
hltTop += conf2toConfigurable( monAlg ) hltEndSeq += conf2toConfigurable( monAlg )
appendCAtoAthena( monAcc ) appendCAtoAthena( monAcc )
# this is a shotcut for now, we always assume we may be writing ESD & AOD outputs, so all gaps will be filled # this is a shotcut for now, we always assume we may be writing ESD & AOD outputs, so all gaps will be filled
hltTop += conf2toConfigurable(edmAlg)
hltEndSeq += conf2toConfigurable(edmAlg)
# Test the configuration # Test the configuration
from TriggerMenuMT.HLTMenuConfig.Menu.CFValidation import testHLTTree from TriggerMenuMT.HLTMenuConfig.Menu.CFValidation import testHLTTree
testHLTTree( hltTop ) testHLTTree( hltTop )
topSequence += hltTop
def matrixDisplayOld( allCFSeq ): def matrixDisplayOld( allCFSeq ):
from collections import defaultdict from collections import defaultdict
......
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