diff --git a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py index 2e58f45499c0ae82b68154b73f41bb6e3bb9c1b6..99de466efcdf8fccea0b0a58fc3ea895cc704433 100644 --- a/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py +++ b/HLT/Trigger/TrigControl/TrigExamples/TrigExPartialEB/python/MTCalibPebConfig.py @@ -89,15 +89,16 @@ def make_l1_seq(): from TrigT1ResultByteStream.TrigT1ResultByteStreamConf import RoIBResultByteStreamDecoderAlg all_algs.append(RoIBResultByteStreamDecoderAlg()) + # Set menu for L1ConfigSvc + from TriggerJobOpts.TriggerFlags import TriggerFlags + TriggerFlags.triggerMenuSetup = "LS2_v1" + # Ensure LVL1ConfigSvc is initialised before L1Decoder handles BeginRun incident # This should be done by the L1Decoder configuration in new-style job options (with component accumulator) - from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, findFileInXMLPATH + from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu, getL1ConfigSvc from AthenaCommon.AppMgr import ServiceMgr as svcMgr - svcMgr += LVL1ConfigSvc() - - # Set the LVL1 menu (needed for initialising LVL1ConfigSvc) - from TriggerJobOpts.TriggerFlags import TriggerFlags - svcMgr.LVL1ConfigSvc.XMLMenuFile = findFileInXMLPATH(TriggerFlags.inputLVL1configFile()) + l1JsonFile = generateL1Menu() + svcMgr += getL1ConfigSvc() # Initialise L1 decoding tools from L1Decoder.L1DecoderConf import CTPUnpackingTool @@ -114,7 +115,6 @@ def make_l1_seq(): from L1Decoder.L1DecoderConf import L1Decoder l1decoder = L1Decoder() l1decoder.ctpUnpacker = ctpUnpacker - l1decoder.ChainToCTPMapping = chainCTPMap all_algs.append(l1decoder) from AthenaCommon.CFElements import seqOR diff --git a/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py b/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py index 55a41bbc3691279a639e17400c8369033be7dd3c..646b6f75343f854010f432619cb84e42461f5468 100644 --- a/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py +++ b/Trigger/TrigSteer/L1Decoder/share/testL1Decoder.py @@ -23,10 +23,6 @@ for unpack in topSequence.L1Decoder.roiUnpackers: from TriggerMenuMT.HLTMenuConfig.Menu.HLTMenuJSON import generateJSON generateJSON() - -#testChains =[x for x, y in CTPToChainMapping.items()] -#topSequence.L1Decoder.ChainToCTPMapping = CTPToChainMapping -#print testChains print topSequence.L1Decoder #from TrigUpgradeTest.jetDefs import jetRecoSequence diff --git a/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx index 5a9252449e6c6578b087026d36d8e4c2eb00dc0e..51b5e15a626b4bca4a2295eec47059a0c7b00262 100644 --- a/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.cxx @@ -39,7 +39,7 @@ StatusCode EMRoIsUnpackingTool::start() { return StatusCode::SUCCESS; } -StatusCode EMRoIsUnpackingTool::updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) { +StatusCode EMRoIsUnpackingTool::updateConfiguration() { m_emThresholds.clear(); using namespace TrigConf; const ThresholdConfig* thresholdConfig = m_configSvc->thresholdConfig(); diff --git a/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.h index 1eb959dd719ef3f382ed2c162d9eceea81581e19..6ae9f68c35e50aae53e4bf807a95b67366ed79c8 100644 --- a/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/EMRoIsUnpackingTool.h @@ -34,7 +34,7 @@ public: const HLT::IDSet& activeChains) const override; virtual StatusCode initialize() override; - virtual StatusCode updateConfiguration(const IRoIsUnpackingTool::SeedingMap& ) override; + virtual StatusCode updateConfiguration() override; virtual StatusCode finalize() override; virtual StatusCode start() override; diff --git a/Trigger/TrigSteer/L1Decoder/src/IRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/IRoIsUnpackingTool.h index 6cc5812a20d18f3ee0bf02e1d113d421f7d9b799..e655cafae828663ee98802578fae4757826b3a8c 100644 --- a/Trigger/TrigSteer/L1Decoder/src/IRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/IRoIsUnpackingTool.h @@ -20,12 +20,12 @@ class IRoIsUnpackingTool : virtual public IAlgTool { public: DeclareInterfaceID(IRoIsUnpackingTool, 1, 0); - typedef std::map<std::string, std::string> SeedingMap; + /** * Invoked when there is a potential change of the configuration. Typically beginRun * it obtains the information about the L1 item -> HLT seeding relation in a form of a map where the key is the HLT chain name and value is the L1 item **/ - virtual StatusCode updateConfiguration( const SeedingMap& seeding ) = 0; + virtual StatusCode updateConfiguration( ) = 0; /** * Unpack RoIB result depending on implementaton (e.g. EM, Jet, ...) diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx index 488031cf79b36d3671dd7dcb591b8aa816595062..d66f7d8bf63e4f4e82a190085badd859741e85c5 100644 --- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.cxx @@ -31,7 +31,7 @@ StatusCode JRoIsUnpackingTool::start() { } -StatusCode JRoIsUnpackingTool::updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) { +StatusCode JRoIsUnpackingTool::updateConfiguration() { using namespace TrigConf; m_jetThresholds.clear(); diff --git a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h index ae91e1819b1cd99fd19c339e7f76ac90f1591ffb..0ebe26d3162edda2070a04f21bb862033d14c56c 100644 --- a/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/JRoIsUnpackingTool.h @@ -28,7 +28,7 @@ public: const HLT::IDSet& activeChains) const override; virtual StatusCode initialize() override; - virtual StatusCode updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) override; + virtual StatusCode updateConfiguration() override; virtual StatusCode finalize() override { return StatusCode::SUCCESS; } virtual StatusCode start() override; private: diff --git a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx index 568cb72f95835e9d2d10f06a7626f24c147a9dd8..62a6d72b1cec8092fe0658c571e0eee4be65864a 100644 --- a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.cxx @@ -51,9 +51,9 @@ StatusCode L1Decoder::initialize() { void L1Decoder::handle(const Incident& incident) { if (incident.type()!="BeginRun") return; ATH_MSG_DEBUG( "In L1Decoder BeginRun incident" ); - + for ( auto t: m_roiUnpackers ) - if ( t->updateConfiguration( m_chainToCTPProperty ).isFailure() ) { + if ( t->updateConfiguration( ).isFailure() ) { ATH_MSG_ERROR( "Problem in configuring " << t->name() ); } } diff --git a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h index 804dd1352e9ddd12f66f1c15e88c49f47e179f23..38a17b629b528bd495e7e81f2e2777c89db6af00 100644 --- a/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h +++ b/Trigger/TrigSteer/L1Decoder/src/L1Decoder.h @@ -66,10 +66,6 @@ private: Gaudi::Property<std::string> m_costMonitoringChain{this, "CostMonitoringChain", "HLT_costmonitor", "Name of the chain which should enable HLT cost montoring."}; - Gaudi::Property<std::map<std::string, std::string>> m_chainToCTPProperty{ - this, "ChainToCTPMapping", {}, "Seeding in the form: HLT_chain : L1_item"}; - ///@} - ServiceHandle<ITrigCostMTSvc> m_trigCostSvcHandle { this, "TrigCostMTSvc", "TrigCostMTSvc", "The trigger cost service" }; diff --git a/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.cxx index 5cbe42a9c335629b7d578e5a2a26a1373e355fc2..b600e5d2c64b86ece7664d3a8471c7c38fde4fba 100644 --- a/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.cxx @@ -36,7 +36,7 @@ StatusCode METRoIsUnpackingTool::start() { } -StatusCode METRoIsUnpackingTool::updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) { +StatusCode METRoIsUnpackingTool::updateConfiguration() { using namespace TrigConf; for ( auto thresholdToChain: m_thresholdToChainMapping ) { diff --git a/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.h index 9f9012c3ef8a7a13d218c8ee35b97335d09d8e89..60f98749fe3b71da33a45ed4fd6af3b43423f3fe 100644 --- a/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/METRoIsUnpackingTool.h @@ -20,7 +20,7 @@ public: const std::string& name, const IInterface* parent ); - virtual StatusCode updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) override; + virtual StatusCode updateConfiguration() override; virtual StatusCode initialize() override; diff --git a/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.cxx index 02084d1dbefe1081bdbbd1617273ad895219a6e6..e7b8cbec4661750e5b6e2380007df437d8cae005 100644 --- a/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.cxx @@ -41,7 +41,7 @@ StatusCode MURoIsUnpackingTool::start() { } -StatusCode MURoIsUnpackingTool::updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) { +StatusCode MURoIsUnpackingTool::updateConfiguration() { using namespace TrigConf; const ThresholdConfig* thresholdConfig = m_configSvc->thresholdConfig(); for ( TriggerThreshold * th : thresholdConfig->getThresholdVector( L1DataDef::MUON ) ) { diff --git a/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.h index ffff9e571f8ca58f88ed4be04cc8992b5a6baff0..fa972de7236edaa11af8d32a97c1ceb495f792f1 100644 --- a/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/MURoIsUnpackingTool.h @@ -31,7 +31,7 @@ class MURoIsUnpackingTool : public RoIsUnpackingToolBase const IInterface* parent ); virtual StatusCode initialize() override; - virtual StatusCode updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) override; + virtual StatusCode updateConfiguration() override; virtual StatusCode unpack(const EventContext& ctx, const ROIB::RoIBResult& roib, const HLT::IDSet& activeChains) const override; diff --git a/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.cxx index d32fdc1cdb50d390fb13141a522fb4a08763d7d0..c10bb256d9d741b5b8e9af0ce114fd0e6e36e2d5 100644 --- a/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.cxx @@ -30,7 +30,7 @@ StatusCode RerunRoIsUnpackingTool::finalize() { return StatusCode::SUCCESS; } -StatusCode RerunRoIsUnpackingTool::updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) { +StatusCode RerunRoIsUnpackingTool::updateConfiguration() { return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.h index a85ba5039916ec0f21ec5924478ea7fdbe24f412..bb8d84c5c944b456c75270a9845d44dcbcb4f724 100644 --- a/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/RerunRoIsUnpackingTool.h @@ -33,7 +33,7 @@ class RerunRoIsUnpackingTool : public RoIsUnpackingToolBase virtual ~RerunRoIsUnpackingTool(); virtual StatusCode initialize() override; virtual StatusCode finalize() override; - virtual StatusCode updateConfiguration(const IRoIsUnpackingTool::SeedingMap&) override; + virtual StatusCode updateConfiguration() override; StatusCode unpack( const EventContext& ctx, const ROIB::RoIBResult& roib, diff --git a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx index 0961e7c3d48b0d89e4a9303c513fb10fd87d9222..778854e79678d6fcdaf5ab46ec4821ee9aed94de 100644 --- a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.cxx @@ -48,42 +48,6 @@ StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const std:: } return StatusCode::SUCCESS; } -StatusCode RoIsUnpackingToolBase::decodeMapping( std::function< bool(const TrigConf::TriggerThreshold*)> filter, const TrigConf::ItemContainer& l1Items, const IRoIsUnpackingTool::SeedingMap& seeding ) { - for ( auto chainItemPair: seeding) { - std::string chainName = chainItemPair.first; - std::string itemName = chainItemPair.second; - auto itemsIterator = l1Items.get<TrigConf::tag_name_hash>().find(itemName); - - if ( itemsIterator != l1Items.get<TrigConf::tag_name_hash>().end() ) { - - const TrigConf::TriggerItem* item = *itemsIterator; - const TrigConf::TriggerItemNode* node = item->topNode(); - std::vector<TrigConf::TriggerThreshold*> itemThresholds; - node->getAllThresholds(itemThresholds); - const int thresholdCount = itemThresholds.size(); - ATH_MSG_DEBUG( "Item " << item->name() << " with thresholds " << thresholdCount); - int prefix = -1; - for ( const TrigConf::TriggerThreshold* th: itemThresholds ) { - prefix++; - if ( filter(th) ) { - m_thresholdToChainMapping[HLT::Identifier(th->name())].push_back( HLT::Identifier(chainName) ); - ATH_MSG_DEBUG( "Associating " << chainName << " with threshold " << th->name() ); - if ( thresholdCount > 1 ) { - std::string legName = "000_" + chainName; - const std::string ps = std::to_string(prefix); - legName.replace(3-ps.size(), ps.size(), ps ); - m_thresholdToChainMapping[HLT::Identifier(th->name())].push_back( HLT::Identifier(legName) ); - ATH_MSG_INFO( "Associating " << legName << " with threshold " << th->name() ); - } - } - } - } else { - // we may wish to change that to ERROR at some point - ATH_MSG_WARNING( "Could not find item: " << itemName << " that is used in seeding"); - } - } - return StatusCode::SUCCESS; -} void RoIsUnpackingToolBase::addChainsToDecision( HLT::Identifier thresholdId, TrigCompositeUtils::Decision* d, diff --git a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.h b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.h index aeeb3c601e330bb632b5ea09c2c67521a2559ca3..0028225cfe1280ed5e59e8649336418b59ce720c 100644 --- a/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.h +++ b/Trigger/TrigSteer/L1Decoder/src/RoIsUnpackingToolBase.h @@ -36,7 +36,7 @@ public: virtual StatusCode initialize() override; - virtual StatusCode updateConfiguration( const IRoIsUnpackingTool::SeedingMap& /*seeding*/ ) override { return StatusCode::SUCCESS; } + virtual StatusCode updateConfiguration( ) override { return StatusCode::SUCCESS; } virtual StatusCode unpack(const EventContext& /*ctx*/, const ROIB::RoIBResult& /*roib*/, @@ -49,10 +49,6 @@ protected: SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> m_decisionsKey{ this, "Decisions", "RoIDecisions", "Decisions for each RoI"}; - Gaudi::Property<std::vector<std::string>> m_thresholdToChainProperty{ - this, "ThresholdToChainMapping", {}, "Mapping from the threshold name to chain in the form: " - "'EM3 : HLT_e5', 'EM3 : HLT_e5tight', ..., ( note spaces ), if absent, the L1 item -> HLT chain seeding relation is used to find the threshold"}; - SG::ReadHandleKey<TrigConf::HLTMenu> m_HLTMenuKey{this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu"}; @@ -61,10 +57,9 @@ protected: std::map<HLT::Identifier, HLT::IDVec> m_thresholdToChainMapping; /** - * decodes mapping from L1 item -> to HLT chain to find out which threshold seeds which chain - * Threshold have to pass the selection of the filter (i.e. the filter should return true for the threshold to seed a chain) + * Fills mapping from L1 threshold -> to HLT chain + * @arg filter is a function that, using the threshold name defines if this decoder instance should take care of this threshold **/ - StatusCode decodeMapping( std::function< bool(const TrigConf::TriggerThreshold*)> filter, const TrigConf::ItemContainer& l1Items, const IRoIsUnpackingTool::SeedingMap& seeding ); StatusCode decodeMapping( std::function< bool(const std::string&)> filter ) ; diff --git a/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.cxx b/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.cxx index 2a3b8bcf89f1247bde4c93519b26af21f6d04a47..a724ef690f55875aa907aa61e0f1c076f53a5925 100644 --- a/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.cxx +++ b/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.cxx @@ -49,7 +49,7 @@ StatusCode TAURoIsUnpackingTool::start() { } -StatusCode TAURoIsUnpackingTool::updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) { +StatusCode TAURoIsUnpackingTool::updateConfiguration() { using namespace TrigConf; m_tauThresholds.clear(); diff --git a/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h b/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h index 8d1215c5a1b3625cf88f21fe9d74502540fad8a6..2e4c1d16a1b556690fe8c8c6ed388adb918b0461 100644 --- a/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h +++ b/Trigger/TrigSteer/L1Decoder/src/TAURoIsUnpackingTool.h @@ -34,7 +34,7 @@ public: const HLT::IDSet& activeChains) const override; virtual StatusCode initialize() override; - virtual StatusCode updateConfiguration( const IRoIsUnpackingTool::SeedingMap& ) override; + virtual StatusCode updateConfiguration() override; virtual StatusCode finalize() override; virtual StatusCode start() override; private: diff --git a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt index 342f56cc64e6b5892af654ea07b441a4e10abbad..a0d1a75e26cc854345f6be7136e33a2a94f74b21 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt +++ b/Trigger/TrigValidation/TrigUpgradeTest/CMakeLists.txt @@ -50,9 +50,9 @@ function( _add_test name ) endfunction( _add_test ) -#_add_test( emu_l1_decoding POST_EXEC_SCRIPT nopost.sh ) # should be moved to the L1Decoder package -#_add_test( emu_scaling_CF EXTRA_PATTERNS "-s TrigSignatureMoniMT.*INFO HLT_.*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*") # should be moved to TriggerMenuMT -#_add_test( emu_step_processing EXTRA_PATTERNS "-s TrigSignatureMoniMT.*INFO HLT_.*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*") # should be moved to TriggerMenuMT +_add_test( emu_l1_decoding POST_EXEC_SCRIPT nopost.sh ) # should be moved to the L1Decoder package +_add_test( emu_scaling_CF EXTRA_PATTERNS "-s TrigSignatureMoniMT.*INFO HLT_.*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*") # should be moved to TriggerMenuMT +_add_test( emu_step_processing EXTRA_PATTERNS "-s TrigSignatureMoniMT.*INFO HLT_.*|TriggerSummaryStep.* chains passed:|TriggerSummaryStep.*+++ HLT_.*") # should be moved to TriggerMenuMT # Unit tests of the test scripts atlas_add_test( flake8_test_dir diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py b/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py index c930765f16fa1fcdef74a0aa77739c43f1cc26fe..3a7e9a15cc7a4e7d8d7a56f6b1d990922aa2d42d 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/EmuStepProcessingConfig.py @@ -201,9 +201,7 @@ def generateL1DecoderAndChains(): HLTChains += CombChains - # this is a temporary hack to include new test chains - from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import getOverallL1item - EnabledChainNamesToCTP = dict([ (c.name, getOverallL1item(c.name)) for c in HLTChains]) + ########################## L1 ################################################# @@ -211,23 +209,18 @@ def generateL1DecoderAndChains(): l1Decoder = L1Decoder( RoIBResult="" ) l1Decoder.prescaler.EventInfo="" - l1Decoder.ChainToCTPMapping = EnabledChainNamesToCTP l1Decoder.L1DecoderSummaryKey = "L1DecoderSummary" ctpUnpacker = CTPUnpackingEmulationTool( ForceEnableAllChains=False , InputFilename="ctp.dat" ) l1Decoder.ctpUnpacker = ctpUnpacker emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM", ThresholdPrefix="EM" ) - emUnpacker.ThresholdToChainMapping = thresholdToChains( ElChains ) + [ m for m in thresholdToChains( CombChains ) if "EM" in m] #EnabledElChains + EnabledElComboChains emUnpacker.Decisions="L1EM" - log.debug("EMRoIsUnpackingTool enables chians:") - log.debug(emUnpacker.ThresholdToChainMapping) + muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", InputFilename="l1muroi.dat", OutputTrigRoIs="L1MURoIs", Decisions="L1MU", ThresholdPrefix="MU" ) - muUnpacker.ThresholdToChainMapping = thresholdToChains( MuChains ) + [ m for m in thresholdToChains( CombChains ) if "MU" in m] #EnabledMuChains + EnabledMuComboChains muUnpacker.Decisions="L1MU" - log.debug("MURoIsUnpackingTool enables chians:") - log.debug(muUnpacker.ThresholdToChainMapping) + l1Decoder.roiUnpackers = [emUnpacker, muUnpacker] diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py index b5fb45d15009fd235bd0eacead70c549f7ff10ce..a7f55a9e0f8ec9d34bff806dccf6bb16bc641367 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/TestUtils.py @@ -12,30 +12,9 @@ def writeEmulationFiles(data): # Testing menu used in the L1 decoders class MenuTest(object): + pass + - CTPToChainMapping = {"HLT_e3_etcut": "L1_EM3", - "HLT_e5_etcut": "L1_EM3", - "HLT_g5_etcut": "L1_EM3", - "HLT_e7_etcut": "L1_EM7", - "HLT_mu6idperf": "L1_MU6", - "HLT_mu6": "L1_MU6", - "HLT_mu20": "L1_MU20", - "HLT_xs20": "L1_EM7", - "HLT_2e3_etcut": "L1_2EM3", - "HLT_e3e5_etcut":"L1_2EM3", - "HLT_2mu6": "L1_2MU4", - "HLT_e15mu24": "L1_EM7_MU15", - "HLT_xe10": "L1_XE10", - "HLT_te15": "L1_TE15.0ETA24", - "HLT_j85": "L1_J20", - "HLT_j60": "L1_J20", - "HLT_j35_gsc45_boffperf_split" : "L1_J20", - "HLT_j35_gsc45_bmv2c1070_split" : "L1_J20", - "HLT_j35_gsc45_bmv2c1070" : "L1_J20" - } - -def applyMenu(l1decoder): - l1decoder.ChainToCTPMapping = MenuTest.CTPToChainMapping from L1Decoder.L1DecoderConf import L1Decoder # L1 emulation for RDO @@ -65,12 +44,6 @@ class L1EmulationTest(L1Decoder): self.ctpUnpacker = ctpUnpacker self += ctpUnpacker - self.ChainToCTPMapping = {'HLT_mu20' : 'L1_MU8', - 'HLT_mu81step' : 'L1_MU8', - 'HLT_mu8' : 'L1_MU8', - 'HLT_e20' : 'L1_EM12', - 'HLT_e8' : 'L1_EM7', - 'HLT_mu8_e8' : 'L1_EM3_MU6'} # EM unpacker if TriggerFlags.doID() or TriggerFlags.doCalo(): @@ -78,9 +51,6 @@ class L1EmulationTest(L1Decoder): Decisions = "EMRoIDecisions", OutputTrigRoIs = "EMRoIs", OutputLevel = self.getDefaultProperty("OutputLevel")) - emUnpacker.ThresholdToChainMapping = ['EM7 : HLT_e20', - 'EM7 : HLT_e8', - 'EM7 : HLT_mu8_e8'] self.roiUnpackers += [emUnpacker] print emUnpacker @@ -91,10 +61,6 @@ class L1EmulationTest(L1Decoder): Decisions = "MURoIDecisions", OutputTrigRoIs = "MURoIs", OutputLevel=self.getDefaultProperty("OutputLevel")) - muUnpacker.ThresholdToChainMapping = ['MU10 : HLT_mu20', - 'MU6 : HLT_mu81step', - 'MU6 : HLT_mu8', - 'MU6 : HLT_mu8_e8'] self.roiUnpackers += [muUnpacker] self.L1DecoderSummaryKey = "L1DecoderSummary" @@ -104,7 +70,7 @@ class L1EmulationTest(L1Decoder): chainsCounter = 0 -def makeChain( name, L1Thresholds, ChainSteps, Streams="physics:Main", Groups=[] ): +def makeChain( name, L1Thresholds, ChainSteps, Streams="physics:Main", Groups=["RATE:TestRateGroup", "BW:TestBW"] ): """ In addition to making the chain object fills the flags that are used to generate MnuCOnfig JSON file """ diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py index 271049f220c8079ed91315d57e7461bd46336f69..aae95adaf9a7eda5248caf4f93623c23eb416af3 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuL1DecodingTest.py @@ -55,12 +55,9 @@ l1Decoder.ctpUnpacker = ctpUnpacker emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", Decisions = "EMRoIDecisions") -emUnpacker.ThresholdToChainMapping = ["EM3 : HLT_e3", "EM3 : HLT_g5", "EM7 : HLT_e7", "EM15 : HLT_e15mu4" ] - muUnpacker = RoIsUnpackingEmulationTool("MURoIsUnpackingTool", Decisions = "MURoIDecisions") -muUnpacker.ThresholdToChainMapping = ["MU6 : HLT_mu6", "MU6 : HLT_mu6idperf", "MU4 : HLT_e15mu4"] # do not know yet how to configure the services for it l1Decoder.roiUnpackers = [emUnpacker] @@ -94,13 +91,10 @@ makeHLTTree( triggerConfigHLT=TriggerConfigHLT ) from TriggerMenuMT.HLTMenuConfig.Menu.HLTMenuJSON import generateJSON generateJSON() -# once MR unifying this setup in replce by an import from config svc -from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, HLTConfigSvc, findFileInXMLPATH -svcMgr += HLTConfigSvc() -hltJsonFile = TriggerFlags.inputHLTconfigFile().replace(".xml",".json").replace("HLTconfig","HLTmenu") -hltJsonFile = findFileInXMLPATH(hltJsonFile) -svcMgr.HLTConfigSvc.JsonFileName = hltJsonFile -log.info("Configured HLTConfigSvc with InputType='file' and JsonFileName=%s" % hltJsonFile) +from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc +from AthenaCommon.AppMgr import ServiceMgr +ServiceMgr += getHLTConfigSvc() + print "topSequence dump:", topSequence # diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuScalingCFTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuScalingCFTest.py index 2894e6e48691b818b4717e2388b82ff2e9a1cd80..bd9216290c851d0b0b7a25f853a348b33354fd62 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuScalingCFTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuScalingCFTest.py @@ -92,9 +92,6 @@ def process(): writeEmulationFiles(data) - # this is a temporary hack to include new test chains - from TriggerMenuMT.HLTMenuConfig.Menu.DictFromChainName import getOverallL1item - EnabledChainNamesToCTP = dict([ (c.name, getOverallL1item(c.name)) for c in HLTChains]) ########################## L1 ################################################# @@ -102,18 +99,14 @@ def process(): l1Decoder = L1Decoder( RoIBResult="" ) l1Decoder.prescaler.EventInfo="" - l1Decoder.ChainToCTPMapping = EnabledChainNamesToCTP l1Decoder.L1DecoderSummaryKey = "L1DecoderSummary" ctpUnpacker = CTPUnpackingEmulationTool( ForceEnableAllChains=False , InputFilename="ctp.dat" ) l1Decoder.ctpUnpacker = ctpUnpacker - emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM" ) + emUnpacker = RoIsUnpackingEmulationTool("EMRoIsUnpackingTool", InputFilename="l1emroi.dat", OutputTrigRoIs="L1EMRoIs", Decisions="L1EM", ThresholdPrefix="EM" ) from TrigUpgradeTest.EmuStepProcessingConfig import thresholdToChains - emUnpacker.ThresholdToChainMapping = thresholdToChains( HLTChains ) emUnpacker.Decisions="L1EM" - log.debug("EMRoIsUnpackingTool enables chians:") - log.debug(emUnpacker.ThresholdToChainMapping) l1Decoder.roiUnpackers = [emUnpacker] @@ -137,19 +130,12 @@ def process(): theApp.EvtMax = nevents - from TriggerJobOpts.TriggerFlags import TriggerFlags - TriggerFlags.outputHLTconfigFile = TriggerFlags.outputHLTconfigFile().replace('config', 'menu') from TriggerMenuMT.HLTMenuConfig.Menu.HLTMenuJSON import generateJSON generateJSON() - # once MR unifying this setup in replce by an import from config svc - from AthenaCommon.AppMgr import ServiceMgr as svcMgr - from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, HLTConfigSvc, findFileInXMLPATH - svcMgr += HLTConfigSvc() - hltJsonFile = TriggerFlags.inputHLTconfigFile().replace(".xml",".json").replace("HLTconfig","HLTmenu") - hltJsonFile = findFileInXMLPATH(hltJsonFile) - svcMgr.HLTConfigSvc.JsonFileName = hltJsonFile - log.info("Configured HLTConfigSvc with InputType='file' and JsonFileName=%s" % hltJsonFile) + from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc + from AthenaCommon.AppMgr import ServiceMgr + ServiceMgr += getHLTConfigSvc() process() diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py index 8b04d5e577fc03c44eafe0466e13934e42a80f8b..4bf6695fd4321c83b198d61f08d85fe2018018e7 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py @@ -33,18 +33,11 @@ from TriggerMenuMT.HLTMenuConfig.Menu.TriggerConfigHLT import TriggerConfigHLT from TriggerMenuMT.HLTMenuConfig.Menu.HLTCFConfig import makeHLTTree makeHLTTree( triggerConfigHLT=TriggerConfigHLT ) -TriggerFlags.outputHLTconfigFile = TriggerFlags.outputHLTconfigFile().replace('config', 'menu') from TriggerMenuMT.HLTMenuConfig.Menu.HLTMenuJSON import generateJSON generateJSON() - -# once MR unifying this setup in replce by an import from config svc -from TrigConfigSvc.TrigConfigSvcConfig import LVL1ConfigSvc, HLTConfigSvc, findFileInXMLPATH -svcMgr += HLTConfigSvc() -hltJsonFile = TriggerFlags.inputHLTconfigFile().replace(".xml",".json").replace("HLTconfig","HLTmenu") -hltJsonFile = findFileInXMLPATH(hltJsonFile) -svcMgr.HLTConfigSvc.JsonFileName = hltJsonFile -log.info("Configured HLTConfigSvc with InputType='file' and JsonFileName=%s" % hltJsonFile) +from TrigConfigSvc.TrigConfigSvcCfg import getHLTConfigSvc +svcMgr += getHLTConfigSvc() print "EmuStepProcessing: dump top Sequence after CF/DF Tree build" diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py b/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py index 2030da6198f4f6d507df2f1a497326e3051d3807..dac47ba6e107f4830215bf660d601ff29d00e9b9 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/MinBias.py @@ -15,7 +15,6 @@ for viewAlg in viewAlgs: from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() -topSequence.L1Decoder.ChainToCTPMapping={"HLT_mbsptrk":"L1_RD0_FILLED"} topSequence += viewAlgs from TrigT2MinBias.TrigT2MinBiasConf import TrigCountSpacePointsMT, SPCountHypoAlgMT, SPCountHypoTool diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py index 98204412190cbe20ab2872c8fdb9c17efd60c7d0..f57142a039213aa14631e9a83d3c60bc57f730be 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/simpleJetJob.py @@ -20,13 +20,6 @@ if TriggerFlags.doCalo: # menu items - CTPToChainMapping = { - "HLT_j85": "L1_J20" , - "HLT_j45" : "L1_J20" - } - testChains =[x for x, y in CTPToChainMapping.items()] - topSequence.L1Decoder.ChainToCTPMapping = CTPToChainMapping - print testChains # get L1 decisions for unpack in topSequence.L1Decoder.roiUnpackers: diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py index 20b2586e15649d53fa86157d1a4afe17aea89219..b1378325533134d495e9b0be1eae7c84f26df2c9 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/share/testHLT_MT.py @@ -394,7 +394,6 @@ if opt.doL1Unpacking: from L1Decoder.L1DecoderConfig import L1Decoder topSequence += RoIBResultByteStreamDecoderAlg() # creates RoIBResult (input for L1Decoder) from ByteStream topSequence += L1Decoder("L1Decoder") - #topSequence.L1Decoder.ChainToCTPMapping = MenuTest.CTPToChainMapping elif opt.doL1Sim: from L1Decoder.L1DecoderConfig import L1Decoder topSequence += L1Decoder("L1Decoder") diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py index 1faa4ed918b0982ef9637b6a57d8b3dc3e24f39c..db8e8fe7e91493d0d81fa2ccbf40ddabc5855f3e 100644 --- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py +++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py @@ -180,7 +180,6 @@ def triggerMonitoringCfg(flags, hypos, filters, l1Decoder): #mon.FinalChainStep = allChains mon.L1Decisions = l1Decoder.getProperties()['L1DecoderSummaryKey'] if l1Decoder.getProperties()['L1DecoderSummaryKey'] != '<no value>' else l1Decoder.getDefaultProperty('L1DecoderSummary') - allChains.update( l1Decoder.ChainToCTPMapping.keys() ) from DecisionHandling.DecisionHandlingConfig import setupFilterMonitoring [ [ setupFilterMonitoring( alg ) for alg in algs ] for algs in filters.values() ] @@ -331,11 +330,6 @@ def triggerMergeViewsAndAddMissingEDMCfg( edmSet, hypos, viewMakers, decObj ): return alg -def setupL1DecoderFromMenu( flags, l1Decoder ): - """ Post setup of the L1Decoder, once approved, it should be moved to L1DecoderCfg function """ - - from TriggerJobOpts.MenuConfigFlags import MenuUtils - l1Decoder.ChainToCTPMapping = MenuUtils.toCTPSeedingDict( flags ) def triggerRunCfg( flags, menu=None ): @@ -358,7 +352,6 @@ def triggerRunCfg( flags, menu=None ): # necessary ingreedient is list of mappings from L1 item to chain # and item to threshold (the later can be maybe extracted from L1 config file) l1DecoderAcc, l1DecoderAlg = L1DecoderCfg( flags ) - setupL1DecoderFromMenu( flags, l1DecoderAlg ) acc.merge( l1DecoderAcc ) diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py index 6227ffdce71719aae4cecdb555569bbfef47a1c0..6030f5c69e6724daa9ef6aaf4e01f004183c781d 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py @@ -144,10 +144,6 @@ def makeHLTTree(newJO=False, triggerConfigHLT = None): # take L1Decoder out of topSeq topSequence.remove( l1decoder ) - # set CTP chains before creating the full tree (and the monitor) - EnabledChainNamesToCTP = dict([ (c["chainName"], c["L1item"]) for c in triggerConfigHLT.dictsList()]) - l1decoder[0].ChainToCTPMapping = EnabledChainNamesToCTP - # main HLT top sequence hltTop = seqOR("HLTTop") diff --git a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py index 8d781bd008f1b1ec507ff14d042c834fdc10f9f6..34ba3fdcebea9d6019dd8e0d5a13b589dc50e314 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/scripts/generateMenuMT.py @@ -25,11 +25,8 @@ TriggerFlags.triggerMenuSetup = "LS2_v1" from TriggerMenuMT.HLTMenuConfig.Menu.GenerateMenuMT import GenerateMenuMT g = GenerateMenuMT() -#allChainConfigs = g.generateChainConfigs() -allChainConfigs = g.getChainsFromMenu() -EnabledChainNamesToCTP = dict([ (c[0], c[1]) for c in allChainConfigs]) -topSequence.L1Decoder.ChainToCTPMapping = EnabledChainNamesToCTP +