|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef XAOD_STANDALONE // Athena or AthAnalysis
16 m_filteredSeeds(), m_filteredChildren(), m_keepFlag(false)
22 if (
it == container.end()) {
23 container.push_back(
toAdd);
86 if (comingFrom ==
nullptr) {
90 if (comingFromPairIt.second)
m_nodes.push_back( std::unique_ptr<NavGraphNode>(
new NavGraphNode(comingFrom)) );
92 const bool newEdge = comingFromNodeObj.
linksTo( &nodeObj );
105 std::vector<NavGraphNode*> returnVec;
106 returnVec.reserve(
m_nodes.size());
109 returnVec.push_back( &nodeObj );
125 std::vector<const Decision*> returnVec;
126 std::vector<std::unique_ptr<NavGraphNode>>
::iterator it;
128 if ((*it)->getKeep()) {
132 returnVec.push_back((*it)->node());
141 const std::vector<NavGraphNode*> myParents = toBeDeleted.
seeds();
142 const std::vector<NavGraphNode*> myChildren = toBeDeleted.
children();
147 bool newEdge = child->linksTo(
parent);
156 child->dropLinks(&toBeDeleted);
160 parent->dropLinks(&toBeDeleted);
176 std::stringstream
ss;
177 for (
size_t i = 0;
i <
level; ++
i) {
181 ss <<
"|-> " << nodeEL.
dataID() <<
" #" << nodeEL.
index() <<
" Name(" <<
node->
name() <<
") Passing(" <<
node->decisions().size() <<
")";
188 #ifndef XAOD_STANDALONE // Athena or AthAnalysis
191 ss <<
" Feature(#" <<
index <<
", " <<
key <<
")";
JetConstituentVector::iterator iterator
bool linksTo(NavGraphNode *to)
Form an edge in the graph from this node to another one.
std::string find(const std::string &s)
return a remapped string
void recursivePrintNavPath(const NavGraphNode &nav, size_t level, MsgStream &log, MSG::Level msgLevel) const
@bried Internal helper function.
const std::vector< NavGraphNode * > & finalNodes() const
Get all final nodes.
const std::vector< NavGraphNode * > & seeds() const
Return a vector of const pointers to the Decision object nodes which this NavGraphNode seeds from.
size_t m_edges
Statistics on the number of edges, connecting the nodes in the graph.
static const std::type_info * CLIDToTypeinfo(CLID clid)
Translate between CLID and type_info.
std::vector< NavGraphNode * > allNodes()
Get all nodes.
void addNode(const Decision *node, const Decision *comingFrom=nullptr)
Add a new NavGraphNode which shadows the xAOD Decision object "node" from the full navigation graph.
void printAllPaths(MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const
Helper function.
void dropLinks(NavGraphNode *node)
Forget about any graph edges to the supplied node.
std::vector< std::unique_ptr< NavGraphNode > > m_nodes
Vector of unique pointers to nodes in the graph.
NavGraphNode(const Decision *me)
Construct a NavGraphNode shadowing a node in the full xAOD navigation graph.
const ID_type & dataID() const
Get the key that we reference, as a string.
const std::vector< NavGraphNode * > & children() const
Return a vector of const pointers to the Decision object nodes which are the children of this NavGrap...
bool m_keepFlag
Keep this node when slimming the NavGraph.
const std::string & initialRoIString()
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
const Decision * m_decisionObject
The Decision object node which I shadow.
NavGraph()
Construct an empty NavGraph.
Class used to describe composite objects in the HLT.
void resetKeep()
Reset the keep flag to false upon finishing thinning.
ElementLink implementation for ROOT usage.
const std::string & featureString()
void name(const std::string &n)
void rewireNodeForRemoval(NavGraphNode &toBeDeleted)
Take all seeds (parents) of the supplied node and connect them to all the node's children.
const Decision * node() const
Return a const pointer to the Decision object node which this NavGraphNode is shadowing.
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
std::map< const Decision *, size_t > m_nodePositionMap
Map of Decision pointer and index of the node(that contains the Decision) in m_nodes.
a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead.
std::vector< NavGraphNode * > m_finalNodes
Entry points into the navigation graph.
Define the type used for hashed StoreGate key+CLID pairs.
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
index_type index() const
Get the index of the element inside of its container.
void keep()
Flag this node as one to keep when the thin() operation is performed.
std::vector< NavGraphNode * > m_filteredSeeds
My seeds (edges in the graph), filtered on per-chain requirements.
static bool addIfNotDuplicate(std::vector< NavGraphNode * > &container, NavGraphNode *toAdd)
Internal helper function.
const std::string & roiString()
std::vector< NavGraphNode * > m_filteredChildren
Two-way linking information, used when thinning the graph.
const std::string & viewString()
std::vector< const Decision * > thin()
Perform thinning.