 |
ATLAS Offline Software
|
Go to the documentation of this file.
9 #ifndef XAOD_STANDALONE // Athena or AthAnalysis
21 if (
it == container.end()) {
22 container.push_back(
toAdd);
79 m_nodes.emplace_back( std::make_unique<NavGraphNode>(
node) );
83 if (comingFrom ==
nullptr) {
88 m_nodes.emplace_back( std::make_unique<NavGraphNode>(comingFrom) );
91 const bool newEdge = comingFromNodeObj->
linksTo( nodeObj );
104 std::vector<NavGraphNode*> returnVec;
105 returnVec.reserve(
m_nodes.size());
108 returnVec.push_back( &nodeObj );
124 std::vector<const Decision*> returnVec;
125 std::vector<std::unique_ptr<NavGraphNode>>
::iterator it;
127 if ((*it)->getKeep()) {
131 returnVec.push_back((*it)->node());
140 const std::vector<NavGraphNode*> myParents = toBeDeleted.
seeds();
141 const std::vector<NavGraphNode*> myChildren = toBeDeleted.
children();
146 bool newEdge = child->linksTo(
parent);
155 child->dropLinks(&toBeDeleted);
159 parent->dropLinks(&toBeDeleted);
175 std::stringstream
ss;
176 for (
size_t i = 0;
i <
level; ++
i) {
180 ss <<
"|-> " << nodeEL.
dataID() <<
" #" << nodeEL.
index() <<
" Name(" <<
node->
name() <<
") Passing(" <<
node->decisions().size() <<
")";
187 #ifndef XAOD_STANDALONE // Athena or AthAnalysis
190 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()
const Decision * m_decisionObject
The Decision object node which I shadow.
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.
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.