diff --git a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TimeBurner.cxx b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TimeBurner.cxx index d051622c4327a41b37c45ee6562631f766709271..36a838a74f300b690fc2c7caae0a7a70a182fb2b 100644 --- a/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TimeBurner.cxx +++ b/Trigger/TrigAlgorithms/TrigGenericAlgs/src/TimeBurner.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ #include "TimeBurner.h" @@ -10,7 +10,9 @@ TimeBurner::TimeBurner(const std::string& name, ISvcLocator* pSvcLocator) : ::HypoBase(name, pSvcLocator) {} -StatusCode TimeBurner::execute(const EventContext& /*eventContext*/) const { +StatusCode TimeBurner::execute(const EventContext& eventContext) const { + // Create a reject decision + TrigCompositeUtils::createAndStore(decisionOutput(), eventContext); std::this_thread::sleep_for(std::chrono::milliseconds(m_sleepTimeMillisec.value())); diff --git a/Trigger/TrigSteer/TrigHLTResultByteStream/src/HLTResultMTByteStreamCnv.cxx b/Trigger/TrigSteer/TrigHLTResultByteStream/src/HLTResultMTByteStreamCnv.cxx index 87d6e42e300ae7a821108b39f83ea6b2d97197fb..c2b04f788e92d9c245f19a8db8cbc84dee72cba6 100644 --- a/Trigger/TrigSteer/TrigHLTResultByteStream/src/HLTResultMTByteStreamCnv.cxx +++ b/Trigger/TrigSteer/TrigHLTResultByteStream/src/HLTResultMTByteStreamCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // Trigger includes @@ -20,7 +20,7 @@ #include "eformat/Issue.h" #include "eformat/SourceIdentifier.h" -// Local definitions +// Local constants namespace { /** * ROBFragment module ID of the HLT result which contains all Trigger EDM collections. Can be considered to be made @@ -34,6 +34,22 @@ namespace { constexpr uint16_t hltRodMinorVersion = 0x0100; } +// Local helper methods +namespace { + /// Check if a stream tag has the given type + bool isStreamTagType(const eformat::helper::StreamTag& st, const eformat::TagType type) { + return eformat::helper::string_to_tagtype(st.type) == type; + } + /// Check if a stream tag has the debug type + bool isDebugStreamTag(const eformat::helper::StreamTag& st) { + return isStreamTagType(st, eformat::TagType::DEBUG_TAG); + } + /// Check if a stream tag has the unknown type + bool isUnknownStreamTag(const eformat::helper::StreamTag& st) { + return isStreamTagType(st, eformat::TagType::UNKNOWN_TAG); + } +} + // ============================================================================= // Standard constructor // ============================================================================= @@ -109,10 +125,12 @@ StatusCode HLT::HLTResultMTByteStreamCnv::createRep(DataObject* pObj, IOpaqueAdd // Read the stream tags to check for debug stream tag and decide which HLT ROBFragments to write out std::set<eformat::helper::SourceIdentifier> resultIdsToWrite; bool debugEvent=false; - auto isDebugStreamTag = [](const eformat::helper::StreamTag& st){ - return eformat::helper::string_to_tagtype(st.type) == eformat::TagType::DEBUG_TAG; - }; + std::string unknownTypeStreams; for (const eformat::helper::StreamTag& st : hltResult->getStreamTags()) { + // Flag events with unknown stream type + if (isUnknownStreamTag(st)) { + unknownTypeStreams += st.type + "_" + st.name + " "; + } // Flag debug stream events if (isDebugStreamTag(st)) debugEvent=true; // In case of full event building, add the full result ID @@ -127,6 +145,11 @@ StatusCode HLT::HLTResultMTByteStreamCnv::createRep(DataObject* pObj, IOpaqueAdd resultIdsToWrite.insert(sid); } } + // Fail if the event is not already failed (debug stream) and unknown stream type was found + if (!debugEvent && !unknownTypeStreams.empty()) { + ATH_MSG_ERROR("Found stream tag(s) with unknown type: " << unknownTypeStreams); + return StatusCode::FAILURE; + } // If the event goes to the debug stream, remove all non-debug stream tags // and force full event building in all debug streams diff --git a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref index 002086587895e2392e2313166b621c40fe3f0f79..a671130a4777e1788eac9159c65130269dd984a3 100644 --- a/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref +++ b/Trigger/TrigValidation/TriggerTest/share/ref_data_v1Dev_build.ref @@ -2744,7 +2744,7 @@ HLT_tilecalib_laser_TilePEB_L1CALREQ2: stepFeatures: 0: 20 HLT_timeburner_L1All: - eventCount: 20 + eventCount: 0 HLT_unconvtrk120_isohpttrack_iaggrmedium_L1XE50: eventCount: 0 HLT_unconvtrk120_isohpttrack_imedium_L1XE50: diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/MonitorChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/MonitorChainConfiguration.py index 6ce48aba69fbadfaca448062414e0b493f8e397e..080de18c9a26f60a081bdd39a430d50ff57fa07d 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/MonitorChainConfiguration.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CalibCosmicMon/MonitorChainConfiguration.py @@ -1,4 +1,4 @@ -# 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 AthenaCommon.Logging import logging logging.getLogger().info("Importing %s",__name__) @@ -64,4 +64,4 @@ class MonitorChainConfiguration(ChainConfigurationBase): # TimeBurner configuration # -------------------- def getTimeBurnerStep(self): - return self.getStep(1,'TimeBurner',[TimeBurnerSequenceCfg], comboHypoCfg=None) + return self.getStep(1,'TimeBurner',[TimeBurnerSequenceCfg])