|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #ifndef TRIGNAVSTRUCTURE_TRIGNAVSTRUCTURE_H
9 #define TRIGNAVSTRUCTURE_TRIGNAVSTRUCTURE_H
48 virtual void reset(
bool inFinalize =
false);
85 TriggerElement*
addNode( std::vector<TriggerElement* >& seeds,
unsigned int id,
bool ghost=
false,
bool nofwd=
false );
154 virtual bool serialize( std::vector<uint32_t>&)
const = 0;
185 void getAll( std::vector< TriggerElement* >&
output,
const bool activeOnly =
true )
const;
190 std::vector<TriggerElement*>&
getAllTEs();
195 const std::vector<TriggerElement*>&
getAllTEs()
const;
292 bool combine(std::vector<unsigned int>& types,
293 std::vector< std::vector<TriggerElement*> >&
output,
294 unsigned int maxResults = 1000,
bool onlyActive =
true);
315 std::vector<const TriggerElement*>&
children,
const bool activeOnly =
true )
const;
334 bool only_single_feature,
336 bool travel_backward_recursively,
338 std::string& sourcelabel = m_unspecifiedLabel)
const;
343 bool only_single_feature,
346 std::string& sourcelabel )
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);
390 #endif // TRIGNAVSTRUCTURE_TRIGNAVSTRUCTURE_H
static bool haveAllCommonRoIs(const HLT::TriggerElement *te1, const HLT::TriggerElement *te2)
static bool haveDistinctSeed(const TriggerElement *te1, const TriggerElement *te2)
inversion of haveCommonSeed
bool combine(std::vector< unsigned int > &types, std::vector< std::vector< TriggerElement * > > &output, unsigned int maxResults=1000, bool onlyActive=true)
For Algorithms: return all the possible n-tuples of TE* objects (te0, te1..., ten)
void getAll(std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements.
const TrigHolderStructure & getHolderStorage() const
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.
virtual bool serialize(std::vector< uint32_t > &) const =0
method serizlizes entire navigation
std::string label(class_id_type clid, const index_or_label_type &sti_or_label) const
virtual bool deserialize(const std::vector< uint32_t > &)=0
static bool isRoINode(const TriggerElement *te)
queries if node is an RoI type one
static std::recursive_mutex s_rmutex
void printASCIIArt(std::string &str, const TriggerElement *te=0, int offset=0) const
pretty printing of the navigational structure (heavy)
std::vector< FeatureAccessHelper > FeatureVec
std::recursive_mutex & getMutex()
std::vector< ALFA_RawDataCollection_p1 > t1
static bool isTerminalNode(const TriggerElement *te)
queries if node is terminal (no more TriggerElement are seeded by it)
bool getActiveState() const
get state of the TriggerElement
SG::SlotSpecificObj< TrigHolderStructure > m_holderstorage
structure for feature holders (one per processing slot)
virtual bool getFeatureAccessorsSingleTE(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, const TriggerElement *&source, std::string &sourcelabel) const
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
static bool haveDistinctRoI(const TriggerElement *te1, const TriggerElement *te2)
inversion of haveCommonRoI
bool getTopologicallySpannedBy(const TriggerElement *te, const std::vector< unsigned int > &types, std::vector< const TriggerElement * > &children, const bool activeOnly=true) const
gets the TEs whose predecessors were used to built a given topological TE
static bool isTopological(const TriggerElement *te)
virtual ~TrigNavStructure()
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
TriggerElement * getInitialNode()
gets initial node, if node is not there then it is created on fly
static bool haveCommonSeed(const TriggerElement *te1, const TriggerElement *te2)
checks that there is any common predecessor of two TriggerElements
static bool haveCommonRoI(const TriggerElement *te1, const TriggerElement *te2)
does this 2 share RoI
TriggerElementFactory & getFactory()
static const std::vector< TriggerElement * > & getDirectSuccessors(const TriggerElement *te)
returns list of direct predecessors (nodes I seed)
SG::SlotSpecificObj< TriggerElementFactory > m_factory
factory of trigger elements (one per processing slot)
Maintain a set of objects, one per slot.
bool deserializeTEs(std::vector< uint32_t >::const_iterator &start, unsigned int totalSize)
bool serializeTEs(std::vector< uint32_t > &output) const
method serizlizes the navigation structure
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
std::variant< sub_index_type, std::string > index_or_label_type
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
std::vector< uint32_t > & m_output
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
static const TriggerElement *m_unspecifiedTE ATLAS_THREAD_SAFE
sub_index_type subType(class_id_type clid, const index_or_label_type &sti_or_label) const
unsigned int copyAllFeatures(const TriggerElement *sourceTE, TriggerElement *destTE)
gets all features from the sourceTE and copies a reference (FeatureAccessHelper) to the destTE
TrigHolderStructure & getHolderStorage()
static std::string m_unspecifiedLabel ATLAS_THREAD_SAFE
TriggerElement::FeatureAccessHelper getFeature(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label) const
typeless feature access metod
const TriggerElementFactory & getFactory() const
static const TriggerElement * getSuccessor(const TriggerElement *te, unsigned int id)
returns successor of given type beeing seeded from this TE
The factory of TriggerElements Creation in controlled way.
void getAllRoIThresholdTEs(std::vector< TriggerElement * > &output) const
The query returns a vector of all TriggerElements that represent a LVL1 RoI threshold.
TriggerElement * addRoINode(TriggerElement *initial)
gets RoI node (attached to initial)
static bool decreasingOrderByTEId(const TriggerElement *te1, const TriggerElement *te2)
bool overlaps(const TriggerElement *t1, const TriggerElement *t2) const
Check overlap between trigger elements (pointer equality or RoI overlap)
static bool isCompatibleTree(const TriggerElement *te1, const TriggerElement *te2)
check compatibility of 2 navigation structures
static const std::vector< TriggerElement * > & getRoINodes(const TriggerElement *somenode)
gets all RoI type nodes seeding indirectly this TriggerElement
TriggerElement::FeatureAccessHelper getFeatureRecursively(const TriggerElement *startTE, class_id_type clid, const index_or_label_type &index_or_label, const TriggerElement *&sourceTE) const
recursive search for features the function is similar to the above butif th features is not found at ...
std::vector< TriggerElement * > & getAllTEs()
access needed by slimming tools.
std::vector< ALFA_RawDataContainer_p1 > t2
static bool isInitialNode(const TriggerElement *te)
queries if node is an initial one
void fillSameRoIRelation(TriggerElement *roi, TriggerElement *te)
rebuilds the sameRoIRelation between trigger elements (used internally by deserialize)
the FeatureAccessHelper is a class used to keep track of features attached to this TE.
std::recursive_mutex & getMutex() const
static bool hasIdFromTheSet(const TriggerElement *te, std::vector< unsigned int > ids)
simple helper
unsigned int countAllOfType(const te_id_type id, const bool activeOnly=true) const
The query counting a collection of all TriggerElement of a given type.
TriggerElement * addNode(TriggerElement *seed, unsigned int id)
adds nodes seeded form the one given as an argument,
static bool increasingOrderByTEId(const TriggerElement *te1, const TriggerElement *te2)
for sorting TriggerElements according to their id
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 bool isNotActive(const TriggerElement *te)
helper for the STL
bool propagateDeactivation(const TrigNavStructure *nav)
propagates deactivation of TE state This finction should be used after Trigger is rerurn on L2 and th...
bool matchFeature(const TriggerElement::FeatureAccessHelper &fea, class_id_type clid, const index_or_label_type &index_or_label) const
Define macros for attributes used to control the static checker.
const BaseHolder * getHolder(const TriggerElement::FeatureAccessHelper &fea) const
FillSize(std::vector< uint32_t > &o)