![]() |
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... | |
void | addNode (const Decision *node, const EventContext &ctx, const Decision *comingFrom=nullptr) |
Add a new NavGraphNode which shadows the xAOD Decision object "node" from the full navigation graph. More... | |
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 ElementLink< TrigCompositeUtils::DecisionContainer >, NavGraphNode > | m_nodes |
Map of 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 98 of file NavGraph.h.
TrigCompositeUtils::NavGraph::NavGraph | ( | ) |
void TrigCompositeUtils::NavGraph::addNode | ( | const Decision * | node, |
const EventContext & | ctx, | ||
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] | ctx | The event context. |
[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 79 of file NavGraph.cxx.
std::vector< NavGraphNode * > TrigCompositeUtils::NavGraph::allNodes | ( | ) |
Get all nodes.
Definition at line 103 of file NavGraph.cxx.
size_t TrigCompositeUtils::NavGraph::edges | ( | ) | const |
Definition at line 119 of file NavGraph.cxx.
std::vector< NavGraphNode * > TrigCompositeUtils::NavGraph::finalNodes | ( | ) | const |
Get all final nodes.
Definition at line 99 of file NavGraph.cxx.
size_t TrigCompositeUtils::NavGraph::nodes | ( | ) | const |
Definition at line 114 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 165 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 172 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 139 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 123 of file NavGraph.cxx.
|
private |
Statistics on the number of edges, connecting the nodes in the graph.
Definition at line 186 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 185 of file NavGraph.h.
|
private |
Map of nodes in the graph.
Indexed on the underlying Decision object's ElementLink.
Definition at line 184 of file NavGraph.h.