diff --git a/MuonSpectrometer/MuonConfig/CMakeLists.txt b/MuonSpectrometer/MuonConfig/CMakeLists.txt index 084623f6fef634f0563cd2fe1fcd53b4c11d4663..651d53e6a032709cedaeb8f425c0189d07411244 100644 --- a/MuonSpectrometer/MuonConfig/CMakeLists.txt +++ b/MuonSpectrometer/MuonConfig/CMakeLists.txt @@ -17,6 +17,12 @@ atlas_add_test( MuonDataDecodeTest EXTRA_PATTERNS "GeoModelSvc.MuonDetectorTool.*SZ=|Cache alignment|Range of input|recorded new|map from" SCRIPT test/testMuonDataDecode.sh ) +# Adding an identical test for the ByteStream identifiable caches (and future RDO caches) +atlas_add_test( MuonDataDecodeTest_Cache + PROPERTIES TIMEOUT 1000 + EXTRA_PATTERNS "GeoModelSvc.MuonDetectorTool.*SZ=|Cache alignment|Range of input|recorded new|map from" + SCRIPT test/testMuonDataDecode_Cache.sh ) + atlas_add_test( MuonCablingConfigTest SCRIPT python -m MuonConfig.MuonCablingConfig POST_EXEC_SCRIPT nopost.sh ) diff --git a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py index 8fc7bf04f710b82e30509da26ad716f38f82f0cd..bd0428cd172d0bccd975c061315ecb7a06ad3bd8 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonBytestreamDecodeConfig.py @@ -158,7 +158,8 @@ def CscBytestreamDecodeCfg(flags, forTrigger=False): # Setup the RAW data provider tool from MuonCSC_CnvTools.MuonCSC_CnvToolsConf import Muon__CSC_RawDataProviderTool MuonCscRawDataProviderTool = Muon__CSC_RawDataProviderTool(name = "CSC_RawDataProviderTool", - Decoder = CSCRodDecoder ) + Decoder = CSCRodDecoder, + OutputLevel = VERBOSE) if forTrigger: MuonCscRawDataProviderTool.CscContainerCacheKey = "CscCache" diff --git a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py index 4f89712764878277d0b2adf16d1096ae875f93a5..b9dbefe7a6a4adfb5d0b21561e301bb502f15b66 100644 --- a/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py +++ b/MuonSpectrometer/MuonConfig/python/MuonRdoDecodeConfig.py @@ -148,7 +148,8 @@ def CscClusterBuildCfg(flags, forTrigger=False): # This function runs the decoding on a data file -def muonRdoDecodeTestData(): +def muonRdoDecodeTestData( forTrigger = False ): + # Add a flag, forTrigger, which will initially put the ByteStreamDecodeCfg code into "Cached Container" mode from AthenaCommon.Configurable import Configurable Configurable.configurableRun3Behavior=1 @@ -174,6 +175,12 @@ def muonRdoDecodeTestData(): from ByteStreamCnvSvc.ByteStreamConfig import TrigBSReadCfg cfg.merge(TrigBSReadCfg(ConfigFlags )) + # Setup IdentifiableCaches before anything else + from MuonConfig.MuonBytestreamDecodeConfig import MuonCacheCfg + muoncacheacc, muoncachealg = MuonCacheCfg() + cfg.merge( muoncacheacc ) + cfg.addEventAlgo( muoncachealg ) + # Schedule Rpc bytestream data decoding - once mergeAll is working can simplify these lines from MuonConfig.MuonBytestreamDecodeConfig import RpcBytestreamDecodeCfg rpcdecodingAcc, rpcdecodingAlg = RpcBytestreamDecodeCfg( ConfigFlags ) @@ -187,12 +194,12 @@ def muonRdoDecodeTestData(): cfg.addEventAlgo( tgcdecodingAlg ) from MuonConfig.MuonBytestreamDecodeConfig import MdtBytestreamDecodeCfg - mdtdecodingAcc, mdtdecodingAlg = MdtBytestreamDecodeCfg( ConfigFlags ) + mdtdecodingAcc, mdtdecodingAlg = MdtBytestreamDecodeCfg( ConfigFlags, forTrigger ) cfg.merge( mdtdecodingAcc ) cfg.addEventAlgo( mdtdecodingAlg ) from MuonConfig.MuonBytestreamDecodeConfig import CscBytestreamDecodeCfg - cscdecodingAcc, cscdecodingAlg = CscBytestreamDecodeCfg( ConfigFlags ) + cscdecodingAcc, cscdecodingAlg = CscBytestreamDecodeCfg( ConfigFlags, forTrigger ) cfg.merge( cscdecodingAcc ) cfg.addEventAlgo( cscdecodingAlg ) diff --git a/MuonSpectrometer/MuonConfig/test/testMuonDataDecode_Cache.sh b/MuonSpectrometer/MuonConfig/test/testMuonDataDecode_Cache.sh new file mode 100755 index 0000000000000000000000000000000000000000..32058eff9f56d51d626ad07827f0eb551fd2a374 --- /dev/null +++ b/MuonSpectrometer/MuonConfig/test/testMuonDataDecode_Cache.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +python -c 'from MuonConfig.MuonRdoDecodeConfig import muonRdoDecodeTestData; muonRdoDecodeTestData( True )'# generate pickle +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 --evtMax=20 MuonRdoDecode.pkl +fi