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

Functional L1Decoding for calo RoIs

Former-commit-id: 27d8083f
parent 799a5cd1
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,11 @@ def TrigBSReadCfg( inputFlags ):
from ByteStreamCnvSvc.ByteStreamCnvSvcConf import ByteStreamCnvSvc, ByteStreamEventStorageInputSvc, EventSelectorByteStream
from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoSelectorTool
xconv = xAODMaker__EventInfoSelectorTool()
eventSelector = EventSelectorByteStream("EventSelector")
eventSelector.HelperTools += [xconv]
acc.addService( eventSelector )
acc.setAppProperty( "EvtSel", eventSelector.name() )
......@@ -106,4 +110,7 @@ def TrigBSReadCfg( inputFlags ):
#conddb.addFolder( 'TDAQ', '/TDAQ/RunCtrl/SOR_Params' )
#acc.addService( conddb )
# creation of xAOD::EventInfo
return acc
#
# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
#
from AthenaConfiguration.ConfigFlags import makeFlag
# set of flags driving services configuration for athena MT
# this should be actual getting name from some other trigger flag deriving actual name from the TriggerMenu
# for the moment it has to be specified
inputLVL1configFile = makeFlag( "inputLVL1configFile", "Unspecified" )
readLVL1configFromXML = makeFlag( "readLVL1configFromXML", True )
def TrigConfigSvcMod(flags):
from AthenaConfiguration.CfgLogMsg import cfgLogMsg
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
acc = ComponentAccumulator()
from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
from TrigConfigSvc.TrigConfigSvcConfig import findFileInXMLPATH
l1ConfigSvc = TrigConf__LVL1ConfigSvc( "LVL1ConfigSvc" )
l1XMLFile = findFileInXMLPATH(flags.get("TrigConfigSvc.Flags.inputLVL1configFile"))
cfgLogMsg.debug( "LVL1ConfigSvc input file:"+l1XMLFile )
l1ConfigSvc.XMLMenuFile = l1XMLFile
l1ConfigSvc.ConfigSource = "XML"
acc.addService( l1ConfigSvc )
return acc
......@@ -29,8 +29,17 @@ def L1DecoderMod(flags):
OutputTrigRoIs = "MURoIs",
MonTool = RoIsUnpackingMonitoring( prefix="MU", maxCount=20 ) ) ]
from AthenaCommon.Constants import DEBUG
decoderAlg.OutputLevel=DEBUG
for u in decoderAlg.roiUnpackers:
u.OutputLevel=DEBUG
acc.addEventAlgo(decoderAlg)
from TrigConfigSvc.TrigConfigSvcMod import TrigConfigSvcMod
acc.addConfig( TrigConfigSvcMod, flags )
return acc
if __name__ == "__main__":
......
......@@ -46,7 +46,9 @@ class MenuTest:
"UNUSED : HLT_te15"]
def applyMenu(l1decoder ):
l1decoder.ctpUnpacker.CTPToChainMapping = MenuTest.CTPToChainMapping
l1decoder.roiUnpackers["MURoIsUnpackingTool"].ThresholdToChainMapping = MenuTest.MUThresholdToChainMapping
if "MURoIsUnpackingTool" in l1decoder.roiUnpackers:
l1decoder.roiUnpackers["MURoIsUnpackingTool"].ThresholdToChainMapping = MenuTest.MUThresholdToChainMapping
l1decoder.roiUnpackers["EMRoIsUnpackingTool"].ThresholdToChainMapping = MenuTest.EMThresholdToChainMapping
l1decoder.roiUnpackers["METRoIsUnpackingTool"].ThresholdToChainMapping = MenuTest.METThresholdToChainMapping
......
......@@ -13,9 +13,12 @@ from AthenaCommon.AppMgr import theApp
cfgLogMsg.setLevel("debug")
flags = ConfigFlagContainer()
flags.set("AthenaConfiguration.GlobalFlags.isMC",False)
flags.set("AthenaConfiguration.GlobalFlags.InputFiles",
["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"])
flags.set( "AthenaConfiguration.GlobalFlags.isMC", False )
flags.set( "AthenaConfiguration.GlobalFlags.InputFiles",
["/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/TrigP1Test/data17_13TeV.00327265.physics_EnhancedBias.merge.RAW._lb0100._SFO-1._0001.1"] )
flags.set( "TrigConfigSvc.Flags.inputLVL1configFile", "LVL1config_Physics_pp_v7.xml" )
flags.set( "L1Decoder.Flags.doMuon", False )
acc = ComponentAccumulator()
from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg
......@@ -23,10 +26,9 @@ acc.executeModule( TrigBSReadCfg, flags )
from AtlasGeoModel.GeoModelConfig import GeoModelCfg
acc.executeModule( GeoModelCfg, flags )
flags.set("L1Decoder.Flags.doMuon",False)
acc.addSequence( seqOR( "hltTop") )
# for now we run trivial tester,
#from AthenaCommon.Constants import DEBUG
......@@ -35,15 +37,24 @@ acc.addSequence( seqOR( "hltTop") )
# that is how the L1 decoder can be added but it needs more work to bring all needed services (i.e. TrigConfiguration)
acc.addSequence( seqOR( "hltTop") )
from L1Decoder.L1DecoderMod import L1DecoderMod
acc.executeModule( L1DecoderMod, flags )
acc.executeModule( L1DecoderMod, flags, sequence="hltTop" )
l1 = acc.getEventAlgo( "L1Decoder" )
#from TrigUpgradeTest.TestUtils import applyMenu
#applyMenu( l1 )
from TrigUpgradeTest.TestUtils import applyMenu
applyMenu( l1 )
#acc.printConfig() waiting for MR 8533 is there
with file("newJOtest.pkl", "w") as p:
acc.addSequence( seqAND( "hltSteps"), sequenceName="hltTop" )
for step in range(1, 6):
acc.addSequence( parOR( "hltStep%d" % step), sequenceName="hltSteps" )
acc.printConfig()
fname = "newJOtest.pkl"
print "Storing config in the config", fname
with file(fname, "w") as p:
acc.store( p )
p.close()
......@@ -2,6 +2,16 @@
# art-type: build
# art-ci: master
rm -rf newJOtest.py
get_files TrigUpgradeTest/newJOtest.py
get_files -jo TrigUpgradeTest/newJOtest.py
python newJOtest.py # generate pickle
athena --threads=1 newJOtest.pkl
status=$?
if [ ${status} -ne 0 ]
then
echo "ERROR in configuration generation stage, stopping"
exit -1
else
echo
echo "JOs reading stage finished, launching Athena from pickle file"
echo
athena --threads=1 newJOtest.pkl
fi
\ No newline at end of file
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