21 const std::vector< uint32_t >&
vec ) {
27 return ( ( ( word >> (
index % 32 ) ) & 0x1 ) != 0 );
41 std::map<unsigned, LVL1CTP::Lvl1Item>& itemsCache,
42 std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName)
const {
44 uint32_t L1SIZE = level1TriggerInfo.size()/3;
45 std::vector<uint32_t>::const_iterator begin, end;
47 begin = level1TriggerInfo.begin();
49 std::advance(end,L1SIZE);
50 std::vector<uint32_t> tbp(begin,end);
53 std::advance(end,L1SIZE);
54 std::vector<uint32_t> tap(begin,end);
57 std::advance(end,L1SIZE);
58 std::vector<uint32_t> tav(begin,end);
60 itemsByName.reserve( itemsByName.size() + itemsCache.size() );
61 for (
auto [ctpid, item] : itemsCache ) {
62 ATH_MSG_VERBOSE(
"Unpacking bits for item: " << ctpid <<
" " << item.name());
67 passBP, passAP, passAV,
68 item.prescaleFactor());
69 item = std::move (itemNew);
70 itemsByName[item.name()] = &item;
72 return StatusCode::SUCCESS;
77 std::map<unsigned, HLT::Chain>& cache,
78 std::unordered_map<std::string, const HLT::Chain*>& output)
const {
79 output.reserve( output.size() + cache.size() );
80 for(
auto& [cntr, chain] : cache){
93 chain.setDecisions(
true,
100 chain.setDecisions(
false,
106 output[chain.getChainName()] = &chain;
108 return StatusCode::SUCCESS;
112 const EventContext& ctx,
113 std::unordered_map<std::string, const LVL1CTP::Lvl1Item*>& itemsByName,
114 std::map<CTPID, LVL1CTP::Lvl1Item>& itemsCache,
115 std::unordered_map<std::string, const HLT::Chain*>& l2chainsByName,
116 std::map<CHAIN_COUNTER, HLT::Chain>& l2chainsCache,
117 std::unordered_map<std::string, const HLT::Chain*>& efchainsByName,
118 std::map<CHAIN_COUNTER, HLT::Chain>& efchainsCache,
126 const TriggerInfo* dec = eventInfo->trigger_info();
139 if (!unpackHLT)
return StatusCode::SUCCESS;
143 l2chainsByName.clear();
146 if (
unpackChains(level2TriggerInfo, l2chainsCache, l2chainsByName).isFailure() ) {
151 efchainsByName.clear();
154 if (
unpackChains(eventFilterInfo, efchainsCache, efchainsByName).isFailure() ) {
158 return StatusCode::SUCCESS;
163 ATH_MSG_WARNING(
"This is the EventInfo Unpacker, there is no Navigation available -- but someone seems to try to access features triggering a navi unpacking");
164 return StatusCode::SUCCESS;
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
std::vector< size_t > vec
bool get32BitDecision(unsigned int index, const std::vector< uint32_t > &vec)
This class contains trigger related information.
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual StatusCode unpackNavigation(const EventContext &, HLT::TrigNavStructure *) const override
const SG::ReadHandleKey< EventInfo > * m_eventInfoKey
DecisionUnpackerEventInfo(const SG::ReadHandleKey< EventInfo > *oldEventInfoKey)
StatusCode unpackItems(const std::vector< uint32_t > &level1TriggerInfo, std::map< CTPID, LVL1CTP::Lvl1Item > &itemsCache, std::unordered_map< std::string, const LVL1CTP::Lvl1Item * > &itemsByName) const
StatusCode unpackChains(const std::vector< uint32_t > &chainTriggerInfo, std::map< unsigned, HLT::Chain > &cache, std::unordered_map< std::string, const HLT::Chain * > &output) const
virtual ~DecisionUnpackerEventInfo()
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
This class contains trigger related information.
const std::vector< number_type > & eventFilterInfo() const
get event filter trigger info
const std::vector< number_type > & level1TriggerInfo() const
get level1 trigger info
const std::vector< number_type > & level2TriggerInfo() const
get level2 trigger info
The common trigger namespace for trigger analysis tools.