|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TrigCompositeUtils_NavGraph_h
6 #define TrigCompositeUtils_NavGraph_h
81 const std::vector<NavGraphNode*>&
seeds()
const;
87 const std::vector<NavGraphNode*>&
children()
const;
149 const std::vector<NavGraphNode*>&
finalNodes()
const;
155 std::vector<NavGraphNode*>
allNodes();
160 size_t nodes()
const;
165 size_t edges()
const;
171 std::vector<const Decision*>
thin();
212 std::vector<std::unique_ptr<NavGraphNode>>
m_nodes;
219 #endif // TrigCompositeUtils_NavGraph_h
~NavGraphNode()=default
Destruct a NavGraphNode, default.
bool linksTo(NavGraphNode *to)
Form an edge in the graph from this node to another one.
NavGraphNode(const NavGraphNode &obj)=delete
Prevent copies of a NavGraphNode.
void recursivePrintNavPath(const NavGraphNode &nav, size_t level, MsgStream &log, MSG::Level msgLevel) const
@bried Internal helper function.
~NavGraph()=default
Destruct a NavGraph, default.
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.
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 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.
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
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.
NavGraphNode(NavGraphNode &&obj)=delete
Prevent move of a NavGraphNode.
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.
NavGraph(NavGraph &&obj)=delete
Prevent move of a NavGraphNode.
std::map< const Decision *, size_t > m_nodePositionMap
Map of Decision pointer and index of the node(that contains the Decision) in m_nodes.
std::vector< NavGraphNode * > m_finalNodes
Entry points into the navigation graph.
Transient utility class to represent a node in a graph (m_decisionObject), and a vector of edges (m_f...
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.
std::vector< NavGraphNode * > m_filteredChildren
Two-way linking information, used when thinning the graph.
NavGraph(const NavGraph &obj)=delete
Prevent copy of a NavGraphNode.
std::vector< const Decision * > thin()
Perform thinning.
Base class for elements of a container that can have aux data.