![]() |
The Gaudi Framework
v28r1
|
#include <src/ExecutionFlowGraph.h>
Public Member Functions | |
ExecutionFlowGraph (const std::string &name, SmartIF< ISvcLocator > svc) | |
Constructor. More... | |
~ExecutionFlowGraph () override | |
Destructor. More... | |
StatusCode | initialize (const std::unordered_map< std::string, unsigned int > &algname_index_map) |
Initialize graph. More... | |
StatusCode | initialize (const std::unordered_map< std::string, unsigned int > &algname_index_map, std::vector< EventSlot > &eventSlots) |
void | registerIODataObjects (const Algorithm *algo) |
Register algorithm in the Data Dependency index. More... | |
StatusCode | buildDataDependenciesRealm () |
Build data dependency realm WITHOUT data object nodes: just interconnect algorithm nodes directly. More... | |
StatusCode | buildAugmentedDataDependenciesRealm () |
Build data dependency realm WITH data object nodes participating. More... | |
void | addHeadNode (const std::string &headName, bool modeOR, bool allPass, bool isLazy) |
Add a node, which has no parents. More... | |
StatusCode | addAlgorithmNode (Algorithm *daughterAlgo, const std::string &parentName, bool inverted, bool allPass) |
Add algorithm node. More... | |
template<class T > | |
void | attachAlgorithmsToNodes (const std::string &algo_name, const T &container) |
Attach pointers to real Algorithms (and their clones) to Algorithm nodes of the graph. More... | |
AlgorithmNode * | getAlgorithmNode (const std::string &algoName) const |
Get the AlgorithmNode from by algorithm name using graph index. More... | |
StatusCode | addDataNode (const DataObjID &dataPath) |
Add DataNode that represents DataObject. More... | |
DataNode * | getDataNode (const DataObjID &dataPath) const |
Get DataNode by DataObject path using graph index. More... | |
StatusCode | addDecisionHubNode (Algorithm *daughterAlgo, const std::string &parentName, bool modeOR, bool allPass, bool isLazy) |
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 |
XXX CF tests. Is needed for older CF implementation. More... | |
void | updateDecision (const std::string &algo_name, const int &slotNum, AlgsExecutionStates &states, std::vector< int > &node_decisions) const |
A method to update algorithm node decision, and propagate it upwards. More... | |
void | rankAlgorithms (IGraphVisitor &ranker) const |
Rank Algorithm nodes by the number of data outputs. 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::vector< AlgorithmNode * > | getDataIndependentNodes () const |
const std::string & | name () const override |
Retrieve name of the service. More... | |
SmartIF< ISvcLocator > & | serviceLocator () const override |
Retrieve pointer to service locator. More... | |
const std::chrono::system_clock::time_point | getInitTime () const |
AlgsExecutionStates & | getAlgoStates (const int &slotNum) const |
std::vector< int > & | getNodeDecisions (const int &slotNum) const |
std::string | dumpDataFlow () const |
Print out all data origins and destinations, as reflected in the EF graph. More... | |
void | dumpExecutionPlan () |
dump to file encountered execution plan More... | |
void | addEdgeToExecutionPlan (const AlgorithmNode *u, const AlgorithmNode *v) |
set cause-effect connection between two algorithms in the execution plan More... | |
![]() | |
virtual | ~CommonMessagingBase ()=default |
Virtual destructor. More... | |
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 output level 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... | |
Additional Inherited Members | |
![]() | |
using | base_class = CommonMessaging |
![]() | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
Definition at line 277 of file ExecutionFlowGraph.h.
|
inline |
Constructor.
Definition at line 281 of file ExecutionFlowGraph.h.
|
inlineoverride |
Destructor.
Definition at line 285 of file ExecutionFlowGraph.h.
StatusCode concurrency::ExecutionFlowGraph::addAlgorithmNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | inverted, | ||
bool | allPass | ||
) |
Add algorithm node.
Definition at line 589 of file ExecutionFlowGraph.cpp.
StatusCode concurrency::ExecutionFlowGraph::addDataNode | ( | const DataObjID & | dataPath | ) |
Add DataNode that represents DataObject.
Definition at line 633 of file ExecutionFlowGraph.cpp.
StatusCode concurrency::ExecutionFlowGraph::addDecisionHubNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | modeOR, | ||
bool | allPass, | ||
bool | isLazy | ||
) |
Add a node, which aggregates decisions of direct daughter nodes.
Definition at line 662 of file ExecutionFlowGraph.cpp.
void concurrency::ExecutionFlowGraph::addEdgeToExecutionPlan | ( | const AlgorithmNode * | u, |
const AlgorithmNode * | v | ||
) |
set cause-effect connection between two algorithms in the execution plan
Definition at line 801 of file ExecutionFlowGraph.cpp.
void concurrency::ExecutionFlowGraph::addHeadNode | ( | const std::string & | headName, |
bool | modeOR, | ||
bool | allPass, | ||
bool | isLazy | ||
) |
Add a node, which has no parents.
Definition at line 699 of file ExecutionFlowGraph.cpp.
|
inline |
Attach pointers to real Algorithms (and their clones) to Algorithm nodes of the graph.
Definition at line 304 of file ExecutionFlowGraph.h.
StatusCode concurrency::ExecutionFlowGraph::buildAugmentedDataDependenciesRealm | ( | ) |
Build data dependency realm WITH data object nodes participating.
Definition at line 530 of file ExecutionFlowGraph.cpp.
StatusCode concurrency::ExecutionFlowGraph::buildDataDependenciesRealm | ( | ) |
Build data dependency realm WITHOUT data object nodes: just interconnect algorithm nodes directly.
Definition at line 477 of file ExecutionFlowGraph.cpp.
std::string concurrency::ExecutionFlowGraph::dumpDataFlow | ( | ) | const |
Print out all data origins and destinations, as reflected in the EF graph.
Definition at line 757 of file ExecutionFlowGraph.cpp.
void concurrency::ExecutionFlowGraph::dumpExecutionPlan | ( | ) |
dump to file encountered execution plan
Definition at line 785 of file ExecutionFlowGraph.cpp.
AlgorithmNode * concurrency::ExecutionFlowGraph::getAlgorithmNode | ( | const std::string & | algoName | ) | const |
Get the AlgorithmNode from by algorithm name using graph index.
Definition at line 626 of file ExecutionFlowGraph.cpp.
|
inline |
Definition at line 343 of file ExecutionFlowGraph.h.
|
inline |
Get total number of graph nodes.
Definition at line 318 of file ExecutionFlowGraph.h.
const std::vector< AlgorithmNode * > concurrency::ExecutionFlowGraph::getDataIndependentNodes | ( | ) | const |
Definition at line 742 of file ExecutionFlowGraph.cpp.
Get DataNode by DataObject path using graph index.
Definition at line 655 of file ExecutionFlowGraph.cpp.
|
inline |
Definition at line 341 of file ExecutionFlowGraph.h.
|
inline |
Definition at line 345 of file ExecutionFlowGraph.h.
StatusCode concurrency::ExecutionFlowGraph::initialize | ( | const std::unordered_map< std::string, unsigned int > & | algname_index_map | ) |
Initialize graph.
Definition at line 420 of file ExecutionFlowGraph.cpp.
StatusCode concurrency::ExecutionFlowGraph::initialize | ( | const std::unordered_map< std::string, unsigned int > & | algname_index_map, |
std::vector< EventSlot > & | eventSlots | ||
) |
Definition at line 433 of file ExecutionFlowGraph.cpp.
|
inlineoverride |
|
inline |
Print a string representing the control flow state.
Definition at line 330 of file ExecutionFlowGraph.h.
void concurrency::ExecutionFlowGraph::rankAlgorithms | ( | IGraphVisitor & | ranker | ) | const |
Rank Algorithm nodes by the number of data outputs.
Definition at line 728 of file ExecutionFlowGraph.cpp.
void concurrency::ExecutionFlowGraph::registerIODataObjects | ( | const Algorithm * | algo | ) |
Register algorithm in the Data Dependency index.
Definition at line 451 of file ExecutionFlowGraph.cpp.
|
inlineoverride |
Retrieve pointer to service locator.
Definition at line 339 of file ExecutionFlowGraph.h.
void concurrency::ExecutionFlowGraph::updateDecision | ( | const std::string & | algo_name, |
const int & | slotNum, | ||
AlgsExecutionStates & | states, | ||
std::vector< int > & | node_decisions | ||
) | const |
A method to update algorithm node decision, and propagate it upwards.
Definition at line 719 of file ExecutionFlowGraph.cpp.
void concurrency::ExecutionFlowGraph::updateEventState | ( | AlgsExecutionStates & | states, |
std::vector< int > & | node_decisions | ||
) | const |
XXX CF tests. Is needed for older CF implementation.
Definition at line 713 of file ExecutionFlowGraph.cpp.
|
private |
Definition at line 278 of file ExecutionFlowGraph.h.
|
private |
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
Definition at line 363 of file ExecutionFlowGraph.h.
|
private |
Index: map of algorithm's name to AlgorithmNode.
Definition at line 357 of file ExecutionFlowGraph.h.
|
private |
Definition at line 364 of file ExecutionFlowGraph.h.
|
private |
Index: map of data path to DataNode.
Definition at line 361 of file ExecutionFlowGraph.h.
|
private |
Index: map of decision's name to DecisionHub.
Definition at line 359 of file ExecutionFlowGraph.h.
|
private |
Definition at line 372 of file ExecutionFlowGraph.h.
|
private |
Definition at line 375 of file ExecutionFlowGraph.h.
|
private |
temporary items to experiment with execution planning
Definition at line 374 of file ExecutionFlowGraph.h.
|
private |
the head node of the control flow graph; may want to have multiple ones once supporting trigger paths
Definition at line 355 of file ExecutionFlowGraph.h.
|
private |
Definition at line 370 of file ExecutionFlowGraph.h.
|
private |
Definition at line 369 of file ExecutionFlowGraph.h.
|
private |
Total number of nodes in the graph.
Definition at line 366 of file ExecutionFlowGraph.h.
|
mutableprivate |
Service locator (needed to access the MessageSvc)
Definition at line 368 of file ExecutionFlowGraph.h.