25 std::map<unsigned, LVL1CTP::Lvl1Item>& itemsCache,
26 std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName)
const {
27 itemsByName.reserve( itemsByName.size() + itemsCache.size() );
28 for (
auto& [ctpid, item] : itemsCache ) {
29 ATH_MSG_VERBOSE(
"Unpacking bits for item: " << ctpid <<
" " << item.name());
30 const bool passBP =
result.isPassedBeforePrescale(ctpid);
31 const bool passAP =
result.isPassedAfterPrescale(ctpid);
32 const bool passAV =
result.isPassedAfterVeto(ctpid);
34 passBP, passAP, passAV,
35 item.prescaleFactor());
36 item = std::move (itemNew);
37 itemsByName[item.name()] = &item;
39 return StatusCode::SUCCESS;
44 std::map<unsigned, HLT::Chain>& cache,
45 std::unordered_map<std::string, const HLT::Chain*>& output)
const {
47 if( serialized_chains.empty() ) {
49 return StatusCode::FAILURE;
52 output.reserve( output.size() + cache.size() );
54 std::vector<uint32_t>::const_iterator rawIt = serialized_chains.begin();
56 for ( ; rawIt != serialized_chains.end(); ++rawIt ) {
61 auto cacheIt = cache.find(cntr);
62 if ( cacheIt == cache.end() ) {
63 ATH_MSG_WARNING(
"Missing chain of counter in the configuration: " << cntr);
64 return StatusCode::FAILURE;
66 cacheIt->second.reset();
67 cacheIt->second.deserialize(*rawIt);
68 output[cacheIt->second.getChainName()] = &cacheIt->second;
72 return StatusCode::SUCCESS;
76 std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName,
77 std::map<CTPID, LVL1CTP::Lvl1Item>& itemsCache,
78 std::unordered_map<std::string, const HLT::Chain*>& l2chainsByName,
79 std::map<CHAIN_COUNTER, HLT::Chain>& l2chainsCache,
80 std::unordered_map<std::string, const HLT::Chain*>& efchainsByName,
81 std::map<CHAIN_COUNTER, HLT::Chain>& efchainsCache,
100 if (!unpackHLT)
return StatusCode::SUCCESS;
104 l2chainsByName.clear();
110 if (
unpackChains(l2_serialized_chains, l2chainsCache, l2chainsByName).isFailure() ) {
117 efchainsByName.clear();
119 ATH_MSG_DEBUG(ef_serialized_chains.size() <<
" EF/HLT chains");
121 if ( ! ef_serialized_chains.empty()) {
122 if (
unpackChains(ef_serialized_chains, efchainsCache, efchainsByName).isFailure() ) {
129 return StatusCode::SUCCESS;
142 return StatusCode::FAILURE;
153 if ( ! unpacking_status ) {
155 msg() << MSG::DEBUG <<
"EF/HLT Navigation unpacking failed";
158 msg() <<
", falling back to L2 Navigation of size: "
165 if ( ! unpacking_status ) {
172 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
static unsigned int inquireChainCounter(uint32_t chainWord)
unpack chain counter from the serialized word
const std::vector< uint32_t > & getNavigationResult() const
retrieve the sub-payloads (can be used to retrieve/write data)
HLTLevel getHLTLevel() const
hlt level (L2 or EF)
const std::vector< uint32_t > & getChainResult() const
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
bool deserialize(const std::vector< uint32_t > &input)
virtual bool deserialize(const std::vector< uint32_t > &)=0
Property holding a SG store/key/clid from which a ReadHandle is made.
const_pointer_type cptr()
Dereference the pointer.
The TrigDecision is an object which merges trigger informations from various levels.
const HLT::HLTResult & getEFResult() const
const HLT::HLTResult & getL2Result() const
const LVL1CTP::Lvl1Result & getL1Result() const
virtual StatusCode unpackDecision(const EventContext &, std::unordered_map< std::string, const LVL1CTP::Lvl1Item * > &, std::map< CTPID, LVL1CTP::Lvl1Item > &, std::unordered_map< std::string, const HLT::Chain * > &, std::map< CHAIN_COUNTER, HLT::Chain > &, std::unordered_map< std::string, const HLT::Chain * > &, std::map< CHAIN_COUNTER, HLT::Chain > &, char &, bool) const override
virtual StatusCode unpackNavigation(const EventContext &, HLT::TrigNavStructure *) const override
virtual ~DecisionUnpackerAthena()
StatusCode unpackItems(const LVL1CTP::Lvl1Result &result, std::map< CTPID, LVL1CTP::Lvl1Item > &, std::unordered_map< std::string, const LVL1CTP::Lvl1Item * > &) const
const SG::ReadHandleKey< TrigDec::TrigDecision > * m_deckey
Key of the trigger decision object in the event.
StatusCode unpackChains(const std::vector< uint32_t > &serialized_chains, std::map< unsigned, HLT::Chain > &cache, std::unordered_map< std::string, const HLT::Chain * > &output) const
DecisionUnpackerAthena(const SG::ReadHandleKey< TrigDec::TrigDecision > *olddeckey)
bool msgLvl(const MSG::Level lvl) const
The common trigger namespace for trigger analysis tools.