ATLAS Offline Software
Namespaces | Functions
TrigCompositeUtilsRoot.cxx File Reference
#include "xAODBase/IParticleContainer.h"
#include "AsgDataHandles/WriteHandle.h"
#include "AsgDataHandles/ReadHandle.h"
#include "AthContainers/AuxElement.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
#include <unordered_map>
#include <regex>
#include <iomanip>
#include <mutex>
Include dependency graph for TrigCompositeUtilsRoot.cxx:

Go to the source code of this file.

Namespaces

 TrigCompositeUtils
 

Functions

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. More...
 
void TrigCompositeUtils::createAndStore (SG::WriteHandle< DecisionContainer > &handle)
 Creates and right away records the DecisionContainer using the provided WriteHandle. More...
 
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. More...
 
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. More...
 
void TrigCompositeUtils::addDecisionID (DecisionID id, Decision *d)
 Appends the decision (given as ID) to the decision object. More...
 
void TrigCompositeUtils::decisionIDs (const Decision *d, DecisionIDContainer &id)
 Extracts DecisionIDs stored in the Decision object. More...
 
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. More...
 
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. More...
 
void TrigCompositeUtils::insertDecisionIDs (const Decision *src, Decision *dest)
 Appends the decision IDs of src to the dest decision object. More...
 
void TrigCompositeUtils::insertDecisionIDs (const DecisionIDContainer &src, Decision *dest)
 Appends the decision IDs of src to the dest decision object. More...
 
void TrigCompositeUtils::uniqueDecisionIDs (Decision *dest)
 Make unique list of decision IDs of dest Decision object. More...
 
bool TrigCompositeUtils::allFailed (const Decision *d)
 return true if there is no positive decision stored More...
 
bool TrigCompositeUtils::isAnyIDPassing (const Decision *d, const DecisionIDContainer &required)
 Checks if any of the DecisionIDs passed in arg required is availble in Decision object. More...
 
bool TrigCompositeUtils::passed (DecisionID id, const DecisionIDContainer &)
 checks if required decision ID is in the set of IDs in the container More...
 
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. More...
 
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. More...
 
void TrigCompositeUtils::linkToPrevious (Decision *d, const Decision *dOld, const EventContext &ctx=Gaudi::Hive::currentContext())
 Links to the previous object, 'seed' decision provided explicitly. More...
 
bool TrigCompositeUtils::hasLinkToPrevious (const Decision *d)
 checks if there is at least one 'seed' link to previous object More...
 
const std::vector< ElementLink< DecisionContainer > > TrigCompositeUtils::getLinkToPrevious (const Decision *)
 returns links to previous decision object 'seed' More...
 
bool TrigCompositeUtils::copyLinks (const Decision *src, Decision *dest)
 copy all links from src to dest TC objects More...
 
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. More...
 
HLT::Identifier TrigCompositeUtils::getIDFromLeg (const HLT::Identifier &legIdentifier)
 Generate the HLT::Identifier which corresponds to the chain name from the leg name. More...
 
int32_t TrigCompositeUtils::getIndexFromLeg (const HLT::Identifier &legIdentifier)
 Extract the numeric index of a leg identifier. More...
 
int32_t TrigCompositeUtils::getIndexFromLeg (const std::string &name)
 Extract the numeric index of a leg identifier. More...
 
bool TrigCompositeUtils::isLegId (const HLT::Identifier &legIdentifier)
 Recognise whether the chain ID is a leg ID. More...
 
bool TrigCompositeUtils::isLegId (const std::string &name)
 Recognise whether the chain ID is a leg ID. More...
 
bool TrigCompositeUtils::isChainId (const HLT::Identifier &chainIdentifier)
 Recognise whether the HLT identifier corresponds to a whole chain. More...
 
bool TrigCompositeUtils::isChainId (const std::string &name)
 Recognise whether the HLT identifier corresponds to a whole chain. More...
 
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 More...
 
const Decision * TrigCompositeUtils::getTerminusNode (SG::ReadHandle< DecisionContainer > &container)
 
const Decision * TrigCompositeUtils::getTerminusNode (const DecisionContainer &container)
 Returns the terminus navigation node from a collection, assuming that the passed collection contains the terminus node. More...
 
const Decision * TrigCompositeUtils::getExpressTerminusNode (const DecisionContainer &container)
 Returns the express-accept navigation node from a collection or nullptr if missing. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void TrigCompositeUtils::recursiveFlagForThinning (NavGraph &node, const bool keepOnlyFinalFeatures, const bool removeEmptySteps, const std::vector< std::string > &nodesToDrop)
 Used by trigger navigation thinning. More...
 
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. More...
 
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. More...
 
bool TrigCompositeUtils::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 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...