5#ifndef TRIGGER_DECISION_TOOL_CACHE_GLOBAL_MEMORY_H
6#define TRIGGER_DECISION_TOOL_CACHE_GLOBAL_MEMORY_H
22#include<unordered_map>
49#include "EventInfo/EventInfo.h"
85 const std::string& alias=
"",
108 if(cgm->unpackNavigation().isFailure()){
209 std::map<std::string, std::vector<std::string> >
m_groups;
210 std::map<std::string, std::vector<std::string> >
m_streams;
225 typedef std::unordered_map<std::string, const TrigConf::HLTChain*>
ChainHashMap_t;
236 virtual const void*
ptr()
const {
return nullptr;}
241 return lhs->
ptr() < rhs->
ptr(); }
#define ATH_MSG_WARNING(x)
Define macros for attributes used to control the static checker.
This class represents one chain of signatures, i.e.
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Property holding a SG store/key/clid from which a ReadHandle is made.
list of all HLT chains in a trigger menu
HLT chain configuration information.
virtual const void * ptr() const
std::set< iholder *, holder_comp > m_todel
char m_bgCode
the encoded bunchgroup information
std::recursive_mutex m_cgmMutex
R3 MT protection only against –threads > 1.
std::unordered_map< std::string, const HLT::Chain * > m_efchainsByName
L2 chains keyed by chain name (chainging every event)
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > * m_run3NavigationKeyPtr
Parent TDT's read handle key.
void setRun2NavigationKeyPtr(SG::ReadHandleKey< xAOD::TrigNavigation > *k)
size_t nChainGroups() const
StatusCode unpackNavigation()
unpacks HLT navigation structure (object access)
std::map< CTPID, LVL1CTP::Lvl1Item > m_itemsCache
cache of all CTP items possible (given configuration)
ChainHashMap_t m_mConfChains
map of conf chains
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > * getRun3NavigationKeyPtr() const
const LVL1CTP::Lvl1Item * item(const std::string &name) const
CTP item from given name.
SG::ReadHandleKey< TrigDec::TrigDecision > * m_oldDecisionKeyPtr
Parent TDT's read handle key.
bool m_decisionUnpacked
Was decision unpacked for this event?
const TrigConf::HLTChain * config_chain(const std::string &name) const
HLT config chain from given name.
bool assert_decision() const
checks if new event arrived with the decision Need to use before any call to CacheGlobalMemory.
const Trig::ChainGroup * getChainGroup(const std::vector< std::string > &triggerNames, TrigDefs::Group props) const
void setDecisionKeyPtr(SG::ReadHandleKey< xAOD::TrigDecision > *k)
const SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > & getRun3NavigationKey() const
std::unordered_map< std::string, const HLT::Chain * > m_l2chainsByName
L2 chains keyed by chain name (chainging every event)
const HLT::Chain * chain(const std::string &name) const
HLT chain object from given name (0 pointer returned if no match)
const TrigConf::ItemContainer * m_confItems
items configuration
const Trig::ChainGroup * createChainGroup(const std::vector< std::string > &patterns, const std::string &alias="", TrigDefs::Group props=TrigDefs::Group::Default) const
creates new chain group
bool m_navigationUnpacked
Was navigation unpacked for this event?
~CacheGlobalMemory()=default
void updateChainGroup(Trig::ChainGroup &chainGroup, TrigDefs::Group props=TrigDefs::Group::Default)
unpacks everything that belongs to a ChainGroup
std::map< CHAIN_COUNTER, HLT::Chain > m_efchainsCache
cache of all EF chains possible (given configuration)
StatusCode unpackDecision(const EventContext &ctx)
unpacks whole trigger decision for the event
void setStore(asg::EventStoreType *store)
Set the event store to be used by the object.
const TrigConf::HLTChainList * m_confChains
all chains configuration
std::map< std::string, std::vector< std::string > > m_groups
mapping from group to list of chains
std::unordered_map< std::string, const TrigConf::HLTChain * > ChainHashMap_t
std::map< std::string, std::vector< std::string > > m_streams
mapping from stream to list of chains
SG::ReadHandleKey< xAOD::TrigDecision > * m_decisionKeyPtr
Parent TDT's read handle key.
const HLT::TrigNavStructure * navigation() const
const TrigConf::TriggerItem * config_item(const std::string &name) const
CTP config item from given name.
HLT::TrigNavStructure * m_navigation
Navigation owned by CGM.
void update(const TrigConf::HLTChainList *confChains, const TrigConf::CTPConfig *ctp)
Updates configuration of the chain groups (i.e.
const asg::EventStoreType * m_store
Pointer to the event store in use.
SG::ReadHandleKey< xAOD::TrigNavigation > * m_run2NavigationKeyPtr
Parent TDT's read handle key.
const asg::EventStoreType * store() const
Get the event store that the object is using.
std::unique_ptr< IDecisionUnpacker > m_unpacker ATLAS_THREAD_SAFE
Trigger decision unpacker helper.
std::map< CHAIN_COUNTER, HLT::Chain > m_l2chainsCache
cache of all L2 chains possible (given configuration)
float item_prescale(int ctpid) const
Prescale for CPT item.
std::unordered_map< std::string, const LVL1CTP::Lvl1Item * > m_itemsByName
items keyed by configuration name (chainging every event)
CacheGlobalMemory()=default
void deleteAtTheEndOfEvent(T t) const
void navigation(HLT::TrigNavStructure *nav)
sets navigation object pointer
const std::map< std::string, std::vector< std::string > > & getStreams() const
SG::ReadHandleKey< EventInfo > * m_oldEventInfoKeyPtr
Parent TDT's read handle key.
void setRun3NavigationKeyPtr(SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > *k)
friend class DecisionAccess
void setOldDecisionKeyPtr(SG::ReadHandleKey< TrigDec::TrigDecision > *k)
void setOldEventInfoKeyPtr(SG::ReadHandleKey< EventInfo > *k)
void reset_decision()
invalidate previously unpacked decision Needs to be called at the start of a new event.
const SG::ReadHandleKey< xAOD::TrigDecision > * xAODTrigDecisionKey() const
std::vector< std::string > patterns
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
boost::multi_index::multi_index_container< TriggerItem *, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity< TriggerItem > >, boost::multi_index::ordered_unique< boost::multi_index::tag< tag_ctpid >, boost::multi_index::const_mem_fun< TriggerItem, int, &TriggerItem::ctpId > >, boost::multi_index::hashed_unique< boost::multi_index::tag< tag_name_hash >, boost::multi_index::const_mem_fun< TrigConfData, const std::string &, &TrigConfData::name > > > > ItemContainer
Group
Properties of a chain group.
The common trigger namespace for trigger analysis tools.
StoreGateSvc EventStoreType
the type returned by AsgTool::evtStore
bool operator()(iholder *lhs, iholder *rhs) const
virtual const void * ptr() const