![]() |
The Gaudi Framework
v29r2 (7a580596)
|
#include <src/ControlFlowGraph.h>
Public Member Functions | |
ControlFlowGraph (const std::string &name, SmartIF< ISvcLocator > svc) | |
Constructor. More... | |
~ControlFlowGraph () override | |
Destructor. More... | |
void | initialize (const std::unordered_map< std::string, unsigned int > &algname_index_map) |
Initialize graph. More... | |
void | addHeadNode (const std::string &headName, bool modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass) |
Add a node, which has no parents. More... | |
DecisionNode * | getHeadNode () const |
Get head node. More... | |
StatusCode | addAlgorithmNode (Algorithm *daughterAlgo, const std::string &parentName, bool inverted, bool allPass) |
Add algorithm node. More... | |
StatusCode | addDecisionHubNode (Algorithm *daughterAlgo, const std::string &parentName, bool modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass) |
Add a node, which aggregates decisions of direct daughter nodes. More... | |
unsigned int | getControlFlowNodeCounter () const |
Get total number of graph nodes. More... | |
void | updateEventState (AlgsExecutionStates &states, std::vector< int > &node_decisions) const |
Start revision of states and decisions. More... | |
void | printState (std::stringstream &output, AlgsExecutionStates &states, const std::vector< int > &node_decisions, const unsigned int &recursionLevel) const |
Print a string representing the control flow state. More... | |
const std::string & | name () const override |
Retrieve name of the service. More... | |
SmartIF< ISvcLocator > & | serviceLocator () const override |
Retrieve pointer to service locator. More... | |
std::string | dumpControlFlow () const |
Print out control flow of Algorithms and Sequences. More... | |
void | dumpControlFlow (std::ostringstream &, ControlFlowNode *, const int &) const |
![]() | |
virtual | ~CommonMessagingBase ()=default |
Virtual destructor. More... | |
const SmartIF< IMessageSvc > & | msgSvc () const |
The standard message service. More... | |
MsgStream & | msgStream () const |
Return an uninitialized MsgStream. More... | |
MsgStream & | msgStream (const MSG::Level level) const |
Predefined configurable message stream for the efficient printouts. More... | |
MsgStream & | always () const |
shortcut for the method msgStream(MSG::ALWAYS) More... | |
MsgStream & | fatal () const |
shortcut for the method msgStream(MSG::FATAL) More... | |
MsgStream & | err () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | error () const |
shortcut for the method msgStream(MSG::ERROR) More... | |
MsgStream & | warning () const |
shortcut for the method msgStream(MSG::WARNING) More... | |
MsgStream & | info () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MsgStream & | debug () const |
shortcut for the method msgStream(MSG::DEBUG) More... | |
MsgStream & | verbose () const |
shortcut for the method msgStream(MSG::VERBOSE) More... | |
MsgStream & | msg () const |
shortcut for the method msgStream(MSG::INFO) More... | |
MSG::Level | msgLevel () const |
get the cached level (originally extracted from the embedded MsgStream) More... | |
MSG::Level | outputLevel () const __attribute__((deprecated)) |
Backward compatibility function for getting the output level. More... | |
bool | msgLevel (MSG::Level lvl) const |
get the output level from the embedded MsgStream More... | |
Private Attributes | |
DecisionNode * | m_headNode {nullptr} |
the head node of the control flow graph; may want to have multiple ones once supporting trigger paths More... | |
AlgoNodesMap | m_algoNameToAlgoNodeMap |
Index: map of algorithm's name to AlgorithmNode. More... | |
DecisionHubsMap | m_decisionNameToDecisionHubMap |
Index: map of decision's name to DecisionHub. More... | |
unsigned int | m_nodeCounter {0} |
Total number of nodes in the graph. More... | |
unsigned int | m_algoCounter {0} |
Total number of algorithm nodes in the graph. More... | |
SmartIF< ISvcLocator > | m_svcLocator |
Service locator (needed to access the MessageSvc) More... | |
const std::string | m_name |
Additional Inherited Members | |
![]() | |
using | base_class = CommonMessaging |
![]() | |
MSG::Level | setUpMessaging () |
Set up local caches. More... | |
MSG::Level | resetMessaging () |
Reinitialize internal states. More... | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
Definition at line 144 of file ControlFlowGraph.h.
|
inline |
Constructor.
Definition at line 148 of file ControlFlowGraph.h.
|
inlineoverride |
Destructor.
Definition at line 153 of file ControlFlowGraph.h.
StatusCode concurrency::recursive_CF::ControlFlowGraph::addAlgorithmNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | inverted, | ||
bool | allPass | ||
) |
Add algorithm node.
Definition at line 146 of file ControlFlowGraph.cpp.
StatusCode concurrency::recursive_CF::ControlFlowGraph::addDecisionHubNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | modeConcurrent, | ||
bool | modePromptDecision, | ||
bool | modeOR, | ||
bool | allPass | ||
) |
Add a node, which aggregates decisions of direct daughter nodes.
Definition at line 181 of file ControlFlowGraph.cpp.
void concurrency::recursive_CF::ControlFlowGraph::addHeadNode | ( | const std::string & | headName, |
bool | modeConcurrent, | ||
bool | modePromptDecision, | ||
bool | modeOR, | ||
bool | allPass | ||
) |
Add a node, which has no parents.
Definition at line 217 of file ControlFlowGraph.cpp.
std::string concurrency::recursive_CF::ControlFlowGraph::dumpControlFlow | ( | ) | const |
Print out control flow of Algorithms and Sequences.
Definition at line 239 of file ControlFlowGraph.cpp.
void concurrency::recursive_CF::ControlFlowGraph::dumpControlFlow | ( | std::ostringstream & | ost, |
ControlFlowNode * | node, | ||
const int & | indent | ||
) | const |
Definition at line 247 of file ControlFlowGraph.cpp.
|
inline |
Get total number of graph nodes.
Definition at line 172 of file ControlFlowGraph.h.
|
inline |
Get head node.
Definition at line 164 of file ControlFlowGraph.h.
void concurrency::recursive_CF::ControlFlowGraph::initialize | ( | const std::unordered_map< std::string, unsigned int > & | algname_index_map | ) |
Initialize graph.
Definition at line 140 of file ControlFlowGraph.cpp.
|
inlineoverride |
Retrieve name of the service.
Definition at line 182 of file ControlFlowGraph.h.
|
inline |
Print a string representing the control flow state.
Definition at line 176 of file ControlFlowGraph.h.
|
inlineoverride |
Retrieve pointer to service locator.
Definition at line 184 of file ControlFlowGraph.h.
void concurrency::recursive_CF::ControlFlowGraph::updateEventState | ( | AlgsExecutionStates & | states, |
std::vector< int > & | node_decisions | ||
) | const |
Start revision of states and decisions.
Definition at line 233 of file ControlFlowGraph.cpp.
|
private |
Total number of algorithm nodes in the graph.
Definition at line 200 of file ControlFlowGraph.h.
|
private |
Index: map of algorithm's name to AlgorithmNode.
Definition at line 194 of file ControlFlowGraph.h.
|
private |
Index: map of decision's name to DecisionHub.
Definition at line 196 of file ControlFlowGraph.h.
|
private |
the head node of the control flow graph; may want to have multiple ones once supporting trigger paths
Definition at line 192 of file ControlFlowGraph.h.
|
private |
Definition at line 203 of file ControlFlowGraph.h.
|
private |
Total number of nodes in the graph.
Definition at line 198 of file ControlFlowGraph.h.
|
mutableprivate |
Service locator (needed to access the MessageSvc)
Definition at line 202 of file ControlFlowGraph.h.