ATLAS Offline Software
|
Classes | |
class | AlgToChainTool |
Provide the reverse mapping: algorithm name to set of chain names. More... | |
class | Combinations |
class | HasObject |
Prerequisite object usable with. More... | |
class | HasObjectCollection |
Prerequisite object usable with. More... | |
class | IPartCombItr |
class | KFromNItr |
Iterates over all combinations of k values chosen from a range n. More... | |
struct | LinkInfo |
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGroup) linked together (for convenience) More... | |
class | NavGraph |
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from, and forms a sub-graph over the full Run 3 trigger navigation graph in a single event. Requirements on specific chains, and the specification of allowable graph entry-points are considered in the construction of the NavGraph sub-graph. Once one of these sub-graphs is fully populated to a given specification, it is searched by the feature-retrieval code to find features. More... | |
class | NavGraphNode |
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_filteredSeeds) to other nodes which are parents of this node. More... | |
class | ProductItr |
Iterates over all combinations of the provided input iterators. More... | |
Typedefs | |
typedef xAOD::TrigComposite | Decision |
typedef xAOD::TrigCompositeAuxContainer | DecisionAuxContainer |
typedef xAOD::TrigCompositeContainer | DecisionContainer |
typedef unsigned int | DecisionID |
typedef std::set< DecisionID > | DecisionIDContainer |
using | sgkey_t = SG::sgkey_t |
typedef SG::WriteHandle< DecisionContainer > | DecisionWriteHandle |
alias types, for readability and to simplify future evolution More... | |
Enumerations | |
enum | FilterType { FilterType::All, FilterType::UniqueObjects, FilterType::UniqueRoIs, FilterType::UniqueInitialRoIs } |
enum | ActiveState { UNSET, ACTIVE, INACTIVE } |
Additional information returned by the TrigerDecisionTool's feature retrieval, contained within the LinkInfo. More... | |
Functions | |
bool | uniqueObjects (const std::vector< LinkInfo< xAOD::IParticleContainer >> &links) |
Helper fucntion that returns true if no objects are repeated. More... | |
bool | uniqueInitialRoIs (const std::vector< LinkInfo< xAOD::IParticleContainer >> &links) |
Helper function that returns true if no objects share an initial RoI. More... | |
bool | uniqueRoIs (const std::vector< LinkInfo< xAOD::IParticleContainer >> &links) |
Helper function that returns true if no objects share a final RoI. More... | |
std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer >> &)> | getFilter (FilterType filter) |
Get a lambda corresponding to the specified FilterType enum. More... | |
SG::WriteHandle< DecisionContainer > | createAndStore (const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx=Gaudi::Hive::currentContext()) |
Creates and right away records the DecisionContainer with the key. More... | |
void | createAndStore (SG::WriteHandle< DecisionContainer > &handle) |
Creates and right away records the DecisionContainer using the provided WriteHandle. More... | |
Decision * | newDecisionIn (DecisionContainer *dc, const std::string &name="") |
Helper method to create a Decision object, place it in the container and return a pointer to it. More... | |
Decision * | newDecisionIn (DecisionContainer *dc, const Decision *dOld, const std::string &name="", const EventContext &ctx=Gaudi::Hive::currentContext()) |
Helper method to create a Decision object, place it in the container and return a pointer to it. More... | |
void | addDecisionID (DecisionID id, Decision *d) |
Appends the decision (given as ID) to the decision object. More... | |
void | decisionIDs (const Decision *d, DecisionIDContainer &id) |
Extracts DecisionIDs stored in the Decision object. More... | |
const std::vector< DecisionID > & | decisionIDs (const Decision *d) |
Another variant of the above method to access DecisionIDs stored in the Decision object, returns const accessor. More... | |
std::vector< DecisionID > & | decisionIDs (Decision *d) |
Another variant of the above method to access DecisionIDs stored in the Decision object, returns read/write accessor. More... | |
void | insertDecisionIDs (const Decision *src, Decision *dest) |
Appends the decision IDs of src to the dest decision object. More... | |
void | insertDecisionIDs (const DecisionIDContainer &src, Decision *dest) |
Appends the decision IDs of src to the dest decision object. More... | |
void | uniqueDecisionIDs (Decision *dest) |
Make unique list of decision IDs of dest Decision object. More... | |
bool | allFailed (const Decision *d) |
return true if there is no positive decision stored More... | |
bool | isAnyIDPassing (const Decision *d, const DecisionIDContainer &required) |
Checks if any of the DecisionIDs passed in arg required is availble in Decision object. More... | |
bool | passed (DecisionID id, const DecisionIDContainer &) |
checks if required decision ID is in the set of IDs in the container More... | |
ElementLink< DecisionContainer > | decisionToElementLink (const Decision *d, const EventContext &ctx=Gaudi::Hive::currentContext()) |
Takes a raw pointer to a Decision and returns an ElementLink to the Decision. More... | |
void | linkToPrevious (Decision *d, const std::string &previousCollectionKey, size_t previousIndex) |
Links to the previous object, location of previous 'seed' decision supplied by hand. More... | |
void | linkToPrevious (Decision *d, const Decision *dOld, const EventContext &ctx=Gaudi::Hive::currentContext()) |
Links to the previous object, 'seed' decision provided explicitly. More... | |
bool | hasLinkToPrevious (const Decision *d) |
checks if there is at least one 'seed' link to previous object More... | |
const std::vector< ElementLink< DecisionContainer > > | getLinkToPrevious (const Decision *) |
returns links to previous decision object 'seed' More... | |
bool | copyLinks (const Decision *src, Decision *dest) |
copy all links from src to dest TC objects More... | |
HLT::Identifier | createLegName (const HLT::Identifier &chainIdentifier, size_t counter) |
Generate the HLT::Identifier which corresponds to a specific leg of a given chain. More... | |
HLT::Identifier | getIDFromLeg (const HLT::Identifier &legIdentifier) |
Generate the HLT::Identifier which corresponds to the chain name from the leg name. More... | |
int32_t | getIndexFromLeg (const HLT::Identifier &legIdentifier) |
Extract the numeric index of a leg identifier. More... | |
int32_t | getIndexFromLeg (const std::string &name) |
Extract the numeric index of a leg identifier. More... | |
bool | isLegId (const HLT::Identifier &legIdentifier) |
Recognise whether the chain ID is a leg ID. More... | |
bool | isLegId (const std::string &name) |
Recognise whether the chain ID is a leg ID. More... | |
bool | isChainId (const HLT::Identifier &chainIdentifier) |
Recognise whether the HLT identifier corresponds to a whole chain. More... | |
bool | isChainId (const std::string &name) |
Recognise whether the HLT identifier corresponds to a whole chain. More... | |
const Decision * | find (const Decision *, const std::function< bool(const Decision *)> &filter) |
traverses Decision object links for another Decision object fulfilling the prerequisite specified by the filter More... | |
const Decision * | getTerminusNode (SG::ReadHandle< DecisionContainer > &container) |
const Decision * | getTerminusNode (const DecisionContainer &container) |
Returns the terminus navigation node from a collection, assuming that the passed collection contains the terminus node. More... | |
const Decision * | getExpressTerminusNode (const DecisionContainer &container) |
Returns the express-accept navigation node from a collection or nullptr if missing. More... | |
const Decision * | getNodeByName (const DecisionContainer &container, const std::string &nodeName) |
Returns the navigation node with a given name from a collection or nullptr if missing. More... | |
std::vector< const Decision * > | getRejectedDecisionNodes (const asg::EventStoreType *eventStore, const std::string &summaryCollectionKey, const DecisionIDContainer &ids={}, const std::set< std::string > &keysToIgnore=std::set< std::string >()) |
Query all DecisionCollections in the event store, locate all Decision nodes in the graph where an object failed selection for a given chain. More... | |
void | recursiveGetDecisionsInternal (const Decision *node, const Decision *comingFrom, NavGraph &navGraph, std::set< const Decision * > &fullyExploredFrom, const DecisionIDContainer &ids, const bool enforceDecisionOnNode) |
Used by recursiveGetDecisions. More... | |
void | recursiveGetDecisions (const Decision *node, NavGraph &navGraph, const DecisionIDContainer &ids={}, const bool enforceDecisionOnStartNode=true) |
Search back in time from "node" and locate all paths back through Decision objects for a given chain. More... | |
void | recursiveFlagForThinning (NavGraph &node, const bool keepOnlyFinalFeatures, const bool removeEmptySteps, const std::vector< std::string > &nodesToDrop) |
Used by trigger navigation thinning. More... | |
void | recursiveFlagForThinningInternal (NavGraphNode *node, bool modeKeep, std::set< NavGraphNode * > &fullyExploredFrom, const bool keepOnlyFinalFeatures, const bool removeEmptySteps, const std::vector< std::string > &nodesToDrop) |
Used by recursiveFlagForThinning. More... | |
bool | typelessFindLinks (const Decision *start, const std::string &linkName, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< Decision::index_type > &indexVec, std::vector< const Decision * > &sourceVec, const unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const Decision * > *fullyExploredFrom=nullptr) |
search back the TC links for the object of type T linked to the one of TC (recursively) Returns the link data in a typeless way, as raw key, index and CLID values. More... | |
bool | typelessFindLinks (const NavGraphNode *start, const std::string &linkName, std::vector< sgkey_t > &key, std::vector< uint32_t > &clid, std::vector< Decision::index_type > &index, std::vector< const Decision * > &sourceVec, const unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const Decision * > *fullyExploredFrom=nullptr) |
Version of typelessFindLinks which operates on a sub-graph (entered via the supplied NavGraphNode), rather than the whole navigation graph. More... | |
bool | typelessFindLinksCommonLinkCollection (const Decision *start, const std::string &linkName, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< Decision::index_type > &indexVec, std::vector< const Decision * > &sourceVec) |
Common functionality shared by both typelessFindLinks interfaces Returns true if at least one link was collected. More... | |
bool | typelessFindLink (const Decision *start, const std::string &linkName, sgkey_t &key, uint32_t &clid, Decision::index_type &index, const Decision *&source, const bool suppressMultipleLinksWarning=false) |
Perform a recursive search for ElementLinks of any time and name 'linkName', starting from Decision object 'start' Returns the link data in a typeless way, as raw key, index and CLID values. More... | |
bool | typelessFindLink (const NavGraph &subGraph, const std::string &linkName, sgkey_t &key, uint32_t &clid, Decision::index_type &index, const Decision *&source, const bool suppressMultipleLinksWarning=false) |
Version of typelessFindLink which operates on a sub-graph (described by the NavGraph), rather than the whole navigation graph. More... | |
Combinations | buildCombinations (const std::string &chainName, const std::vector< LinkInfo< xAOD::IParticleContainer >> &features, const std::vector< std::size_t > &legMultiplicities, const std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer >> &)> &filter) |
Produce the combinations for a set of features. More... | |
Combinations | buildCombinations (const std::string &chainName, const std::vector< LinkInfo< xAOD::IParticleContainer >> &features, const std::vector< std::size_t > &legMultiplicities, FilterType filter=FilterType::UniqueObjects) |
Produce the combinations for a set of features. More... | |
Combinations | buildCombinations (const std::string &chainName, const std::vector< LinkInfo< xAOD::IParticleContainer >> &features, const TrigConf::HLTChain *chainInfo, const std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer >> &)> &filter) |
Produce the combinations for a set of features. More... | |
Combinations | buildCombinations (const std::string &chainName, const std::vector< LinkInfo< xAOD::IParticleContainer >> &features, const TrigConf::HLTChain *chainInfo, FilterType filter=FilterType::UniqueObjects) |
Produce the combinations for a set of features. More... | |
std::string | dump (const Decision *tc, const std::function< std::string(const Decision *)> &printerFnc) |
Prints the Decision object including the linked seeds @warnign expensive call. More... | |
template<class CONT > | |
SG::WriteHandle< CONT > | createAndStoreNoAux (const SG::WriteHandleKey< CONT > &key, const EventContext &ctx=Gaudi::Hive::currentContext()) |
Creates and right away records the Container CONT with the key. More... | |
template<class CONT , class AUX > | |
SG::WriteHandle< CONT > | createAndStoreWithAux (const SG::WriteHandleKey< CONT > &key, const EventContext &ctx=Gaudi::Hive::currentContext()) |
Creates and right away records the Container CONT with the key. More... | |
template<typename T > | |
DecisionIDContainer | passedDecisionIDs (const Decision *d, const T &required) |
return DecisionIDs in Decision object that match the required ones More... | |
template<class CONTAINER > | |
void | filterLinkVectorByContainerKey (const std::string &containerSGKey, std::vector< ElementLink< CONTAINER >> &vector) |
Removes ElementLinks from the supplied vector if they do not come from the specified collection (sub-string match). More... | |
template<class CONTAINER > | |
const std::vector< LinkInfo< CONTAINER > > | recursiveGetFeaturesOfType (const NavGraph &navGraph, const std::string &containerSGKey="", const bool lastFeatureOfType=true, const std::string &navElementLinkKey=featureString(), const DecisionIDContainer &chainIDs=DecisionIDContainer()) |
Extract features from the supplied linkVector (obtained through recursiveGetDecisions). More... | |
template<class CONTAINER > | |
void | recursiveGetFeaturesOfTypeInternal (std::vector< LinkInfo< CONTAINER > > &features, std::set< const NavGraphNode * > &fullyExploredFrom, const NavGraphNode *navGraphNode, const std::string &containerSGKey, const bool lastFeatureOfType, const std::string &navElementLinkKey, const DecisionIDContainer &chainIDs) |
Internal implimentation called by recursiveGetFeaturesOfType, and by itself. More... | |
template<typename T > | |
LinkInfo< T > | findLink (const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false) |
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision object 'start' For the case of multiple links, this function only returns the first one found. More... | |
template<typename T > | |
void | findLinks (const Decision *start, const std::string &linkName, std::vector< LinkInfo< T >> &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr) |
search back the TC links for the object of type T linked to the one of TC (recursively) Populates provided vector with all located links to T of the corresponding linkName. More... | |
template<typename T > | |
std::vector< LinkInfo< T > > | findLinks (const Decision *start, const std::string &linkName, unsigned int behaviour=TrigDefs::allFeaturesOfType) |
search back the TC links for the object of type T linked to the one of TC (recursively) This version returns a vector rather than requiring that one be passed to it. More... | |
Definition at line 20 of file Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h.
Definition at line 20 of file TrigCompositeAuxContainer.h.
Definition at line 21 of file Event/xAOD/xAODTrigger/xAODTrigger/TrigCompositeContainer.h.
typedef unsigned int TrigCompositeUtils::DecisionID |
Definition at line 27 of file TrigComposite_v1.h.
typedef std::set<DecisionID> TrigCompositeUtils::DecisionIDContainer |
Definition at line 28 of file TrigComposite_v1.h.
alias types, for readability and to simplify future evolution
Definition at line 51 of file TrigCompositeUtils.h.
using TrigCompositeUtils::sgkey_t = typedef SG::sgkey_t |
Definition at line 45 of file TrigCompositeUtils.h.
Additional information returned by the TrigerDecisionTool's feature retrieval, contained within the LinkInfo.
Enumerator | |
---|---|
UNSET | Default property of state. Indicates that the creator of the LinkInfo did not supply this information |
ACTIVE | The link was still active for one-or-more of the HLT Chains requested in the TDT. |
INACTIVE | The link was inactive for all of the HLT Chains requested in the TDT. I.e. the object was rejected by these chains. |
Definition at line 18 of file LinkInfo.h.
|
strong |
Definition at line 21 of file IPartCombItr.h.
void TrigCompositeUtils::addDecisionID | ( | DecisionID | id, |
Decision * | d | ||
) |
Appends the decision (given as ID) to the decision object.
Definition at line 61 of file TrigCompositeUtilsRoot.cxx.
return true if there is no positive decision stored
Definition at line 103 of file TrigCompositeUtilsRoot.cxx.
Combinations TrigCompositeUtils::buildCombinations | ( | const std::string & | chainName, |
const std::vector< LinkInfo< xAOD::IParticleContainer >> & | features, | ||
const std::vector< std::size_t > & | legMultiplicities, | ||
const std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer >> &)> & | filter | ||
) |
Produce the combinations for a set of features.
Returns a TrigCompositeUtils::Combinations object that generates all valid combinations of features. This is a range object that returns on iterator which creates the combinations on the fly.
[in] | chainName | The name of the chain |
[in] | features | The IParticle features of the container |
[in] | legMultiplicities | The multiplicity of each chain leg. If a leg will not produce an IParticle feature its multiplicity should be set to 0 |
[in] | filter | A function that returns true for all valid combinations |
Definition at line 800 of file TrigCompositeUtilsRoot.cxx.
Combinations TrigCompositeUtils::buildCombinations | ( | const std::string & | chainName, |
const std::vector< LinkInfo< xAOD::IParticleContainer >> & | features, | ||
const std::vector< std::size_t > & | legMultiplicities, | ||
FilterType | filter = FilterType::UniqueObjects |
||
) |
Produce the combinations for a set of features.
Returns a TrigCompositeUtils::Combinations object that generates all valid combinations of features. This is a range object that returns on iterator which creates the combinations on the fly.
[in] | chainName | The name of the chain |
[in] | features | The IParticle features of the container |
[in] | legMultiplicities | The multiplicity of each chain leg. If a leg will not produce an IParticle feature its multiplicity should be set to 0 |
[in] | filter | A FilterType enum describing how to filter valid combinations |
Definition at line 827 of file TrigCompositeUtilsRoot.cxx.
Combinations TrigCompositeUtils::buildCombinations | ( | const std::string & | chainName, |
const std::vector< LinkInfo< xAOD::IParticleContainer >> & | features, | ||
const TrigConf::HLTChain * | chainInfo, | ||
const std::function< bool(const std::vector< LinkInfo< xAOD::IParticleContainer >> &)> & | filter | ||
) |
Produce the combinations for a set of features.
Returns a TrigCompositeUtils::Combinations object that generates all valid combinations of features. This is a range object that returns on iterator which creates the combinations on the fly.
Note that if any legs of this chain do not have IParticle features this will not generate any combinations.
[in] | chainName | The name of the chain |
[in] | features | The IParticle features of the container |
[in] | chainInfo | The chain info object read from the configuration |
[in] | filter | A function that returns true for all valid combinations |
Definition at line 836 of file TrigCompositeUtilsRoot.cxx.
Combinations TrigCompositeUtils::buildCombinations | ( | const std::string & | chainName, |
const std::vector< LinkInfo< xAOD::IParticleContainer >> & | features, | ||
const TrigConf::HLTChain * | chainInfo, | ||
FilterType | filter = FilterType::UniqueObjects |
||
) |
Produce the combinations for a set of features.
Returns a TrigCompositeUtils::Combinations object that generates all valid combinations of features. This is a range object that returns on iterator which creates the combinations on the fly.
Note that if any legs of this chain do not have IParticle features this will not generate any combinations.
[in] | chainName | The name of the chain |
[in] | features | The IParticle features of the container |
[in] | chainInfo | The chain info object read from the configuration |
[in] | filter | A FilterType enum describing how to filter valid combinations |
Definition at line 845 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::comboHypoAlgNodeName | ( | ) |
Definition at line 908 of file TrigCompositeUtilsRoot.cxx.
copy all links from src to dest TC objects
Definition at line 161 of file TrigCompositeUtilsRoot.cxx.
SG::WriteHandle< DecisionContainer > TrigCompositeUtils::createAndStore | ( | const SG::WriteHandleKey< DecisionContainer > & | key, |
const EventContext & | ctx = Gaudi::Hive::currentContext() |
||
) |
Creates and right away records the DecisionContainer with the key.
Returns the WriteHandle. If possible provide the context that comes via an argument to execute otherwise it will default to looking it up which is slower.
Definition at line 30 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::createAndStore | ( | SG::WriteHandle< DecisionContainer > & | handle | ) |
Creates and right away records the DecisionContainer using the provided WriteHandle.
Definition at line 39 of file TrigCompositeUtilsRoot.cxx.
SG::WriteHandle<CONT> TrigCompositeUtils::createAndStoreNoAux | ( | const SG::WriteHandleKey< CONT > & | key, |
const EventContext & | ctx = Gaudi::Hive::currentContext() |
||
) |
Creates and right away records the Container CONT with the key.
Returns the WriteHandle. No Aux store. If possible provide the context that comes via an argument to execute otherwise it will default to looking it up which is slower.
SG::WriteHandle<CONT> TrigCompositeUtils::createAndStoreWithAux | ( | const SG::WriteHandleKey< CONT > & | key, |
const EventContext & | ctx = Gaudi::Hive::currentContext() |
||
) |
Creates and right away records the Container CONT with the key.
Returns the WriteHandle. With Aux store. If possible provide the context that comes via an argument to execute otherwise it will default to looking it up which is slower.
HLT::Identifier TrigCompositeUtils::createLegName | ( | const HLT::Identifier & | chainIdentifier, |
size_t | counter | ||
) |
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
This can be queried for its DecisionID.
chainIdentifier | The HLT::Identifier corresponding to the chain. |
counter | The numeral of the leg. |
Definition at line 166 of file TrigCompositeUtilsRoot.cxx.
const std::vector< DecisionID > & TrigCompositeUtils::decisionIDs | ( | const Decision * | d | ) |
Another variant of the above method to access DecisionIDs stored in the Decision object, returns const accessor.
Definition at line 72 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::decisionIDs | ( | const Decision * | d, |
DecisionIDContainer & | destination | ||
) |
std::vector< DecisionID > & TrigCompositeUtils::decisionIDs | ( | Decision * | d | ) |
Another variant of the above method to access DecisionIDs stored in the Decision object, returns read/write accessor.
Definition at line 76 of file TrigCompositeUtilsRoot.cxx.
ElementLink< DecisionContainer > TrigCompositeUtils::decisionToElementLink | ( | const Decision * | d, |
const EventContext & | ctx = Gaudi::Hive::currentContext() |
||
) |
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
The Decision must already be in a container in SG.
Definition at line 122 of file TrigCompositeUtilsRoot.cxx.
std::string TrigCompositeUtils::dump | ( | const Decision * | tc, |
const std::function< std::string(const Decision *)> & | printerFnc | ||
) |
Prints the Decision object including the linked seeds @warnign expensive call.
Definition at line 855 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::featureString | ( | ) |
Definition at line 884 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::filterLinkVectorByContainerKey | ( | const std::string & | containerSGKey, |
std::vector< ElementLink< CONTAINER >> & | vector | ||
) |
Removes ElementLinks from the supplied vector if they do not come from the specified collection (sub-string match).
[in] | containerSGKey | The StoreGate key of the collection to match against. Performs sub-string matching. Passing "" performs no filtering. |
[in,out] | vector | Mutable vector of ElementLinks on which to filter. |
const std::string & TrigCompositeUtils::filterNodeName | ( | ) |
Definition at line 896 of file TrigCompositeUtilsRoot.cxx.
const Decision * TrigCompositeUtils::find | ( | const Decision * | , |
const std::function< bool(const Decision *)> & | filter | ||
) |
traverses Decision object links for another Decision object fulfilling the prerequisite specified by the filter
Definition at line 221 of file TrigCompositeUtilsRoot.cxx.
LinkInfo<T> TrigCompositeUtils::findLink | ( | const Decision * | start, |
const std::string & | linkName, | ||
const bool | suppressMultipleLinksWarning = false |
||
) |
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision object 'start' For the case of multiple links, this function only returns the first one found.
[in] | start | the Decision Object from where recursive search should begin |
[in] | linkName | the name of the ElementLink stored inside one or more DecisionObjects. |
[in] | suppressMultipleLinksWarning | findLink will print a warning if more than one ElementLink is found, this can be silenced here. |
void TrigCompositeUtils::findLinks | ( | const Decision * | start, |
const std::string & | linkName, | ||
std::vector< LinkInfo< T >> & | links, | ||
unsigned int | behaviour = TrigDefs::allFeaturesOfType , |
||
std::set< const xAOD::TrigComposite * > * | fullyExploredFrom = nullptr |
||
) |
search back the TC links for the object of type T linked to the one of TC (recursively) Populates provided vector with all located links to T of the corresponding linkName.
[in] | start | the Decision Object from where recursive search should begin |
[in] | linkName | the name of the ElementLink stored inside one or more DecisionObjects. |
[in,out] | links | Reference to vector, this will be populated with the found links. |
[in] | behaviour | TrigDefs::allFeaturesOfType to explore all branches of the navigation graph all the way back to the HLTSeeding, or TrigDefs::lastFeatureOfType to exit early from each branch once a link has been located and collected. |
[in,out] | fullyExploredFrom | Optional cache used by the recursive algorithm to avoid exploring each node multiple times. |
std::vector<LinkInfo<T> > TrigCompositeUtils::findLinks | ( | const Decision * | start, |
const std::string & | linkName, | ||
unsigned int | behaviour = TrigDefs::allFeaturesOfType |
||
) |
search back the TC links for the object of type T linked to the one of TC (recursively) This version returns a vector rather than requiring that one be passed to it.
[in] | start | the Decision Object from where recursive search should begin |
[in] | linkName | the name of the ElementLink stored inside one or more DecisionObjects. |
[in] | behaviour | TrigDefs::allFeaturesOfType to explore all branches of the navigation graph all the way back to the HLTSeeding, or TrigDefs::lastFeatureOfType to exit early from each branch once a link has been located and collected. |
const Decision * TrigCompositeUtils::getExpressTerminusNode | ( | const DecisionContainer & | container | ) |
Returns the express-accept navigation node from a collection or nullptr if missing.
[in] | container | Collection of navigation nodes |
Definition at line 251 of file TrigCompositeUtilsRoot.cxx.
std::function<bool(const std::vector<LinkInfo<xAOD::IParticleContainer>> &)> TrigCompositeUtils::getFilter | ( | FilterType | filter | ) |
Get a lambda corresponding to the specified FilterType enum.
Definition at line 69 of file IPartCombItr.cxx.
HLT::Identifier TrigCompositeUtils::getIDFromLeg | ( | const HLT::Identifier & | legIdentifier | ) |
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
This can be queried for its DecisionID.
legIdentifier | The HLT::Identifier corresponding to the specific leg. |
Definition at line 180 of file TrigCompositeUtilsRoot.cxx.
int32_t TrigCompositeUtils::getIndexFromLeg | ( | const HLT::Identifier & | legIdentifier | ) |
Extract the numeric index of a leg identifier.
legIdentifier | The HLT::Identifier corresponding to the specific leg. |
Definition at line 191 of file TrigCompositeUtilsRoot.cxx.
int32_t TrigCompositeUtils::getIndexFromLeg | ( | const std::string & | name | ) |
Extract the numeric index of a leg identifier.
name | The name of the HLT::Identifier corresponding to the specific leg. |
Definition at line 195 of file TrigCompositeUtilsRoot.cxx.
const std::vector< ElementLink< DecisionContainer > > TrigCompositeUtils::getLinkToPrevious | ( | const Decision * | d | ) |
returns links to previous decision object 'seed'
Definition at line 156 of file TrigCompositeUtilsRoot.cxx.
const Decision * TrigCompositeUtils::getNodeByName | ( | const DecisionContainer & | container, |
const std::string & | nodeName | ||
) |
Returns the navigation node with a given name from a collection or nullptr if missing.
[in] | container | Collection of navigation nodes |
[in] | nodeName | The name of the node to find |
Definition at line 255 of file TrigCompositeUtilsRoot.cxx.
std::vector< const Decision * > TrigCompositeUtils::getRejectedDecisionNodes | ( | const asg::EventStoreType * | eventStore, |
const std::string & | summaryCollectionKey, | ||
const DecisionIDContainer & | ids = {} , |
||
const std::set< std::string > & | keysToIgnore = std::set< std::string >() |
||
) |
Query all DecisionCollections in the event store, locate all Decision nodes in the graph where an object failed selection for a given chain.
[in] | eventStore | Pointer to event store within current event context |
[in] | summaryCollectionKey | The primary source of navigation data in the event (i.e the collection which contains the navigation terminus node). |
[in] | ids | IDs of chain (if multi-leg chain, include all legs) to located failed decision nodes for. Passing an empty set returns all decision nodes which failed at least one chain. |
[in] | keysToIgnore | Set of SG keys of containers which should not be explored by getRejectedDecisionNodes. |
Definition at line 261 of file TrigCompositeUtilsRoot.cxx.
const Decision * TrigCompositeUtils::getTerminusNode | ( | const DecisionContainer & | container | ) |
Returns the terminus navigation node from a collection, assuming that the passed collection contains the terminus node.
[in] | container | Collection of navigation nodes which contains the terminus node |
Definition at line 247 of file TrigCompositeUtilsRoot.cxx.
const Decision * TrigCompositeUtils::getTerminusNode | ( | SG::ReadHandle< DecisionContainer > & | container | ) |
Definition at line 243 of file TrigCompositeUtilsRoot.cxx.
checks if there is at least one 'seed' link to previous object
Definition at line 152 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::hltSeedingNodeName | ( | ) |
Definition at line 892 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::hypoAlgNodeName | ( | ) |
Definition at line 904 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::initialRecRoIString | ( | ) |
Definition at line 872 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::initialRoIString | ( | ) |
Definition at line 868 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::inputMakerNodeName | ( | ) |
Definition at line 900 of file TrigCompositeUtilsRoot.cxx.
Appends the decision IDs of src to the dest decision object.
Definition at line 80 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::insertDecisionIDs | ( | const DecisionIDContainer & | src, |
Decision * | dest | ||
) |
Appends the decision IDs of src to the dest decision object.
Definition at line 86 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::isAnyIDPassing | ( | const Decision * | d, |
const DecisionIDContainer & | required | ||
) |
Checks if any of the DecisionIDs passed in arg required is availble in Decision object.
Definition at line 108 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::isChainId | ( | const HLT::Identifier & | chainIdentifier | ) |
Recognise whether the HLT identifier corresponds to a whole chain.
chainIdentifier | The HLT::Identifier corresponding to the specific ID. |
Definition at line 212 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::isChainId | ( | const std::string & | name | ) |
Recognise whether the HLT identifier corresponds to a whole chain.
name | The name of the HLT::Identifier corresponding to the specific ID. |
Definition at line 216 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::isLegId | ( | const HLT::Identifier & | legIdentifier | ) |
Recognise whether the chain ID is a leg ID.
legIdentifier | The HLT::Identifier corresponding to the specific ID. |
Definition at line 204 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::isLegId | ( | const std::string & | name | ) |
Recognise whether the chain ID is a leg ID.
name | The name of the HLT::Identifier corresponding to the specific ID. |
Definition at line 208 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::linkToPrevious | ( | Decision * | d, |
const Decision * | dOld, | ||
const EventContext & | ctx | ||
) |
Links to the previous object, 'seed' decision provided explicitly.
Definition at line 148 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::linkToPrevious | ( | Decision * | d, |
const std::string & | previousCollectionKey, | ||
size_t | previousIndex | ||
) |
Links to the previous object, location of previous 'seed' decision supplied by hand.
Definition at line 139 of file TrigCompositeUtilsRoot.cxx.
Decision * TrigCompositeUtils::newDecisionIn | ( | DecisionContainer * | dc, |
const Decision * | dOld, | ||
const std::string & | name = "" , |
||
const EventContext & | ctx = Gaudi::Hive::currentContext() |
||
) |
Helper method to create a Decision object, place it in the container and return a pointer to it.
RoI, view and feature links will be copied from the previous to the new decision and a "seed" link made between them
Definition at line 55 of file TrigCompositeUtilsRoot.cxx.
Decision * TrigCompositeUtils::newDecisionIn | ( | DecisionContainer * | dc, |
const std::string & | name = "" |
||
) |
Helper method to create a Decision object, place it in the container and return a pointer to it.
This is to make this: auto d = newDecisionIn(output); instead of: auto d = new Decision; output->push_back(d);
If provided, the name is assigned to the TC object Note that the supplied DecisionContainer must have been recorded in the event store. If possible provide the context that comes via an argument to execute otherwise it will default to looking it up which is slower.
Definition at line 46 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::passed | ( | DecisionID | id, |
const DecisionIDContainer & | idSet | ||
) |
checks if required decision ID is in the set of IDs in the container
Definition at line 117 of file TrigCompositeUtilsRoot.cxx.
DecisionIDContainer TrigCompositeUtils::passedDecisionIDs | ( | const Decision * | d, |
const T & | required | ||
) |
return DecisionIDs in Decision object that match the required ones
required
is a container of (values convertable to) DecisionIDs void TrigCompositeUtils::recursiveFlagForThinning | ( | NavGraph & | node, |
const bool | keepOnlyFinalFeatures, | ||
const bool | removeEmptySteps, | ||
const std::vector< std::string > & | nodesToDrop | ||
) |
Used by trigger navigation thinning.
Recursive function. Explore all possible paths back through the navigation graph from the given node. Flag nodes as "keep" during the exploration, nodes not flagged as "keep" will be thinned if thin() is called on the NavGraph.
[in] | keepOnlyFinalFeatures | Set this to true for analysis-level slimming, when only trigger-matching is needed downstream. |
[in] | nodesToDrop | Optional list of node names. Nodes whose name matches an entry in this list will never be flagged as "keep". |
Definition at line 435 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::recursiveFlagForThinningInternal | ( | NavGraphNode * | node, |
bool | modeKeep, | ||
std::set< NavGraphNode * > & | fullyExploredFrom, | ||
const bool | keepOnlyFinalFeatures, | ||
const bool | removeEmptySteps, | ||
const std::vector< std::string > & | nodesToDrop | ||
) |
Used by recursiveFlagForThinning.
Definition at line 447 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::recursiveGetDecisions | ( | const Decision * | node, |
NavGraph & | navGraph, | ||
const DecisionIDContainer & | ids = {} , |
||
const bool | enforceDecisionOnStartNode = true |
||
) |
Search back in time from "node" and locate all paths back through Decision objects for a given chain.
[in] | node | The Decision object to start the search from. Typically this will be one of the terminus objects from the HLTNav_Summary. |
[in,out] | navPaths | Holds a sub-graph of the full navigation graph, filtered by DecisionID. An already partially populated graph may be provided as input. |
[in] | ids | Optional DecisionIDContainer of Chains / Chain-Legs to trace through the navigation. If omitted, no chain requirement will be applied. |
[in] | enforceDecisionOnStartNode | If the check of DecisionID should be carried out on the start node. enforceDecisionOnStartNode should be true if navigating for a trigger which passed (e.g. starting from HLTPassRaw) enforceDecisionOnStartNode should be false if navigating for a trigger which failed but whose failing start node(s) were recovered via getRejectedDecisionNodes |
Definition at line 422 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::recursiveGetDecisionsInternal | ( | const Decision * | node, |
const Decision * | comingFrom, | ||
NavGraph & | navGraph, | ||
std::set< const Decision * > & | fullyExploredFrom, | ||
const DecisionIDContainer & | ids, | ||
const bool | enforceDecisionOnNode | ||
) |
Used by recursiveGetDecisions.
comingFrom | The parent node which has a link in the navigation to this "node" @paramp[inout] fullyExploredFrom Cache to avoid exploring graph branches more than once |
Definition at line 383 of file TrigCompositeUtilsRoot.cxx.
const std::vector< LinkInfo<CONTAINER> > TrigCompositeUtils::recursiveGetFeaturesOfType | ( | const NavGraph & | navGraph, |
const std::string & | containerSGKey = "" , |
||
const bool | lastFeatureOfType = true , |
||
const std::string & | navElementLinkKey = featureString() , |
||
const DecisionIDContainer & | chainIDs = DecisionIDContainer() |
||
) |
Extract features from the supplied linkVector (obtained through recursiveGetDecisions).
[in] | navPaths | Sub-graph of the trigger navigation which is to be considered. |
[in] | lastFeatureOfType | True for TrigDefs::lastFeatureOfType. stops at the first feature (of the correct type) found per path through the navigation. |
[in] | featureName | Optional name of feature link as saved online. The "feature" link is enforced, others may have been added. |
[in] | chains | Optional set of Chain IDs which features are being requested for. Used to set the ActiveState of returned LinkInfo objects. |
void TrigCompositeUtils::recursiveGetFeaturesOfTypeInternal | ( | std::vector< LinkInfo< CONTAINER > > & | features, |
std::set< const NavGraphNode * > & | fullyExploredFrom, | ||
const NavGraphNode * | navGraphNode, | ||
const std::string & | containerSGKey, | ||
const bool | lastFeatureOfType, | ||
const std::string & | navElementLinkKey, | ||
const DecisionIDContainer & | chainIDs | ||
) |
Internal implimentation called by recursiveGetFeaturesOfType, and by itself.
[in,out] | features | The untimate return vector. New links are to be appended. |
[in,out] | fullyExploredFrom | Cache of graph nodes which have been fully explored, and hence don't need exploring again should they show up. |
[in] | navGraphNode | The current node in the navGraph which is being explored. |
const std::string & TrigCompositeUtils::roiString | ( | ) |
Definition at line 876 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::seedString | ( | ) |
Definition at line 888 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::summaryFilterNodeName | ( | ) |
Definition at line 912 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::summaryPassExpressNodeName | ( | ) |
Definition at line 920 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::summaryPassNodeName | ( | ) |
Definition at line 916 of file TrigCompositeUtilsRoot.cxx.
const std::string & TrigCompositeUtils::summaryPrescaledNodeName | ( | ) |
Definition at line 924 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::typelessFindLink | ( | const Decision * | start, |
const std::string & | linkName, | ||
sgkey_t & | key, | ||
uint32_t & | clid, | ||
Decision::index_type & | index, | ||
const Decision *& | source, | ||
const bool | suppressMultipleLinksWarning = false |
||
) |
Perform a recursive search for ElementLinks of any time and name 'linkName', starting from Decision object 'start' Returns the link data in a typeless way, as raw key, index and CLID values.
These may be reconstituted into a typed ElementLink. For the case of multiple links, this function only returns the first one found.
[in] | start | the Decision Object from where recursive search should begin |
[in] | linkName | the name of the ElementLink stored inside one or more DecisionObjects. |
[out] | key | The storegate key (hash) of the located link's collection |
[out] | clid | The class ID of the link's collection |
[out] | index | The link's index inside its collection. |
[out] | source | The link's originating Decision object. |
[in] | suppressMultipleLinksWarning | findLink will print a warning if more than one ElementLink is found, this can be silenced here. |
Definition at line 723 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::typelessFindLink | ( | const NavGraph & | subGraph, |
const std::string & | linkName, | ||
sgkey_t & | key, | ||
uint32_t & | clid, | ||
Decision::index_type & | index, | ||
const Decision *& | source, | ||
const bool | suppressMultipleLinksWarning = false |
||
) |
Version of typelessFindLink which operates on a sub-graph (described by the NavGraph), rather than the whole navigation graph.
If the supplied NavGraph has more than one entry point, then all will be explored.
Definition at line 761 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::typelessFindLinks | ( | const Decision * | start, |
const std::string & | linkName, | ||
std::vector< sgkey_t > & | keyVec, | ||
std::vector< uint32_t > & | clidVec, | ||
std::vector< Decision::index_type > & | indexVec, | ||
std::vector< const Decision * > & | sourceVec, | ||
const unsigned int | behaviour = TrigDefs::allFeaturesOfType , |
||
std::set< const Decision * > * | fullyExploredFrom = nullptr |
||
) |
search back the TC links for the object of type T linked to the one of TC (recursively) Returns the link data in a typeless way, as raw key, index and CLID values.
These may be reconstituted into a typed ElementLink. Populates provided vectors with all located links of the corresponding linkName.
[in] | start | the Decision Object from where recursive search should begin |
[in] | linkName | the name of the ElementLink stored inside one or more DecisionObjects. |
[in,out] | keyVec | The return vector of the storegate key (hash) of the located link's collection |
[in,out] | clidVec | The return vector of the class ID of the link's collection |
[in,out] | indexVec | The return vector of the link's index inside its collection. |
[in,out] | sourceVec | The return vector of the link's originating Decision object. |
[in] | behaviour | TrigDefs::allFeaturesOfType to explore all branches of the navigation graph all the way back to the HLTSeeding, or TrigDefs::lastFeatureOfType to exit early from each branch once a link has been located and collected. |
[in,out] | fullyExploredFrom | Optional cache used by the recursive algorithm to avoid exploring each node multiple times. |
Definition at line 579 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::typelessFindLinks | ( | const NavGraphNode * | start, |
const std::string & | linkName, | ||
std::vector< sgkey_t > & | keyVec, | ||
std::vector< uint32_t > & | clidVec, | ||
std::vector< Decision::index_type > & | indexVec, | ||
std::vector< const Decision * > & | sourceVec, | ||
const unsigned int | behaviour, | ||
std::set< const Decision * > * | fullyExploredFrom | ||
) |
Version of typelessFindLinks which operates on a sub-graph (entered via the supplied NavGraphNode), rather than the whole navigation graph.
Definition at line 625 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::typelessFindLinksCommonLinkCollection | ( | const Decision * | start, |
const std::string & | linkName, | ||
std::vector< sgkey_t > & | keyVec, | ||
std::vector< uint32_t > & | clidVec, | ||
std::vector< Decision::index_type > & | indexVec, | ||
std::vector< const Decision * > & | sourceVec | ||
) |
Common functionality shared by both typelessFindLinks interfaces Returns true if at least one link was collected.
Definition at line 673 of file TrigCompositeUtilsRoot.cxx.
void TrigCompositeUtils::uniqueDecisionIDs | ( | Decision * | dest | ) |
Make unique list of decision IDs of dest Decision object.
Definition at line 97 of file TrigCompositeUtilsRoot.cxx.
bool TrigCompositeUtils::uniqueInitialRoIs | ( | const std::vector< LinkInfo< xAOD::IParticleContainer >> & | links | ) |
Helper function that returns true if no objects share an initial RoI.
Definition at line 43 of file IPartCombItr.cxx.
bool TrigCompositeUtils::uniqueObjects | ( | const std::vector< LinkInfo< xAOD::IParticleContainer >> & | links | ) |
Helper fucntion that returns true if no objects are repeated.
Definition at line 34 of file IPartCombItr.cxx.
bool TrigCompositeUtils::uniqueRoIs | ( | const std::vector< LinkInfo< xAOD::IParticleContainer >> & | links | ) |
Helper function that returns true if no objects share a final RoI.
Definition at line 56 of file IPartCombItr.cxx.
const std::string & TrigCompositeUtils::viewString | ( | ) |
Definition at line 880 of file TrigCompositeUtilsRoot.cxx.