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"
97 friend class ::TrigNavigationThinningSvc;
99 friend class ::TrigBStoxAODTool;
114 virtual void reset(
bool inFinalize =
false);
138 virtual bool serialize( std::vector<uint32_t>& output)
const;
139 bool serialize( std::vector<uint32_t>& output, std::vector<unsigned int>& cuts )
const;
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;
142 bool deserialize(
const std::vector<uint32_t>& input );
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;
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=
"",
225 const TriggerElement*& source = ::HLT::TrigNavStructure::m_unspecifiedTE,
226 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel )
const;
228 template<
class LinkType>
230 LinkType& link,
const std::string&
label=
"",
231 const TriggerElement*& source = ::HLT::TrigNavStructure::m_unspecifiedTE,
232 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel)
const;
234 template<
class C,
class T>
238 template<
class C,
class T>
241 const TriggerElement*& source = ::HLT::TrigNavStructure::m_unspecifiedTE,
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,
275 const TriggerElement*& source = ::HLT::TrigNavStructure::m_unspecifiedTE,
276 std::string& sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel)
const;
291 const std::string&
label=
"", std::map<const T*, std::string>* labels=0 )
const;
322 static uint32_t
string2hash(
const std::string&,
const std::string& category=
"TE" );
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);
401 bool extractBlob(
const std::vector<uint32_t>& input,
402 std::vector<uint32_t>::const_iterator& it,
403 std::vector<uint32_t>& blob)
const ;
410 MsgStream&
msg(
const MSG::Level lvl)
const {
return msg() << lvl; }
411 bool msgLvl(
const MSG::Level lvl)
const {
return msg().level() <= lvl; }
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;
420 bool serializeHoldersWithPayload(
const std::vector<CSPair>& payload, std::vector<uint32_t>& output, std::vector<uint32_t>& holderblobsizes,
421 std::vector<std::pair<CLID, std::string> >& clid_name)
const;
425 MsgStream&
operator<< ( MsgStream& m,
const NavigationCore& nav );
An STL vector of pointers that by default owns its pointed-to elements.
uint32_t CLID
The Class ID type.
DataVector adapter that acts like it holds const pointers.
ElementLinkVector implementation for standalone ROOT.
ElementLink implementation for ROOT usage.
bool registerHolder(HLTNavDetails::IHolder *holder)
NavigationCore(const AthAlgTool &logger)
constructor with parent AlgTool for printing
bool getFeaturesLinks(const TriggerElement *te, ElementLinkVector< C > &links, const std::string &label="") const
const T * featureLink2Object(const TrigFeatureLink &) const
ITrigHolderFactory * m_holderfactory
std::vector< std::string > m_classesFromPayloadIgnoreProperty
list of classes::keys to ignore on deserialization
bool getFeature(const TriggerElement *te, const ConstDataVector< T > *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
uint16_t nextSubTypeIndex(CLID clid, const std::string &label) const
bool extractBlob(const std::vector< uint32_t > &input, std::vector< uint32_t >::const_iterator &it, std::vector< uint32_t > &blob) const
static void registerFeatureContainer()
Specialized by type and container for this type.
const AthAlgTool & m_logger
std::vector< CSPair > m_classesToPayload_DSonly
classess are put to payload according to that priority list (CLID + key)
static uint32_t string2hash(const std::string &, const std::string &category="TE")
convert strin g to hash.
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
HLTNavDetails::Holder< T > * getHolder(uint16_t subTypeIndex) const
as above but does not create holder on demand (return 0 if not found)
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
IConversionSvc * m_serializerSvc
TrigFeatureLink object2FeatureLink(const TriggerElement *te, const std::string &label, const typename Container2Object< C >::type *obj, const C *container) const
virtual bool serialize(std::vector< uint32_t > &output) const
method serizlizes the navigation structure The structure is serrizlized in following order ....
MemoryManagement
defines 3 possible origins of the objects which are attached to TEs This should be used like this:
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
unsigned m_objectsIndexOffset
small integer used to generate sub type index
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
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 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
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.
std::vector< std::string > m_classesToPayloadProperty_DSonly
list of classes::keys to be put to DS payload
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 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...
std::vector< std::string > m_classesToPayloadProperty
list of classes::keys to be put to BS payload
StoreGateSvc * m_storeGate
std::vector< std::string > m_classesToPreregisterProperty
as above but for preregistration
std::vector< CSPair > m_classesToPayload
classess are put to payload according to that priority list (CLID + key)
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
bool getRecentFeaturesLinks(const TriggerElement *te, ElementLinkVector< C > &links, const std::string &label="") const
virtual void prepare()
prepapres the navigation for next event
std::vector< CSPair > m_classesToPreregister
classes mentioned here will be put to SG irrespectively of thier presence in event
TrigFeatureLink object2FeatureLink(const TriggerElement *te, const std::string &label, const T *obj) const
bool getAllFeatures(ElementLinkVector< C > &features, const std::string &label="") const
gets all features of type T atachedd to whichever TE
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
bool msgLvl(const MSG::Level lvl) const
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 deserialize(const std::vector< uint32_t > &input)
MsgStream & msg(const MSG::Level lvl) const
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
std::string m_objectsKeyPrefix
property setting prefix which is to be given to all trigger EDM objects
bool getFeature(const TriggerElement *te, const T *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
virtual ~NavigationCore()=default
bool serialize_DSonly(std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const
HLTNavDetails::Holder< T > * getHolder(const std::string &label, uint16_t suggestedIndex) const
aware holder discovery, creates holder if needed
const AccessProxy * getAccessProxy() const
gets the access proxy
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 createHolder(HLTNavDetails::IHolder *&holder, CLID clid, const std::string &label, uint16_t idx) const
creates holder for type given by CLID
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
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
std::vector< FeatureAccessHelper > FeatureVec
The Athena Transient Store API.
Utility class (not a tool or so) to serialize strings into stream of 32bit integers.
The TrigNavigationThinningSvc is an athena tool used to slim the trigger Navigation structure in vari...
Class helping in dealing with dynamic branch selection.
static Root::TMsgLogger logger("iLumiCalc")
std::string label(const std::string &format, int i)
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
std::variant< sub_index_type, std::string > index_or_label_type
MsgStream & operator<<(MsgStream &m, const Navigation &nav)
master_search< typenameEDMLIST::map, HLT::TypeInformation::get_cont, CONTAINER >::result::search_result::object type
CSPair(CLID clid, const std::string &key, xAOD::AuxSelection &&the_sel)