ATLAS Offline Software
|
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...
#include <NavGraph.h>
Public Member Functions | |
NavGraph () | |
Construct an empty NavGraph. More... | |
~NavGraph ()=default | |
Destruct a NavGraph, default. More... | |
NavGraph (const NavGraph &obj)=delete | |
Prevent copy of a NavGraphNode. More... | |
NavGraph (NavGraph &&obj)=delete | |
Prevent move of a NavGraphNode. More... | |
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. More... | |
const std::vector< NavGraphNode * > & | finalNodes () const |
Get all final nodes. More... | |
std::vector< NavGraphNode * > | allNodes () |
Get all nodes. More... | |
size_t | nodes () const |
size_t | edges () const |
std::vector< const Decision * > | thin () |
Perform thinning. More... | |
void | printAllPaths (MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const |
Helper function. More... | |
Private Member Functions | |
void | rewireNodeForRemoval (NavGraphNode &toBeDeleted) |
Take all seeds (parents) of the supplied node and connect them to all the node's children. More... | |
void | recursivePrintNavPath (const NavGraphNode &nav, size_t level, MsgStream &log, MSG::Level msgLevel) const |
@bried Internal helper function. More... | |
Private Attributes | |
std::map< const Decision *, size_t > | m_nodePositionMap |
Map of Decision pointer and index of the node(that contains the Decision) in m_nodes. More... | |
std::vector< std::unique_ptr< NavGraphNode > > | m_nodes |
Vector of unique pointers to nodes in the graph. More... | |
std::vector< NavGraphNode * > | m_finalNodes |
Entry points into the navigation graph. More... | |
size_t | m_edges |
Statistics on the number of edges, connecting the nodes in the graph. More... | |
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.
Definition at line 111 of file NavGraph.h.
TrigCompositeUtils::NavGraph::NavGraph | ( | ) |
|
default |
Destruct a NavGraph, default.
Prevent copy of a NavGraphNode.
|
delete |
Prevent move of a NavGraphNode.
void TrigCompositeUtils::NavGraph::addNode | ( | const Decision * | node, |
const Decision * | comingFrom = nullptr |
||
) |
Add a new NavGraphNode which shadows the xAOD Decision object "node" from the full navigation graph.
[in] | node | The xAOD Decision object which the new node will shadow. Will not cause duplication if node has already been added. |
[in] | comingFrom | If not null, used to indicate which xAOD Decision object was the seed of "node". This is used to form an edge in the graph. Alternately, if comingFrom is null then "node" is taken as a final node (one of the locations from which the graph should be explored) and hence is added to the finalNodes vector. |
Definition at line 78 of file NavGraph.cxx.
std::vector< NavGraphNode * > TrigCompositeUtils::NavGraph::allNodes | ( | ) |
Get all nodes.
Definition at line 104 of file NavGraph.cxx.
size_t TrigCompositeUtils::NavGraph::edges | ( | ) | const |
Definition at line 120 of file NavGraph.cxx.
const std::vector< NavGraphNode * > & TrigCompositeUtils::NavGraph::finalNodes | ( | ) | const |
Get all final nodes.
Definition at line 100 of file NavGraph.cxx.
size_t TrigCompositeUtils::NavGraph::nodes | ( | ) | const |
Definition at line 115 of file NavGraph.cxx.
void TrigCompositeUtils::NavGraph::printAllPaths | ( | MsgStream & | log, |
MSG::Level | msgLevel = MSG::VERBOSE |
||
) | const |
Helper function.
Print the internal graph structure to the terminal.
[in] | log | Athena messaging service reference. |
[in] | msgLevel | Athena messaging service verbosity level. |
Definition at line 166 of file NavGraph.cxx.
|
private |
@bried Internal helper function.
Recursively print the graph structure from a single given starting node.
[in] | nav | The node to recursively explore. |
[in] | level | The current depth of recursion. Used to pad output format. |
[in] | log | Athena messaging service reference. |
[in] | msgLevel | Athena messaging service verbosity level. |
Definition at line 173 of file NavGraph.cxx.
|
private |
Take all seeds (parents) of the supplied node and connect them to all the node's children.
Unlink the parents and children from the node. For the case of Parent nodes, P, node to be deleted, N, and Child nodes, C, this function converts from P P P P P P | \ / | \ / N , N , N , N | | / \ / \ C C C C C C to P P P P P P | \ / | |\ /| | , | , | , | | | | | / \ |/ | C C C C C C where N is orphaned from the graph, with no parents or children.
[in] | toBeDeleted | Node to rewire out of the navigation graph prior to its removal. |
Definition at line 140 of file NavGraph.cxx.
Perform thinning.
Removing all nodes which are not explicitly flagged as keep(), after having re-wired them out of the graph.
Definition at line 124 of file NavGraph.cxx.
|
private |
Statistics on the number of edges, connecting the nodes in the graph.
Definition at line 214 of file NavGraph.h.
|
private |
Entry points into the navigation graph.
When iterating over the graph, start from all of these places.
Definition at line 213 of file NavGraph.h.
Map of Decision pointer and index of the node(that contains the Decision) in m_nodes.
Definition at line 211 of file NavGraph.h.
|
private |
Vector of unique pointers to nodes in the graph.
Definition at line 212 of file NavGraph.h.