|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef TRIGNAVIGATION_HLTNAVIGATIONCORE_H
9 #define TRIGNAVIGATION_HLTNAVIGATIONCORE_H
16 #include "GaudiKernel/ClassID.h"
17 #include "GaudiKernel/MsgStream.h"
18 #include "GaudiKernel/ServiceHandle.h"
43 namespace TrigNavTools {
97 friend class ::TrigNavigationThinningSvc;
99 friend class ::TrigBStoxAODTool;
114 virtual void reset(
bool inFinalize =
false);
140 bool serialize( std::vector<uint32_t>&
output, std::vector<unsigned int>&
cuts, std::vector<std::pair<CLID, std::string> >& clid_name)
const;
141 bool serialize_DSonly( std::vector<uint32_t>&
output, std::vector<unsigned int>&
cuts, std::vector<std::pair<CLID, std::string> >& clid_name)
const;
173 std::map<const T*, std::string>*
labels=0 )
const;
176 bool getFeature(
const TriggerElement* te,
const T*& features,
const std::string&
label=
"", std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel)
const;
181 const std::string&
label=
"", std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel)
const;
194 const C* container)
const;
199 template<
class C,
class T>
219 std::vector< const T*>& features,
const std::string&
label=
"",
220 std::map<const T*, std::string>*
labels=0 )
const;
224 const T*& feature,
const std::string&
label=
"",
226 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel )
const;
228 template<
class LinkType>
230 LinkType& link,
const std::string&
label=
"",
232 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel)
const;
234 template<
class C,
class T>
238 template<
class C,
class T>
242 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel )
const;
264 bool only_single_feature,
266 bool travel_backward_recursively,
268 std::string& sourcelabel = m_unspecifiedLabel)
const;
273 bool only_single_feature,
276 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel)
const;
291 const std::string&
label=
"", std::map<const T*, std::string>*
labels=0 )
const;
329 std::vector< HLT::TriggerElement* >&
output,
330 const bool activeOnly=
true)
const;
361 bool addOneLevel(std::vector< std::vector<TriggerElement*> >& currentCombs,
362 std::vector< std::vector<std::pair<unsigned int, unsigned int> > >& currentIdxs,
364 std::vector< std::vector<TriggerElement*> >& newCombs,
365 std::vector< std::vector<std::pair<unsigned int, unsigned int> > >& newIdxs,
366 unsigned int maxResults = 1000,
bool onlyActive = 1);
402 std::vector<uint32_t>::const_iterator&
it,
403 std::vector<uint32_t>&
blob)
const ;
416 std::vector<uint32_t>&
output,std::vector<unsigned int>&
cuts ,std::vector<std::pair<CLID, std::string> >& clid_name)
const;
418 bool serializeHoldersWithoutPayload(
const std::vector<HLTNavDetails::IHolder*>& holders, std::vector<uint32_t>&
output, std::vector<uint32_t>& holderblobsizes,std::vector<std::pair<CLID, std::string> >& clid_name)
const;
421 std::vector<std::pair<CLID, std::string> >& clid_name)
const;
425 MsgStream&
operator<< ( MsgStream&
m,
const NavigationCore& nav );
429 #endif //#ifndef HLTNAVIGATION_H
TrigFeatureLink object2FeatureLink(const TriggerElement *te, const std::string &label, const T *obj) const
bool getRecentFeatureDataOrElementLink(const TriggerElement *te, LinkType &link, const std::string &label="", const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
HLTNavDetails::IHolder * prepareOneHolder(CLID clid, const std::string &label)
void getAllOfType(const te_id_type id, std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements if name is given.
std::string label(class_id_type clid, const index_or_label_type &sti_or_label) const
std::string m_objectsKeyPrefix
property setting prefix which is to be given to all trigger EDM objects
unsigned m_objectsIndexOffset
small integer used to generate sub type index
bool getFeaturesInRoI(const TriggerElement *te, std::vector< const T * > &features, const std::string &label="", std::map< const T *, std::string > *labels=0) const
retrieve features attached to the RoIs seeding this TriggerElement
bool serialize_DSonly(std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const
bool extractBlob(const std::vector< uint32_t > &input, std::vector< uint32_t >::const_iterator &it, std::vector< uint32_t > &blob) const
master_search< typename EDMLIST::map, HLT::TypeInformation::get_cont, CONTAINER >::result::search_result::object type
std::vector< FeatureAccessHelper > FeatureVec
HLTNavDetails::Holder< T > * getHolder(const std::string &label, uint16_t suggestedIndex) const
aware holder discovery, creates holder if needed
std::vector< std::string > m_classesToPayloadProperty
list of classes::keys to be put to BS payload
bool deserialize(const std::vector< uint32_t > &input)
virtual bool getFeatureAccessors(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, bool travel_backward_recursively, const TriggerElement *&source=m_unspecifiedTE, std::string &sourcelabel=m_unspecifiedLabel) const
retrieve features accessors according to the requrements This method is actually workhorse for all ab...
bool addOneLevel(std::vector< std::vector< TriggerElement * > > ¤tCombs, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > ¤tIdxs, unsigned int type, std::vector< std::vector< TriggerElement * > > &newCombs, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &newIdxs, unsigned int maxResults=1000, bool onlyActive=1)
Helper method for "combine": add one "level" of multiplicity to the results.
static uint32_t string2hash(const std::string &, const std::string &category="TE")
convert strin g to hash.
bool getRecentFeatures(const TriggerElement *te, std::vector< const T * > &features, const std::string &label="", std::map< const T *, std::string > *labels=0) const
retrieve features attached to given TriggerElement or its predecessors the algorithm will go recursiv...
bool getRecentFeaturesLinks(const TriggerElement *te, ElementLinkVector< C > &links, const std::string &label="") const
bool getFeaturesLinks(const TriggerElement *te, ElementLinkVector< C > &links, const std::string &label="") const
bool merge(const NavigationCore &l2)
attemtps to merge two trees
bool createHolder(HLTNavDetails::IHolder *&holder, CLID clid, const std::string &label, uint16_t idx) const
creates holder for type given by CLID
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
bool getFeature(const TriggerElement *te, const T *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
virtual void prepare()
prepapres the navigation for next event
HLTNavDetails::Holder< T > * getHolder(uint16_t subTypeIndex) const
as above but does not create holder on demand (return 0 if not found)
MsgStream & operator<<(MsgStream &m, const Navigation &nav)
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
NavigationCore(const AthAlgTool &logger)
constructor with parent AlgTool for printing
The Athena Transient Store API.
std::vector< CSPair > m_classesToPayload
classess are put to payload according to that priority list (CLID + key)
bool getFeatures(const TriggerElement *te, std::vector< const T * > &features, const std::string &label="", std::map< const T *, std::string > *labels=0) const
retrieve features attached to given TriggerElement
bool serializeHoldersWithPayload(const std::vector< CSPair > &payload, std::vector< uint32_t > &output, std::vector< uint32_t > &holderblobsizes, std::vector< std::pair< CLID, std::string > > &clid_name) const
const AccessProxy * getAccessProxy() const
gets the access proxy
std::variant< sub_index_type, std::string > index_or_label_type
std::vector< std::string > m_classesToPayloadProperty_DSonly
list of classes::keys to be put to DS payload
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
ITrigHolderFactory * m_holderfactory
CSPair(CLID clid, const std::string &key, xAOD::AuxSelection &&the_sel)
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
MsgStream & msg(const MSG::Level lvl) const
uint16_t nextSubTypeIndex(CLID clid, const std::string &label) const
const T * featureLink2Object(const TrigFeatureLink &) const
bool getAllFeatures(ElementLinkVector< C > &features, const std::string &label="") const
gets all features of type T atachedd to whichever TE
bool msgLvl(const MSG::Level lvl) const
virtual ~NavigationCore()=default
uint32_t CLID
The Class ID type.
IConversionSvc * m_serializerSvc
ElementLink implementation for ROOT usage.
ElementLinkVector implementation for standalone ROOT.
Class helping in dealing with dynamic branch selection.
void getAllOfType(const std::string &id, std::vector< HLT::TriggerElement * > &output, const bool activeOnly=true) const
return trigger elements given the name of TEs
bool serializeWithHolderSection(const std::vector< uint32_t > &holderdata, const std::vector< unsigned int > &holderblobsizes, std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const
bool getRecentFeature(const TriggerElement *te, const T *&feature, const std::string &label="", const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
TrigFeatureLink object2FeatureLink(const TriggerElement *te, const std::string &label, const typename Container2Object< C >::type *obj, const C *container) const
The TrigNavigationThinningSvc is an athena tool used to slim the trigger Navigation structure in vari...
StoreGateSvc * m_storeGate
bool getRecentFeatureLink(const TriggerElement *te, ElementLink< C > &link, const std::string &label="", const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
std::vector< CSPair > m_classesToPreregister
classes mentioned here will be put to SG irrespectively of thier presence in event
virtual bool serialize(std::vector< uint32_t > &output) const
method serizlizes the navigation structure The structure is serrizlized in following order ....
virtual bool getFeatureAccessorsSingleTE(const TriggerElement *te, CLID clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
An STL vector of pointers that by default owns its pointed-to elements.
bool registerHolder(HLTNavDetails::IHolder *holder)
bool getFeature(const TriggerElement *te, const ConstDataVector< T > *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
Utility class (not a tool or so) to serialize strings into stream of 32bit integers.
std::vector< CSPair > m_classesToPayload_DSonly
classess are put to payload according to that priority list (CLID + key)
static void registerFeatureContainer()
Specialized by type and container for this type.
MemoryManagement
defines 3 possible origins of the objects which are attached to TEs This should be used like this:
std::vector< std::string > m_classesFromPayloadIgnoreProperty
list of classes::keys to ignore on deserialization
bool serializeHoldersWithoutPayload(const std::vector< HLTNavDetails::IHolder * > &holders, std::vector< uint32_t > &output, std::vector< uint32_t > &holderblobsizes, std::vector< std::pair< CLID, std::string > > &clid_name) const
const AthAlgTool & m_logger
std::vector< std::string > m_classesToPreregisterProperty
as above but for preregistration