|
ATLAS Offline Software
|
#include <TrigNavStructure.h>
|
virtual | ~TrigNavStructure () |
|
virtual void | reset (bool inFinalize=false) |
| resets all the navigation, goes to the factory and asks to withdraw all produced objects More...
|
|
TriggerElement * | getInitialNode () |
| gets initial node, if node is not there then it is created on fly More...
|
|
const TriggerElement * | getInitialNode () const |
|
TriggerElement * | addRoINode (TriggerElement *initial) |
| gets RoI node (attached to initial) More...
|
|
TriggerElement * | addNode (TriggerElement *seed, unsigned int id) |
| adds nodes seeded form the one given as an argument, More...
|
|
TriggerElement * | addNode (std::vector< TriggerElement * > &seeds, unsigned int id, bool ghost=false, bool nofwd=false) |
| adds node which is seeded from several other Needed by Topological algorithms More...
|
|
void | printASCIIArt (std::string &str, const TriggerElement *te=0, int offset=0) const |
| pretty printing of the navigational structure (heavy) More...
|
|
bool | serializeTEs (std::vector< uint32_t > &output) const |
| method serizlizes the navigation structure More...
|
|
bool | deserializeTEs (std::vector< uint32_t >::const_iterator &start, unsigned int totalSize) |
|
virtual bool | serialize (std::vector< uint32_t > &) const =0 |
| method serizlizes entire navigation More...
|
|
virtual bool | deserialize (const std::vector< uint32_t > &)=0 |
|
TriggerElement::FeatureAccessHelper | getFeature (const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label) const |
| typeless feature access metod More...
|
|
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 the startTE the search descends the structure of TEs until it is found. More...
|
|
void | getAllRoIThresholdTEs (std::vector< TriggerElement * > &output) const |
| The query returns a vector of all TriggerElements that represent a LVL1 RoI threshold. More...
|
|
void | getAll (std::vector< TriggerElement * > &output, const bool activeOnly=true) const |
| The query returning a collection of all TriggerElements. More...
|
|
std::vector< TriggerElement * > & | getAllTEs () |
| access needed by slimming tools. More...
|
|
const std::vector< TriggerElement * > & | getAllTEs () const |
| access needed by slimming tools. More...
|
|
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. More...
|
|
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. More...
|
|
bool | propagateDeactivation (const TrigNavStructure *nav) |
| propagates deactivation of TE state This finction should be used after Trigger is rerurn on L2 and then the reruning on L2 is required. More...
|
|
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) More...
|
|
bool | overlaps (const TriggerElement *t1, const TriggerElement *t2) const |
| Check overlap between trigger elements (pointer equality or RoI overlap) More...
|
|
bool | overlaps (const TriggerElement *t1, const std::vector< TriggerElement * > &teVec) const |
| Check overlap between a TE and a vector of TEs, using the method above. More...
|
|
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 More...
|
|
unsigned int | copyAllFeatures (const TriggerElement *sourceTE, TriggerElement *destTE) |
| gets all features from the sourceTE and copies a reference (FeatureAccessHelper) to the destTE More...
|
|
const BaseHolder * | getHolder (const TriggerElement::FeatureAccessHelper &fea) const |
|
sub_index_type | subType (class_id_type clid, const index_or_label_type &sti_or_label) const |
|
std::string | label (class_id_type clid, const index_or_label_type &sti_or_label) 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 |
|
|
static const std::vector< TriggerElement * > & | getRoINodes (const TriggerElement *somenode) |
| gets all RoI type nodes seeding indirectly this TriggerElement More...
|
|
static const std::vector< TriggerElement * > & | getDirectPredecessors (const TriggerElement *te) |
| returns list of direct predecessors (nodes seeding me) More...
|
|
static const std::vector< TriggerElement * > & | getDirectSuccessors (const TriggerElement *te) |
| returns list of direct predecessors (nodes I seed) More...
|
|
static const TriggerElement * | getSuccessor (const TriggerElement *te, unsigned int id) |
| returns successor of given type beeing seeded from this TE More...
|
|
static bool | isInitialNode (const TriggerElement *te) |
| queries if node is an initial one More...
|
|
static bool | isRoINode (const TriggerElement *te) |
| queries if node is an RoI type one More...
|
|
static bool | isTerminalNode (const TriggerElement *te) |
| queries if node is terminal (no more TriggerElement are seeded by it) More...
|
|
static bool | haveCommonRoI (const TriggerElement *te1, const TriggerElement *te2) |
| does this 2 share RoI More...
|
|
static bool | haveDistinctRoI (const TriggerElement *te1, const TriggerElement *te2) |
| inversion of haveCommonRoI More...
|
|
static bool | haveAllCommonRoIs (const HLT::TriggerElement *te1, const HLT::TriggerElement *te2) |
|
static bool | haveCommonSeed (const TriggerElement *te1, const TriggerElement *te2) |
| checks that there is any common predecessor of two TriggerElements More...
|
|
static bool | haveDistinctSeed (const TriggerElement *te1, const TriggerElement *te2) |
| inversion of haveCommonSeed
More...
|
|
static bool | increasingOrderByTEId (const TriggerElement *te1, const TriggerElement *te2) |
| for sorting TriggerElements according to their id More...
|
|
static bool | decreasingOrderByTEId (const TriggerElement *te1, const TriggerElement *te2) |
|
static bool | hasIdFromTheSet (const TriggerElement *te, std::vector< unsigned int > ids) |
| simple helper More...
|
|
static bool | isNotActive (const TriggerElement *te) |
| helper for the STL More...
|
|
static bool | isTopological (const TriggerElement *te) |
|
static bool | isCompatibleTree (const TriggerElement *te1, const TriggerElement *te2) |
| check compatibility of 2 navigation structures More...
|
|
|
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 |
|
bool | matchFeature (const TriggerElement::FeatureAccessHelper &fea, class_id_type clid, const index_or_label_type &index_or_label) const |
|
void | fillSameRoIRelation (TriggerElement *roi, TriggerElement *te) |
| rebuilds the sameRoIRelation between trigger elements (used internally by deserialize) More...
|
|
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. More...
|
|
TriggerElementFactory & | getFactory () |
|
TrigHolderStructure & | getHolderStorage () |
|
std::recursive_mutex & | getMutex () |
|
const TriggerElementFactory & | getFactory () const |
|
const TrigHolderStructure & | getHolderStorage () const |
|
std::recursive_mutex & | getMutex () const |
|
Definition at line 40 of file TrigNavStructure.h.
◆ ~TrigNavStructure()
TrigNavStructure::~TrigNavStructure |
( |
| ) |
|
|
virtual |
◆ addNode() [1/2]
TriggerElement * TrigNavStructure::addNode |
( |
std::vector< TriggerElement * > & |
seeds, |
|
|
unsigned int |
id, |
|
|
bool |
ghost = false , |
|
|
bool |
nofwd = false |
|
) |
| |
adds node which is seeded from several other Needed by Topological algorithms
- Parameters
-
seeds | are all TriggerElements which seed newly created |
id | the id to give for the created TriggerElement |
ghost | flag is saying that this TE is a light weight one, no features attaching to it is allowed |
nofwd | flag is saying that this TE will not be deactivated automatically in fwd deactivation process(rerunning) |
Definition at line 85 of file TrigNavStructure.cxx.
86 std::lock_guard<std::recursive_mutex> lock(
getMutex());
93 for (
it = seeds.begin();
it != seeds.end(); ++
it ) {
111 for ( ; itbegin != itend; ++itbegin ) {
◆ addNode() [2/2]
adds nodes seeded form the one given as an argument,
- Parameters
-
Definition at line 79 of file TrigNavStructure.cxx.
80 std::vector<TriggerElement*>
list;
81 list.push_back(seednode);
◆ addOneLevel()
bool TrigNavStructure::addOneLevel |
( |
std::vector< std::vector< TriggerElement * > > & |
currentCombs, |
|
|
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > & |
currentIdxs, |
|
|
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 |
|
) |
| |
|
protected |
Helper method for "combine": add one "level" of multiplicity to the results.
Definition at line 610 of file TrigNavStructure.cxx.
618 std::vector<TriggerElement*> newTEs;
621 if (currentCombs.size() == 0) {
624 for (
unsigned int j = 0; j < newTEs.size(); j++) {
626 std::vector<TriggerElement*> cbs;
627 cbs.push_back(newTEs[j]);
628 newCombs.push_back(cbs);
631 std::vector<std::pair<unsigned int, unsigned int> > ti;
632 ti.push_back(std::pair<unsigned int, unsigned int>(
type, j));
633 newIdxs.push_back(ti);
639 for (
unsigned int i = 0;
i < currentCombs.size();
i++) {
642 std::vector<TriggerElement*>& comb = currentCombs[
i];
647 std::vector<std::pair<unsigned int, unsigned int> >& ti = currentIdxs[
i];
660 for (
unsigned int j = comb.size(); j > 0; j--)
662 first = ti[j - 1].second;
669 for (
unsigned int j =
first + 1; j < newTEs.size(); j++) {
680 newCombs.push_back(comb);
686 ti.push_back(std::pair<unsigned int, unsigned int>(
type, j));
687 newIdxs.push_back(ti);
691 if (maxResults > 0 && newCombs.size() >= maxResults) {
◆ addRoINode()
◆ combine()
bool TrigNavStructure::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)
such that te0.id() == types[0], te1.id() == types[1]... In the case where ids appear multiple times, n-tuple permutations are counted only once. (so if te0.id() == te1.id(), (te0, te1) will appear but not (te1, te0)) "output" is populated with all the poClassID_traits<T>::ID();ssible combinations of this type. if "activeOnly" is true, only active trigger elements are used. The list is truncated at maxResults if maxResults > 0.
Definition at line 582 of file TrigNavStructure.cxx.
589 std::vector< std::vector<TriggerElement*> >
input;
590 std::vector< std::vector<std::pair<unsigned int, unsigned int> > > newIdxs;
595 std::vector< std::vector<TriggerElement*> >
input =
output;
596 std::vector< std::vector<std::pair<unsigned int, unsigned int> > > currentIdxs = newIdxs;
603 maxResults, onlyActive))
return false;
◆ copyAllFeatures()
gets all features from the sourceTE and copies a reference (FeatureAccessHelper) to the destTE
- Parameters
-
- Returns
- number of features that were copied
Definition at line 736 of file TrigNavStructure.cxx.
738 unsigned int n_features = 0;
740 for ( std::vector< TriggerElement::FeatureAccessHelper >::const_iterator
it = sourceTE->
getFeatureAccessHelpers().begin();
◆ countAllOfType()
unsigned int TrigNavStructure::countAllOfType |
( |
const te_id_type |
id, |
|
|
const bool |
activeOnly = true |
|
) |
| const |
◆ decreasingOrderByTEId()
◆ deserialize()
virtual bool HLT::TrigNavStructure::deserialize |
( |
const std::vector< uint32_t > & |
| ) |
|
|
pure virtual |
◆ deserializeTEs()
bool TrigNavStructure::deserializeTEs |
( |
std::vector< uint32_t >::const_iterator & |
start, |
|
|
unsigned int |
totalSize |
|
) |
| |
Definition at line 264 of file TrigNavStructure.cxx.
265 std::lock_guard<std::recursive_mutex> lock(
getMutex());
270 std::vector<uint32_t>::const_iterator& inputIt =
start;
271 const size_t payloadSize = *inputIt++;
274 std::cerr <<
"size of the navigation payload smaller than the one required to save TEs. " <<
totalSize <<
" < " << payloadSize << std::endl;
279 const unsigned int size = *inputIt++;
281 std::map<uint16_t, TriggerElement* >
keys;
283 for (
unsigned int i = 0;
i <
size; ++
i ) {
292 if ( not factory.
empty() ) {
295 std::vector<TriggerElement*>::const_iterator roiTEit;
◆ fillSameRoIRelation()
rebuilds the sameRoIRelation between trigger elements (used internally by deserialize)
- Warning
- should be called for each RoI like node
Definition at line 307 of file TrigNavStructure.cxx.
315 std::vector<TriggerElement*>::const_iterator
it;
◆ getAll()
void TrigNavStructure::getAll |
( |
std::vector< TriggerElement * > & |
output, |
|
|
const bool |
activeOnly = true |
|
) |
| const |
The query returning a collection of all TriggerElements.
Definition at line 363 of file TrigNavStructure.cxx.
364 std::lock_guard<std::recursive_mutex> lock(
getMutex());
368 std::back_insert_iterator<std::vector<TriggerElement*> > outputIt(
output );
◆ getAllOfType()
The query returning a collection of all TriggerElements if name is given.
- Parameters
-
id | name of TE, if "" given all TEs are returned |
Definition at line 344 of file TrigNavStructure.cxx.
347 std::lock_guard<std::recursive_mutex> lock(
getMutex());
351 std::back_insert_iterator<std::vector<TriggerElement*> > outputIt(
output );
◆ getAllRoIThresholdTEs()
void TrigNavStructure::getAllRoIThresholdTEs |
( |
std::vector< TriggerElement * > & |
output | ) |
const |
The query returns a vector of all TriggerElements that represent a LVL1 RoI threshold.
Definition at line 328 of file TrigNavStructure.cxx.
333 for ( std::vector<TriggerElement*>::const_iterator roi_te =
rois.begin();
334 roi_te !=
rois.end(); ++roi_te) {
337 std::vector<TriggerElement*>::const_iterator te = tes.begin();
338 for ( ; te != tes.end(); ++te) {
◆ getAllTEs() [1/2]
◆ getAllTEs() [2/2]
◆ getDirectPredecessors()
returns list of direct predecessors (nodes seeding me)
- Parameters
-
- Returns
- collection of TriggerElements (if empty then node is initial)
Definition at line 120 of file TrigNavStructure.cxx.
◆ getDirectSuccessors()
returns list of direct predecessors (nodes I seed)
- Parameters
-
- Returns
- collection of TriggerElements (if empty then node is terminal)
Definition at line 124 of file TrigNavStructure.cxx.
◆ getFactory() [1/2]
◆ getFactory() [2/2]
◆ getFeature()
typeless feature access metod
- Parameters
-
te | the TE from which the search should be done |
clid | the class ID of searched type |
sub | feature sub index ( |
- See also
- TriggerElement::ObjectIndex), if invalid_sub_type is passed then it is neglected
- Returns
- invalid FeatureAccessHelper is returned if nothng is found, else valid one
Definition at line 783 of file TrigNavStructure.cxx.
787 bool single =
true;
bool recursively =
false;
790 if(
status && !features.empty()){
791 return features.front();
◆ getFeatureAccessors()
Reimplemented in HLT::NavigationCore.
Definition at line 842 of file TrigNavStructure.cxx.
858 if ( ! travel_backward_recursively ) {
868 if ( ! features.empty() ) {
873 bool recursion_status =
true;
878 recursion_status = recursion_status &&
getFeatureAccessors( predecessor, clid, index_or_label,
879 only_single_feature, features_in_branch,
880 travel_backward_recursively,
882 features.insert(features.end(), features_in_branch.begin(), features_in_branch.end());
885 if ( only_single_feature && ( features.size() > 1 || recursion_status ==
false) ) {
◆ getFeatureAccessorsSingleTE()
Reimplemented in HLT::NavigationCore.
Definition at line 810 of file TrigNavStructure.cxx.
823 for (
int it = ( only_single_feature ?
size-1 : 0 );
it != (only_single_feature ? -1 :
size ); only_single_feature ?
it--:
it++ ) {
828 sourcelabel =
label(clid,fea.getIndex().subTypeIndex());
830 features.push_back(fea);
834 if ( only_single_feature )
◆ getFeatureRecursively()
recursive search for features the function is similar to the above butif th features is not found at the startTE the search descends the structure of TEs until it is found.
It stops on RoI nodes.
- Parameters
-
sourceTE | is the TE where the feature was found |
Definition at line 797 of file TrigNavStructure.cxx.
801 bool single =
true;
bool recursively =
true;
804 if(
status && !features.empty()){
805 return features.front();
◆ getHolder()
◆ getHolderStorage() [1/2]
◆ getHolderStorage() [2/2]
◆ getInitialNode() [1/2]
gets initial node, if node is not there then it is created on fly
Definition at line 39 of file TrigNavStructure.cxx.
40 std::lock_guard<std::recursive_mutex> lock(
getMutex());
43 if ( factory.
empty() )
◆ getInitialNode() [2/2]
◆ getMutex() [1/2]
std::recursive_mutex& HLT::TrigNavStructure::getMutex |
( |
| ) |
|
|
inlineprotected |
◆ getMutex() [2/2]
std::recursive_mutex& HLT::TrigNavStructure::getMutex |
( |
| ) |
const |
|
inlineprotected |
◆ getRoINodes()
gets all RoI type nodes seeding indirectly this TriggerElement
For getting all RoI nodes one can call getDirectrSuccessors(getIntialNode()
- Warning
- If this method is called for RoI node then it returns all TEs originating from it
Definition at line 73 of file TrigNavStructure.cxx.
◆ getSuccessor()
returns successor of given type beeing seeded from this TE
- Parameters
-
te | TriggerElement to query |
id | the id of the successor TreiggerElement to find |
- Returns
- TriggerElement pointer which can be 0
- Warning
- the implementation is recursive
Definition at line 129 of file TrigNavStructure.cxx.
130 if ( te->
getId() ==
id )
132 std::vector<TriggerElement*>::const_iterator
it;
◆ getTopologicallySpannedBy()
gets the TEs whose predecessors were used to built a given topological TE
- Parameters
-
te | topological TE from which to start |
types | vector of types to search for |
childs | vector of retrieved TEs; empty in case some of the required TEs cannot be found or are not active (see the activeOnly parameter) |
activeOnly | optional parameter specifying whether inactive TEs should be discarded from the search; true by default |
Definition at line 714 of file TrigNavStructure.cxx.
720 for (
unsigned i = 0 ;
i <
types.size(); ++
i ) {
◆ hasIdFromTheSet()
bool TrigNavStructure::hasIdFromTheSet |
( |
const TriggerElement * |
te, |
|
|
std::vector< unsigned int > |
ids |
|
) |
| |
|
static |
◆ haveAllCommonRoIs()
Definition at line 449 of file TrigNavStructure.cxx.
450 std::vector<TriggerElement*> vecRoINodes1 =
getRoINodes(te1);
451 std::vector<TriggerElement*> vecRoINodes2 =
getRoINodes(te2);
452 sort(vecRoINodes1.begin(), vecRoINodes1.end());
453 sort(vecRoINodes2.begin(), vecRoINodes2.end());
454 return vecRoINodes1 == vecRoINodes2;
◆ haveCommonRoI()
does this 2 share RoI
RoI node itself can be passed, then it will tell if a given TriggerElement is originating in this RoI for simple TriggerElement it is a bit overkill since it assumed that the number of RoIs can be any
- Warning
- this algorithm should not be used by sort or unique STL algorithms. Comparing algorithms are required to be "Strict weak ordering" i.e.return false if comparing x and x and if x < y and y < z then x < z (transitivity). Sort algorithm will simply misbehave (crash trying to access objects under address 0)
- Returns
- true if there is at least one common RoI
Definition at line 416 of file TrigNavStructure.cxx.
417 std::vector<const TriggerElement*> vecRoINodes;
420 vecRoINodes.push_back(te1);
422 std::back_insert_iterator<std::vector<const TriggerElement*> > outputIt( vecRoINodes );
426 vecRoINodes.push_back(te2);
428 std::back_insert_iterator<std::vector<const TriggerElement*> > outputIt( vecRoINodes );
432 sort(vecRoINodes.begin(), vecRoINodes.end());
434 std::vector<const TriggerElement*>::const_iterator
it;
435 it = adjacent_find(vecRoINodes.begin(), vecRoINodes.end());
437 if (
it == vecRoINodes.end() )
◆ haveCommonSeed()
checks that there is any common predecessor of two TriggerElements
- Warning
- See comments on haveCommonRoI. The same applies.
Definition at line 461 of file TrigNavStructure.cxx.
462 std::vector<const TriggerElement*> vecRoINodes;
463 std::back_insert_iterator<std::vector<const TriggerElement*> > outputIt( vecRoINodes );
472 sort(vecRoINodes.begin(), vecRoINodes.end());
475 it = adjacent_find(vecRoINodes.begin(), vecRoINodes.end());
476 if (
it == vecRoINodes.end() )
◆ haveDistinctRoI()
inversion of haveCommonRoI
But notice it is more suitable for SLT sort etc. since for comparison 2 identical objects it returns false. However the transitivity can't be guaranteed.
Definition at line 444 of file TrigNavStructure.cxx.
◆ haveDistinctSeed()
◆ increasingOrderByTEId()
for sorting TriggerElements according to their id
Note that this methods are not complementary. (It is required to be usable for STL algorithms.)
Definition at line 485 of file TrigNavStructure.cxx.
◆ isCompatibleTree()
check compatibility of 2 navigation structures
This what is checked is only the id of trigger elements whether they are having the same place in the navigation structure; have identical subtrees (check is recursive)
Definition at line 526 of file TrigNavStructure.cxx.
◆ isInitialNode()
queries if node is an initial one
- Parameters
-
- Returns
- true if passed node is initial
Definition at line 501 of file TrigNavStructure.cxx.
◆ isNotActive()
helper for the STL
Definition at line 257 of file TrigNavStructure.h.
257 {
return !te->getActiveState(); }
◆ isRoINode()
queries if node is an RoI type one
- Parameters
-
- Returns
- true if passed node is RoI type
Definition at line 507 of file TrigNavStructure.cxx.
◆ isTerminalNode()
◆ isTopological()
◆ label()
◆ matchFeature()
Definition at line 898 of file TrigNavStructure.cxx.
900 if(fea.
getCLID() != clid)
return false;
902 if(index_or_label.index() == 0){
904 auto index = std::get<sub_index_type>(index_or_label) ;
908 if(index_or_label.index() == 1){
910 auto label = std::get<std::string>(index_or_label);
916 if(sub == invalid_sub_index)
return false;
◆ overlaps() [1/2]
Check overlap between a TE and a vector of TEs, using the method above.
Definition at line 700 of file TrigNavStructure.cxx.
701 for (std::vector<TriggerElement*>::const_iterator te2 = teVec.begin(); te2 != teVec.end(); ++te2)
702 if (
overlaps(te1, *te2))
return true;
◆ overlaps() [2/2]
Check overlap between trigger elements (pointer equality or RoI overlap)
Definition at line 707 of file TrigNavStructure.cxx.
708 if (te1 == te2)
return true;
◆ printASCIIArt()
void TrigNavStructure::printASCIIArt |
( |
std::string & |
str, |
|
|
const TriggerElement * |
te = 0 , |
|
|
int |
offset = 0 |
|
) |
| const |
pretty printing of the navigational structure (heavy)
Definition at line 152 of file TrigNavStructure.cxx.
155 if ( initialNode == 0 )
158 std::lock_guard<std::recursive_mutex> lock(
getMutex());
165 if ( te == initialNode ) {
167 const std::vector< TriggerElement* >& allTEs = factory.
listOfProduced();
168 std::vector< TriggerElement* >::const_iterator allIt;
169 for (allIt = allTEs.begin(); allIt != allTEs.end(); ++allIt) {
183 ss <<
"id:" << dec << te->
getId() <<
";"
186 <<
"ptr:" << hex << te <<
";"
189 std::vector<TriggerElement*>::const_iterator seedIt;
209 for ( ;
it != itEnd; ++
it ) {
◆ propagateDeactivation()
propagates deactivation of TE state This finction should be used after Trigger is rerurn on L2 and then the reruning on L2 is required.
The deactivated lines must be propagated ahead.
- Parameters
-
nav | is navigation which was reprocessed (additional branches deactivated) |
- Returns
- true is all went fine, false in case it is spoted that the 2 navigation structures were not initially same
Definition at line 557 of file TrigNavStructure.cxx.
558 std::lock_guard<std::recursive_mutex> lock(
getMutex());
567 std::vector< TriggerElement* >::const_iterator
old = oldFactory.
listOfProduced().begin();
571 (*me)->setActiveState((*old)->getActiveState());
◆ reset()
void TrigNavStructure::reset |
( |
bool |
inFinalize = false | ) |
|
|
virtual |
◆ serialize()
virtual bool HLT::TrigNavStructure::serialize |
( |
std::vector< uint32_t > & |
| ) |
const |
|
pure virtual |
method serizlizes entire navigation
- Parameters
-
output | vector to place the result |
- Returns
- if true then OK else some sort of failure happened (likely badly truncated structure)
Implemented in HLT::NavigationCore, and HLT::StandaloneNavigation.
◆ serializeTEs()
bool TrigNavStructure::serializeTEs |
( |
std::vector< uint32_t > & |
output | ) |
const |
method serizlizes the navigation structure
- Parameters
-
output | vector to place the result |
- Returns
- if true then OK else some sort of failure happened (likely badly truncated structure)
Definition at line 217 of file TrigNavStructure.cxx.
218 std::lock_guard<std::recursive_mutex> lock(
getMutex());
223 const std::vector<TriggerElement*>& fullList = factory.
listOfProduced();
224 std::vector<TriggerElement*>
all;
225 all.reserve(fullList.size());
227 for(std::vector<TriggerElement*>::const_iterator iter = fullList.begin(); iter != fullList.end(); ++iter) {
228 if(! (*iter)->transient() ) {
229 all.push_back( *iter );
241 std::map<TriggerElement*, uint16_t>
keys;
244 std::vector<TriggerElement*>::const_iterator
it;
◆ subType()
◆ ATLAS_THREAD_SAFE [1/2]
◆ ATLAS_THREAD_SAFE [2/2]
std::string m_unspecifiedLabel HLT::TrigNavStructure::ATLAS_THREAD_SAFE |
|
staticprotected |
◆ m_factory
◆ m_holderstorage
structure for feature holders (one per processing slot)
Definition at line 383 of file TrigNavStructure.h.
◆ s_rmutex
std::recursive_mutex TrigNavStructure::s_rmutex |
|
staticprivate |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
void addFeature(class_id_type clid, const ObjectIndex &index, bool forget=false)
add helper for new feature
std::string find(const std::string &s)
return a remapped string
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
static bool isRoINode(const TriggerElement *te)
queries if node is an RoI type one
static std::recursive_mutex s_rmutex
@ seedsRelation
what TEs I am seeding
const std::vector< TriggerElement * > & listOfProduced() const
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()
te_id_type getId() const
reset internals.
class_id_type getCLID() const
Class ID of object.
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
bool getErrorState() 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
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
@ seededByRelation
what TEs are seeding me
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
const std::vector< TriggerElement * > & getRelated(Relation rel) const
returns reference to the likns to other TriggerElements related by relation r
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)
sub_index_type subTypeIndex() const
to get collection index
@ sameRoIRelation
equilateral relation of all TEs rooted in one RoI
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
HolderType * getHolderForFeature(const TriggerElement::FeatureAccessHelper &fea) const
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
void relate(TriggerElement *te, Relation r)
reates given TE to other TE
sub_index_type subType(class_id_type clid, const index_or_label_type &sti_or_label) const
@ initial
this is just the initial step we do, nothing really happens here
TrigHolderStructure & getHolderStorage()
static unsigned int enquireId(std::vector< uint32_t >::const_iterator &inputIt)
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.
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
static bool isInitialNode(const TriggerElement *te)
queries if node is an initial one
const ObjectIndex & getIndex() const
index in the external ojects array
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.
sub_index_type getSubTypeIndex(class_id_type clid, const index_or_label_type &stiOrLabel) const
const std::vector< FeatureAccessHelper > & getFeatureAccessHelpers() const
returns all features which ara attached to this TE
void deserialize(std::vector< uint32_t >::const_iterator &inputIt, const std::map< uint16_t, TriggerElement * > &keys, const TriggerElement *previous)
deserialization
TriggerElement * addNode(TriggerElement *seed, unsigned int id)
adds nodes seeded form the one given as an argument,
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 matchFeature(const TriggerElement::FeatureAccessHelper &fea, class_id_type clid, const index_or_label_type &index_or_label) const
TriggerElement * produce(unsigned int id, bool ghost=false, bool nofwd=false)
const std::vector< FeatureAccessHelper > & getPreviousFeatures() const
std::string getLabel(class_id_type clid, const index_or_label_type &stiOrLabel) const