diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.h b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerBitsMakerTool.h similarity index 95% rename from Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.h rename to Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerBitsMakerTool.h index 1530d914190bd40a618a7fded8550246ea2ca8d6..79ff3293cdf2df219efe09f852558d23434fcbb2 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.h +++ b/Trigger/TrigSteer/TrigOutputHandling/TrigOutputHandling/TriggerBitsMakerTool.h @@ -20,7 +20,8 @@ public: virtual ~TriggerBitsMakerTool() override; virtual StatusCode fill( HLT::HLTResultMT& resultToFill ) const override; - + StatusCode fill( std::vector<uint32_t>& place ) const; + virtual StatusCode initialize() override; virtual StatusCode finalize() override; diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.cxx index 24c482f166447daa1eb95ccb377919c61d2dabb0..d67dfee3f061ac37ddce184d00f3e147a377e479 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.cxx @@ -27,6 +27,8 @@ StatusCode HLTResultMTMakerAlg::execute_r(const EventContext& context) const { for ( auto& maker: m_makerTools ) { ATH_CHECK( maker->fill( *hltResult ) ); } + + time.stop(); // // monitoring diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.h b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.h index 551cfba4b953820704e6b32a9643458cc1c48b80..d79ed5b752cc50f31d35e668f6a8e00d5adab68d 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.h +++ b/Trigger/TrigSteer/TrigOutputHandling/src/HLTResultMTMakerAlg.h @@ -11,6 +11,7 @@ #include "TrigOutputHandling/HLTResultMTMakerTool.h" + /** * @class HLTResultMTMakerAlg * @brief creates HLTResult and calls tools to fill the content, @@ -29,6 +30,7 @@ private: SG::WriteHandleKey<HLT::HLTResultMT> m_resultKey { this, "ResultKey", "HLTResultMT", "Key of the output object" }; ToolHandleArray<HLTResultMTMakerTool> m_makerTools{ this, "MakerTools", {}, "set of tools that fill content of the HLTResultMT" }; ToolHandle<GenericMonitoringTool> m_monTool { this, "MonTool", "", "Monitor" }; + }; #endif // TRIGOUTPUTHANDLING_HLTRESULMTMAKERALG_H diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.cxx index dd0e48e2e38cb74174e0dc80f3d8888c00e5e458..9be7e6e957d977004dedb51ae50dd3ffadc7d4e4 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/TriggerBitsMakerTool.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */ #include "DecisionHandling/HLTIdentifier.h" -#include "TriggerBitsMakerTool.h" +#include "TrigOutputHandling/TriggerBitsMakerTool.h" TriggerBitsMakerTool::TriggerBitsMakerTool(const std::string& type, const std::string& name, const IInterface* parent) : base_class(type, name, parent){} @@ -22,10 +22,18 @@ StatusCode TriggerBitsMakerTool::initialize() { return StatusCode::SUCCESS; } + StatusCode TriggerBitsMakerTool::fill( HLT::HLTResultMT& resultToFill ) const { - auto chainsHandle = SG::makeHandle( m_finalChainDecisions ); - std::vector<uint32_t> bits; + ATH_CHECK( fill( bits ) ); + resultToFill.setHltBits( bits ); + return StatusCode::SUCCESS; +} + + + +StatusCode TriggerBitsMakerTool::fill( std::vector<uint32_t>& bits ) const { + auto chainsHandle = SG::makeHandle( m_finalChainDecisions ); for ( TrigCompositeUtils::DecisionID chain: TrigCompositeUtils::decisionIDs( chainsHandle->at( 0 )) ) { auto mappingIter = m_mapping.find( chain ); @@ -42,7 +50,7 @@ StatusCode TriggerBitsMakerTool::fill( HLT::HLTResultMT& resultToFill ) const { bits[word] |= mask; } - resultToFill.setHltBits( bits ); + if ( msgLvl( MSG::DEBUG ) ) { ATH_MSG_DEBUG("Prepared " << bits.size() << " words with trigger bits"); for ( auto w: bits ) @@ -53,6 +61,7 @@ StatusCode TriggerBitsMakerTool::fill( HLT::HLTResultMT& resultToFill ) const { } + StatusCode TriggerBitsMakerTool::finalize() { return StatusCode::SUCCESS; } diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx index fb8e7791fefd0591f7c56582ddcaa21ced58ceb1..016c5d993f9480b553dd4c916d974dbfe25dadc9 100644 --- a/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx +++ b/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx @@ -2,7 +2,7 @@ #include "../StreamTagMakerTool.h" #include "../HLTResultMTMakerAlg.h" #include "../DecisionSummaryMakerAlg.h" -#include "../TriggerBitsMakerTool.h" +#include "TrigOutputHandling/TriggerBitsMakerTool.h" #include "../TriggerEDMSerialiserTool.h"