|
ATLAS Offline Software
|
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
More...
#include <NavigationCore.h>
|
| NavigationCore (const AthAlgTool &logger) |
| constructor with parent AlgTool for printing More...
|
|
virtual | ~NavigationCore ()=default |
|
virtual void | prepare () |
| prepapres the navigation for next event More...
|
|
virtual void | reset (bool inFinalize=false) |
| resets all the navigation, goes to the factory and asks to withdraw all produced objects More...
|
|
virtual bool | serialize (std::vector< uint32_t > &output) const |
| method serizlizes the navigation structure The structure is serrizlized in following order ... More...
|
|
bool | serialize (std::vector< uint32_t > &output, std::vector< unsigned int > &cuts) const |
|
bool | serialize (std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const |
|
bool | serialize_DSonly (std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const |
|
bool | deserialize (const std::vector< uint32_t > &input) |
|
template<class T > |
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 More...
|
|
template<class T > |
bool | getFeature (const TriggerElement *te, const T *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const |
|
template<class T > |
bool | getFeature (const TriggerElement *te, const ConstDataVector< T > *&features, const std::string &label="", std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const |
|
template<class T > |
const T * | featureLink2Object (const TrigFeatureLink &) const |
|
template<class T > |
TrigFeatureLink | object2FeatureLink (const TriggerElement *te, const std::string &label, const T *obj) const |
|
template<class C > |
TrigFeatureLink | object2FeatureLink (const TriggerElement *te, const std::string &label, const typename Container2Object< C >::type *obj, const C *container) const |
|
template<class C , class T > |
bool | getFeaturesLinks (const TriggerElement *te, ElementLinkVector< C > &links, const std::string &label="") const |
|
template<class T > |
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 recursively to all predecessors and once the feature is found attached to given TE returns all features (of this type and label) attached to this TE More...
|
|
template<class T > |
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 |
|
template<class LinkType > |
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 |
|
template<class C , class T > |
bool | getRecentFeaturesLinks (const TriggerElement *te, ElementLinkVector< C > &links, const std::string &label="") const |
|
template<class C , class T > |
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 |
|
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 above. More...
|
|
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 |
|
template<class T > |
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 More...
|
|
template<class C , class T > |
bool | getAllFeatures (ElementLinkVector< C > &features, const std::string &label="") const |
| gets all features of type T atachedd to whichever TE More...
|
|
bool | merge (const NavigationCore &l2) |
| attemtps to merge two trees More...
|
|
void | getAllOfType (const std::string &id, std::vector< HLT::TriggerElement * > &output, const bool activeOnly=true) const |
| return trigger elements given the name of TEs More...
|
|
const AccessProxy * | getAccessProxy () const |
| gets the access proxy More...
|
|
template<class T > |
HLTNavDetails::Holder< T > * | getHolder (uint16_t subTypeIndex) const |
| as above but does not create holder on demand (return 0 if not found) 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) |
|
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 |
|
|
template<class T , class C > |
static void | registerFeatureContainer () |
| Specialized by type and container for this type. More...
|
|
static uint32_t | string2hash (const std::string &, const std::string &category="TE") |
| convert strin g to hash. More...
|
|
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...
|
|
|
bool | createHolder (HLTNavDetails::IHolder *&holder, CLID clid, const std::string &label, uint16_t idx) const |
| creates holder for type given by CLID More...
|
|
bool | registerHolder (HLTNavDetails::IHolder *holder) |
|
template<class T > |
HLTNavDetails::Holder< T > * | getHolder (const std::string &label, uint16_t suggestedIndex) const |
| aware holder discovery, creates holder if needed More...
|
|
HLTNavDetails::IHolder * | getHolder (CLID clid, uint16_t subTypeIndex) const |
| as above but not type wise holder returned More...
|
|
HLTNavDetails::IHolder * | getHolder (CLID clid, const std::string &label) const |
| as above 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...
|
|
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 |
|
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...
|
|
TriggerElementFactory & | getFactory () |
|
const TriggerElementFactory & | getFactory () const |
|
TrigHolderStructure & | getHolderStorage () |
|
const TrigHolderStructure & | getHolderStorage () const |
|
std::recursive_mutex & | getMutex () |
|
std::recursive_mutex & | getMutex () const |
|
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
HLTNavDetails::IHolder * | prepareOneHolder (CLID clid, const std::string &label) |
|
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 | 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 |
|
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 |
|
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
- Author
- Tomasz Bold Tomas.nosp@m.z.Bo.nosp@m.ld@ce.nosp@m.rn.c.nosp@m.h - U. of California - Irvine
-
Till Eifert Till..nosp@m.Eife.nosp@m.rt@ce.nosp@m.rn.c.nosp@m.h - U. of Geneva, Switzerland
-
Nicolas Berger Nicol.nosp@m.as.B.nosp@m.erger.nosp@m.@cer.nosp@m.n.ch - CERN
-
Lukas Heinrich lukas.nosp@m..hei.nosp@m.nrich.nosp@m.@cer.nosp@m.n.ch - NYU
The created nodes are given to user with all the navigational links prepared
- features attaching and retrieval (the retrieval is implemented by this class whilc the attachement only needed in athena is in the HLTNavgation tool)
- attaching feature to node
- attaching feature to RoI node ( therefore all TE originating from node can use it )
- attaching feature to initial (root) node for global (event wide) features
- retrieval of features attached to given node
- retrieval of features attached to given node or any predecessor (back to an initial node)
- retrieval of features attached to given node or any predecessor (traversing back to an initial node)
- retrieval of recent feature attached to given node or any predecessor (traversing back to an initial node)
- retrieval of features attached to RoI nodes of given TriggerElement
- retrieval of features attached to initial (root) node
Documentation of EDM related upgrade:
- objects storage
- all possible types are known at compile time (Scott's magic)
- configured collections are placed in the SG always independently of the event content
- there can be more collection of given type (one for each user label i.e. there can be several of tracks collections depending on the reconstruction)
the object of given type are then organized then as follows: there is many collections of given type per event (each for one label) this collections are accessible by label or "SubTypeIndex" uint16_t - it is used to save space in the creation of the link from TE to the feature
Is is like this collection of type T |XXXXXXX| label: ID subTypeIndex: 0 collection of type T |XXXX| label: MS subTypeIndex: 1 collection of type T |XXXXXXXXXXXXX| label: Muons subTypeIndex: 2 collection of type T |XXXXXXXX| label: Calo subTypeIndex: 3 (nothe that the association is not hardcoeded anywhere and can change from event to event. For that reason the association between the label and SubTypeIndex is recorded.)
- the features <-> TE link
- Features are located in supercontainers DataVector<TrigVertexCollection>
- each label yields in one supercontainer (the unlabeled objects are in the container with HLT_label)
- The link to object in the TE is composed out of 2 numbers CLID, and index
- index (from above) is composed out of 2 parts collection coordinate and second is coordinate within collection
- collection index and inter-collection index are uint16_t word which means we are limited to 65000 collections of given type and same number of objects in each sub collection (this has been lifted up actually)
Definition at line 96 of file NavigationCore.h.
◆ MemoryManagement
defines 3 possible origins of the objects which are attached to TEs This should be used like this:
- All the objects which are produced out of blue using "new" operator should be attached with ObjectCreatedByNew switch. This objects may also go to SG depending on configuration.
- All objects which needs to be registered in the StoreGate should be registered using switch "ObjectToStoreGate" which tells basically thet SG take control over the cleanup. All objects registered like this will for sure go to SG.
- the switch "ObjectInStoreGate" should be used for objects which are already in SG. (i.e. put there by offline reco. tools).
Enumerator |
---|
ObjectInStoreGate | |
ObjectToStoreGate | |
ObjectCreatedByNew | |
Definition at line 157 of file NavigationCore.h.
◆ NavigationCore()
◆ ~NavigationCore()
virtual HLT::NavigationCore::~NavigationCore |
( |
| ) |
|
|
virtualdefault |
◆ addNode() [1/2]
TriggerElement * TrigNavStructure::addNode |
( |
std::vector< TriggerElement * > & |
seeds, |
|
|
unsigned int |
id, |
|
|
bool |
ghost = false , |
|
|
bool |
nofwd = false |
|
) |
| |
|
inherited |
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 HLT::NavigationCore::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.
◆ addRoINode()
◆ combine()
bool TrigNavStructure::combine |
( |
std::vector< unsigned int > & |
types, |
|
|
std::vector< std::vector< TriggerElement * > > & |
output, |
|
|
unsigned int |
maxResults = 1000 , |
|
|
bool |
onlyActive = true |
|
) |
| |
|
inherited |
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 |
|
inherited |
◆ createHolder()
creates holder for type given by CLID
Definition at line 365 of file NavigationCore.cxx.
366 ATH_MSG_DEBUG(
"createHolder: creating holder for CLID: " << clid <<
" label: " <<
label <<
" and index: " <<
index);
371 ATH_MSG_ERROR(
"createHolder: creation of holder for CLID: " << clid <<
" label: " <<
label <<
" and index: " <<
index <<
" failed");
374 holder =
dynamic_cast<IHolder*
>(baseholder);
◆ decreasingOrderByTEId()
◆ deserialize()
bool NavigationCore::deserialize |
( |
const std::vector< uint32_t > & |
input | ) |
|
|
virtual |
Implements HLT::TrigNavStructure.
Definition at line 151 of file NavigationCore.cxx.
152 std::lock_guard<std::recursive_mutex> lock(
getMutex());
155 std::vector<uint32_t>::const_iterator inputIt =
input.begin();
160 if (
input.size()==0) {
164 unsigned int version = *inputIt++;
169 ATH_MSG_WARNING(
"No backward compatibility beyond version 3 possible; data was serialized with V: " <<
version
170 <<
" while we are in version 4");
180 if (
input.size() == 2 ) {
181 ATH_MSG_WARNING(
"deserialize: the navigation is truncated badly, no recovery possible " );
186 ATH_MSG_DEBUG(
"deserialize: TEs structure unpacked, status: " << tesDeserializationStatus );
192 struct DeserializedMemo
195 EventContext::ContextEvt_t m_evt;
196 std::unordered_map<uint64_t, std::shared_ptr<HLT::BaseHolder>> m_holders;
200 const EventContext& ctx = Gaudi::Hive::currentContext();
201 DeserializedMemo& memo = *memos.get (ctx);
202 std::scoped_lock memolock (memo.m_mutex);
203 if (memo.m_evt != ctx.evt()) {
204 memo.m_holders.clear();
205 memo.m_evt = ctx.evt();
210 std::vector<uint32_t>::const_iterator
it = inputIt;
211 std::vector<uint32_t>
blob;
218 auto& holder = memo.m_holders[
hash];
222 if (! holder )
continue;
225 <<
" already deserialized; re-using holder");
229 ATH_MSG_WARNING(
"deserialize: holder registration for holder with clid: " << holder->typeClid() <<
" and label: " << holder->label() <<
" failed.");
◆ deserializeTEs()
bool TrigNavStructure::deserializeTEs |
( |
std::vector< uint32_t >::const_iterator & |
start, |
|
|
unsigned int |
totalSize |
|
) |
| |
|
inherited |
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;
◆ extractBlob()
bool NavigationCore::extractBlob |
( |
const std::vector< uint32_t > & |
input, |
|
|
std::vector< uint32_t >::const_iterator & |
it, |
|
|
std::vector< uint32_t > & |
blob |
|
) |
| const |
|
protected |
Definition at line 60 of file NavigationCore.cxx.
65 unsigned sizeOfBlob = *
it;
66 std::vector<uint32_t>::const_iterator
begin =
it;
68 std::vector<uint32_t>::const_iterator
end =
it;
70 advance(
end, sizeOfBlob);
◆ featureLink2Object()
◆ 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;
◆ getAccessProxy()
◆ getAll()
void TrigNavStructure::getAll |
( |
std::vector< TriggerElement * > & |
output, |
|
|
const bool |
activeOnly = true |
|
) |
| const |
|
inherited |
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 );
◆ getAllFeatures()
template<class C , class T >
bool HLT::NavigationCore::getAllFeatures |
( |
ElementLinkVector< C > & |
features, |
|
|
const std::string & |
label = "" |
|
) |
| const |
gets all features of type T atachedd to whichever TE
- Parameters
-
features | vector of pointers to features to which will be filled up |
label | the label for a given feature |
labels | list of all features of this type already in place and thier labels (of not specified) faster query |
- Returns
- true if no errors encountered
◆ getAllOfType() [1/2]
◆ getAllOfType() [2/2]
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 |
|
inherited |
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() [1/3]
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();
◆ getFeature() [2/3]
◆ getFeature() [3/3]
template<class T >
bool HLT::NavigationCore::getFeature |
( |
const TriggerElement * |
te, |
|
|
const T *& |
features, |
|
|
const std::string & |
label = "" , |
|
|
std::string & |
sourcelabel = ::HLT::TrigNavStructure::m_unspecifiedLabel |
|
) |
| const |
◆ getFeatureAccessors()
retrieve features accessors according to the requrements This method is actually workhorse for all above.
I.e. the TEs structure traversing happens inside it.
- Parameters
-
te | is TriggerElement at which searching starts |
clid | is ClassID of type which is searched for |
label | is object label (as used by attachFeature), empty lables (i.e. == "") means any label, nonempty label means exact matching, and noverlty label == "!" means we are specifically looking for empty label |
only_single_feature | if true means we are looking for only one last object (i.e. imagine several object of the same type attached to TE) |
features | vector of FeatureAccessHelper objects to fill up |
travel_backward_recursively | if true will doe actual travering TriggerElement structure to find objects, if false search will stop at the TriggerElement te |
source | TriggerElement where the object was found (or query stopped) |
sourcelabel | is labels which the object had (useful when calling this routine with empty label) |
Reimplemented from HLT::TrigNavStructure.
Definition at line 410 of file NavigationCore.cxx.
◆ getFeatureAccessorsSingleTE()
◆ 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();
◆ getFeatures()
template<class T >
bool HLT::NavigationCore::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
- Parameters
-
te | TriggerElement from retrieve |
features | is collection to be feed |
label | for additional marking of this feature |
labels | list of all features of this type already in place and thier labels |
- Returns
- false if error enountered, true if no error encountered
- Warning
- No error (return true) does not mean that features were found, therefore what has to be checked is ... returned bool and size of features vector (if it has grew).
◆ getFeaturesInRoI()
template<class T >
bool HLT::NavigationCore::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
- Parameters
-
te | TriggerElement from which start |
features | is collection to be feed |
label | for additional marking of this feature |
- Returns
- false if error enountered, true if no error encountered
- Parameters
-
labels | list of all features of this type already in place and thier labels (of not specified) faster query |
- Warning
- No error (return true) does not mean that features were found, therefore what has to be checked is ... returned bool and size of features vector (if it has grew).
◆ getFeaturesLinks()
template<class C , class T >
◆ getHolder() [1/5]
IHolder * NavigationCore::getHolder |
( |
CLID |
clid, |
|
|
const std::string & |
label |
|
) |
| const |
|
protected |
◆ getHolder() [2/5]
IHolder * NavigationCore::getHolder |
( |
CLID |
clid, |
|
|
uint16_t |
subTypeIndex |
|
) |
| const |
|
protected |
as above but not type wise holder returned
Definition at line 383 of file NavigationCore.cxx.
384 std::lock_guard<std::recursive_mutex> lock(
getMutex());
◆ getHolder() [3/5]
aware holder discovery, creates holder if needed
◆ getHolder() [4/5]
◆ getHolder() [5/5]
as above but does not create holder on demand (return 0 if not found)
◆ 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 |
( |
| ) |
|
|
inlineprotectedinherited |
◆ getMutex() [2/2]
std::recursive_mutex& HLT::TrigNavStructure::getMutex |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ getRecentFeature()
template<class T >
bool HLT::NavigationCore::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 |
◆ getRecentFeatureDataOrElementLink()
template<class LinkType >
bool HLT::NavigationCore::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 |
◆ getRecentFeatureLink()
template<class C , class T >
bool HLT::NavigationCore::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 |
◆ getRecentFeatures()
template<class T >
bool HLT::NavigationCore::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 recursively to all predecessors and once the feature is found attached to given TE returns all features (of this type and label) attached to this TE
- Parameters
-
te | TriggerElement from which to start |
features | is vector to be filled up |
label | for additional marking of this feature |
labels | list of all features of this type already in place and thier labels (of not specified) faster query |
- Returns
- false if error enountered, true if no error encountered
- Warning
- No error (return true) does not mean that features were found, therefore what has to be checked is ... returned bool and feature ptr != 0;
◆ getRecentFeaturesLinks()
template<class C , class T >
◆ 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 |
|
) |
| |
|
staticinherited |
◆ 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;
◆ merge()
attemtps to merge two trees
Definition at line 235 of file NavigationCore.cxx.
236 std::lock_guard<std::recursive_mutex> l2lock(
l2.getMutex());
242 std::string
label(l2holder->label());
244 if ( efholder != 0 ) {
245 if ( (efholder->
label() != l2holder->label())
246 || (efholder->
subTypeIndex() != l2holder->subTypeIndex()) ) {
260 bool status =
createHolder(efholder, l2holder->typeClid(),l2holder->label(), l2holder->subTypeIndex());
266 if(efholder->
key()!=l2holder->key()){
267 ATH_MSG_WARNING(
"in merge the created EF holder has different SG access key than L2 holder we tried to copy");
◆ msg() [1/2]
MsgStream& HLT::NavigationCore::msg |
( |
| ) |
const |
|
inlineprivate |
◆ msg() [2/2]
MsgStream& HLT::NavigationCore::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineprivate |
◆ msgLvl()
bool HLT::NavigationCore::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineprivate |
◆ nextSubTypeIndex()
uint16_t NavigationCore::nextSubTypeIndex |
( |
CLID |
clid, |
|
|
const std::string & |
label |
|
) |
| const |
|
protected |
Definition at line 287 of file NavigationCore.cxx.
288 std::lock_guard<std::recursive_mutex> lock(
getMutex());
293 if ( holders.empty() )
296 std::vector<sub_index_type> sub_indices(holders.size());
297 std::transform(holders.begin(), holders.end(), sub_indices.begin(),
300 return (*std::max_element(sub_indices.begin(),sub_indices.end()))+1;
◆ object2FeatureLink() [1/2]
◆ object2FeatureLink() [2/2]
◆ 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;
◆ prepare()
void NavigationCore::prepare |
( |
| ) |
|
|
virtual |
prepapres the navigation for next event
Definition at line 335 of file NavigationCore.cxx.
338 ATH_MSG_VERBOSE(
"NavigationCore::prepare Compile time known types : " << *holder);
349 ATH_MSG_WARNING(
"NavigationCore::prepare failed preparing the holder for CLID: " << clid <<
" and label " <<
label);
352 ATH_MSG_DEBUG(
"NavigationCore::prepare Navigation structure prepared for next event");
◆ prepareOneHolder()
Definition at line 303 of file NavigationCore.cxx.
305 ATH_MSG_VERBOSE(
"NavigationCore::prepare preregistering objects of clid: " << clid <<
" label: " <<
label);
308 ATH_MSG_VERBOSE(
"NavigationCore::prepare preregistering objects not executed as it already exists " << *holder);
313 ATH_MSG_VERBOSE(
"NavigationCore::prepare creating handler for type (CLID): " << clid
314 <<
" label: " <<
label <<
" index: " <<
index);
317 ATH_MSG_INFO(
"NavigationCore::prepare Can't create storage for objects of CLID: " << clid <<
" as it is requested by configuration");
321 ATH_MSG_VERBOSE(
"Holder created, registering " << holder <<
" " << *holder);
324 ATH_MSG_WARNING(
"Holder registration failed " << holder <<
" " << *holder);
◆ printASCIIArt()
void TrigNavStructure::printASCIIArt |
( |
std::string & |
str, |
|
|
const TriggerElement * |
te = 0 , |
|
|
int |
offset = 0 |
|
) |
| const |
|
inherited |
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());
◆ registerFeatureContainer()
template<class T , class C >
static void HLT::NavigationCore::registerFeatureContainer |
( |
| ) |
|
|
static |
◆ registerHolder()
Definition at line 355 of file NavigationCore.cxx.
356 std::lock_guard<std::recursive_mutex> lock(
getMutex());
359 auto shared_holder = std::shared_ptr<HLT::BaseHolder>(holder);
◆ reset()
void NavigationCore::reset |
( |
bool |
inFinalize = false | ) |
|
|
virtual |
◆ serialize() [1/3]
bool NavigationCore::serialize |
( |
std::vector< uint32_t > & |
output | ) |
const |
|
virtual |
method serizlizes the navigation structure The structure is serrizlized in following order ...
- TEs(together with links)
- features in accordane to the lists given in property ClassesToPayload
The truncation mechainsm. The parameter space should be given to the method. No more space than that will be ever taken. But since the actuall space limitation is not known at the time whrn this call happens additional list of safe to cut places is returned. One may ask why no tonly this cuts. ... Answer is follwing. If the event is huge then giving this rought limit would make procedure faster since not all features will be serialized. Otherwice they would be serialized and then thrown away, which is waste of CPU. For safe operation one can easilly make space huge (like 2MB) and not care. But for online such tuning can be considered. Space can be given as a property.
- Parameters
-
output | vector to place the result |
cuts | are indexes where one can safely cut the navigation |
- Returns
- if true then OK if false then truncated because of missing space - if output.size() != 0 if false and output.size() == 0 internal error
Implements HLT::TrigNavStructure.
Definition at line 81 of file NavigationCore.cxx.
82 std::vector<unsigned int>
cuts;
◆ serialize() [2/3]
bool NavigationCore::serialize |
( |
std::vector< uint32_t > & |
output, |
|
|
std::vector< unsigned int > & |
cuts |
|
) |
| const |
Definition at line 86 of file NavigationCore.cxx.
87 std::vector<std::pair<CLID, std::string> > clid_name;
◆ serialize() [3/3]
bool NavigationCore::serialize |
( |
std::vector< uint32_t > & |
output, |
|
|
std::vector< unsigned int > & |
cuts, |
|
|
std::vector< std::pair< CLID, std::string > > & |
clid_name |
|
) |
| const |
Definition at line 92 of file NavigationCore.cxx.
93 std::vector<uint32_t> holderdata;
94 std::vector<unsigned int> holderblobsizes;
96 std::lock_guard<std::recursive_mutex> lock(
getMutex());
◆ serialize_DSonly()
bool NavigationCore::serialize_DSonly |
( |
std::vector< uint32_t > & |
output, |
|
|
std::vector< unsigned int > & |
cuts, |
|
|
std::vector< std::pair< CLID, std::string > > & |
clid_name |
|
) |
| const |
Definition at line 123 of file NavigationCore.cxx.
124 std::vector<uint32_t> holderdata;
125 std::vector<unsigned int> holderblobsizes;
◆ serializeHoldersWithoutPayload()
bool NavigationCore::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 |
|
private |
Definition at line 502 of file NavigationCore.cxx.
503 for(
auto& holder : holders){
504 ATH_MSG_DEBUG(
"serialization of feature: " << holder->typeClid() <<
" label: " << holder->label()
505 <<
" size of payload: " <<
output.size());
507 std::vector<uint32_t> holderblob;
508 bool status = holder->serialize(holderblob);
513 output.push_back(holderblob.size());
514 output.insert(
output.end(),holderblob.begin(),holderblob.end());
516 holderblobsizes.push_back(1+holderblob.size());
517 clid_name.push_back(std::pair < CLID, std::string> (holder->typeClid(), holder->label()));
◆ serializeHoldersWithPayload()
bool NavigationCore::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 |
|
private |
Definition at line 468 of file NavigationCore.cxx.
474 ATH_MSG_DEBUG(
"serialization (ordered) of featue attempting : " <<
cl.first <<
" " <<
cl.second);
478 ATH_MSG_DEBUG(
"serialization (ordered) of feature skipped, nothing know on this objects" );
482 <<
" size of payload up to now: " <<
output.size());
484 std::vector<uint32_t> holderblob;
485 size_t payloadsize = 0;
492 output.push_back(holderblob.size());
493 output.insert(
output.end(),holderblob.begin(),holderblob.end());
495 holderblobsizes.push_back(1+holderblob.size());
496 clid_name.push_back(std::pair < CLID, std::string> (holder->
typeClid(), holder->
label()));
◆ serializeTEs()
bool TrigNavStructure::serializeTEs |
( |
std::vector< uint32_t > & |
output | ) |
const |
|
inherited |
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;
◆ serializeWithHolderSection()
bool NavigationCore::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 |
|
private |
Definition at line 436 of file NavigationCore.cxx.
446 unsigned int totalSizeIndex =
output.size();
454 ATH_MSG_DEBUG(
"serializes: TE serialization status: " << tesSerializationStatus <<
" size: " <<
output.size());
458 output.insert(
output.end(),holderdata.begin(),holderdata.end());
460 for(
auto hc : holderblobsizes){
cuts.push_back(
cuts.back()+hc);}
◆ string2hash()
uint32_t NavigationCore::string2hash |
( |
const std::string & |
s, |
|
|
const std::string & |
category = "TE" |
|
) |
| |
|
static |
◆ subType()
◆ ::TrigBStoxAODTool
◆ ::TrigNavigationThinningSvc
◆ HLT::TrigNavTools::SlimmingHelper
◆ ATLAS_THREAD_SAFE [1/2]
◆ ATLAS_THREAD_SAFE [2/2]
std::string m_unspecifiedLabel HLT::TrigNavStructure::ATLAS_THREAD_SAFE |
|
staticprotectedinherited |
◆ m_classesFromPayloadIgnoreProperty
std::vector<std::string> HLT::NavigationCore::m_classesFromPayloadIgnoreProperty |
|
protected |
list of classes::keys to ignore on deserialization
Definition at line 394 of file NavigationCore.h.
◆ m_classesToPayload
std::vector<CSPair> HLT::NavigationCore::m_classesToPayload |
|
protected |
classess are put to payload according to that priority list (CLID + key)
Definition at line 389 of file NavigationCore.h.
◆ m_classesToPayload_DSonly
std::vector<CSPair> HLT::NavigationCore::m_classesToPayload_DSonly |
|
protected |
classess are put to payload according to that priority list (CLID + key)
Definition at line 392 of file NavigationCore.h.
◆ m_classesToPayloadProperty
std::vector<std::string> HLT::NavigationCore::m_classesToPayloadProperty |
|
protected |
◆ m_classesToPayloadProperty_DSonly
std::vector<std::string> HLT::NavigationCore::m_classesToPayloadProperty_DSonly |
|
protected |
◆ m_classesToPreregister
std::vector<CSPair> HLT::NavigationCore::m_classesToPreregister |
|
protected |
classes mentioned here will be put to SG irrespectively of thier presence in event
Definition at line 397 of file NavigationCore.h.
◆ m_classesToPreregisterProperty
std::vector<std::string> HLT::NavigationCore::m_classesToPreregisterProperty |
|
protected |
◆ m_factory
◆ m_holderfactory
◆ m_holderstorage
structure for feature holders (one per processing slot)
Definition at line 383 of file TrigNavStructure.h.
◆ m_logger
◆ m_objectsIndexOffset
unsigned HLT::NavigationCore::m_objectsIndexOffset |
|
protected |
◆ m_objectsKeyPrefix
std::string HLT::NavigationCore::m_objectsKeyPrefix |
|
protected |
property setting prefix which is to be given to all trigger EDM objects
Definition at line 371 of file NavigationCore.h.
◆ m_serializerSvc
IConversionSvc* HLT::NavigationCore::m_serializerSvc |
|
protected |
◆ m_storeGate
◆ s_rmutex
std::recursive_mutex TrigNavStructure::s_rmutex |
|
staticprivateinherited |
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
HLTNavDetails::IHolder * prepareOneHolder(CLID clid, const std::string &label)
void getAll(std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements.
std::string find(const std::string &s)
return a remapped string
const std::string & label() const
returns the label of objects stores by this holder
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
static bool isRoINode(const TriggerElement *te)
queries if node is an RoI type one
unsigned m_objectsIndexOffset
small integer used to generate sub type index
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)
bool extractBlob(const std::vector< uint32_t > &input, std::vector< uint32_t >::const_iterator &it, std::vector< uint32_t > &blob) const
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)
static const CLIDtoHolderMap & holders()
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 uint32_t string2hash(const std::string &, const std::string &category="TE")
convert strin g to hash.
bool getErrorState() const
std::vector< HolderType * > getHoldersOfClid(class_id_type clid) const
#define ATH_MSG_VERBOSE(x)
bool createHolder(HLTNavDetails::IHolder *&holder, CLID clid, const std::string &label, uint16_t idx) const
creates holder for type given by CLID
bool registerHolder(const std::shared_ptr< BaseHolder > &holder)
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
HLTNavDetails::Holder< T > * getHolder(uint16_t subTypeIndex) const
as above but does not create holder on demand (return 0 if not found)
virtual bool syncWithSG(SG::OwnershipPolicy policy=SG::OWN_ELEMENTS)=0
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
std::vector< CSPair > m_classesToPayload
classess are put to payload according to that priority list (CLID + key)
Maintain a set of objects, one per slot.
bool deserializeTEs(std::vector< uint32_t >::const_iterator &start, unsigned int totalSize)
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 serializeTEs(std::vector< uint32_t > &output) const
method serizlizes the navigation structure
@ 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)
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
HolderType * getHolderForFeature(const TriggerElement::FeatureAccessHelper &fea) const
ITrigHolderFactory * m_holderfactory
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
void relate(TriggerElement *te, Relation r)
reates given TE to other TE
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
uint16_t nextSubTypeIndex(CLID clid, const std::string &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)
bool msgLvl(const MSG::Level lvl) const
uint32_t CLID
The Class ID type.
uint64_t crc64(const CRCTable &table, const char *data, size_t data_len)
Find the CRC-64 of a string,.
IConversionSvc * m_serializerSvc
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 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
StoreGateSvc * m_storeGate
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
virtual BaseHolder * createHolder(class_id_type clid, const std::string &label, sub_index_type index) const =0
static const std::vector< TriggerElement * > & getRoINodes(const TriggerElement *somenode)
gets all RoI type nodes seeding indirectly this TriggerElement
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 ....
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)
virtual CLID typeClid() const =0
returns the CLID of objects stores by this holder
the FeatureAccessHelper is a class used to keep track of features attached to this TE.
#define ATH_MSG_WARNING(x)
uint16_t subTypeIndex() const
returns the index (short number used when linking object to the TE) of objects stores by this holder
sub_index_type getSubTypeIndex(class_id_type clid, const index_or_label_type &stiOrLabel) const
bool registerHolder(HLTNavDetails::IHolder *holder)
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
virtual BaseHolder * fromSerialized(int version, const std::vector< uint32_t >::const_iterator &start, const std::vector< uint32_t >::const_iterator &end)=0
std::vector< HolderType * > getAllHolders() const
TriggerElement * addNode(TriggerElement *seed, unsigned int id)
adds nodes seeded form the one given as an argument,
virtual const std::string & key() const =0
returns the containers StoreGate key
std::vector< CSPair > m_classesToPayload_DSonly
classess are put to payload according to that priority list (CLID + key)
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
HolderType * getHolder(class_id_type clid, const std::variant< sub_index_type, std::string > &stiOrLabel) const
bool matchFeature(const TriggerElement::FeatureAccessHelper &fea, class_id_type clid, const index_or_label_type &index_or_label) const
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
TriggerElement * produce(unsigned int id, bool ghost=false, bool nofwd=false)
const std::vector< FeatureAccessHelper > & getPreviousFeatures() 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
const AthAlgTool & m_logger
std::string getLabel(class_id_type clid, const index_or_label_type &stiOrLabel) const
bool serializeWithPayload(const xAOD::AuxSelection &sel, std::vector< uint32_t > &output, size_t &payloadsize)
serializes this Holder including payload