![]() |
The Gaudi Framework
v28r2
|
#include <src/PrecedenceRulesGraph.h>
Public Member Functions | |
PrecedenceRulesGraph (const std::string &name, SmartIF< ISvcLocator > svc) | |
Constructor. More... | |
~PrecedenceRulesGraph () 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 modeConcurrent, bool modePromptDecision, bool modeOR, bool allPass) |
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 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 |
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 280 of file PrecedenceRulesGraph.h.
|
inline |
Constructor.
Definition at line 284 of file PrecedenceRulesGraph.h.
|
inlineoverride |
Destructor.
Definition at line 288 of file PrecedenceRulesGraph.h.
StatusCode concurrency::PrecedenceRulesGraph::addAlgorithmNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | inverted, | ||
bool | allPass | ||
) |
Add algorithm node.
Definition at line 608 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addDataNode | ( | const DataObjID & | dataPath | ) |
Add DataNode that represents DataObject.
Definition at line 652 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::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 681 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::addEdgeToExecutionPlan | ( | const AlgorithmNode * | u, |
const AlgorithmNode * | v | ||
) |
set cause-effect connection between two algorithms in the execution plan
Definition at line 820 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::addHeadNode | ( | const std::string & | headName, |
bool | modeConcurrent, | ||
bool | modePromptDecision, | ||
bool | modeOR, | ||
bool | allPass | ||
) |
Add a node, which has no parents.
Definition at line 718 of file PrecedenceRulesGraph.cpp.
|
inline |
Attach pointers to real Algorithms (and their clones) to Algorithm nodes of the graph.
Definition at line 307 of file PrecedenceRulesGraph.h.
StatusCode concurrency::PrecedenceRulesGraph::buildAugmentedDataDependenciesRealm | ( | ) |
Build data dependency realm WITH data object nodes participating.
Definition at line 549 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::buildDataDependenciesRealm | ( | ) |
Build data dependency realm WITHOUT data object nodes: just interconnect algorithm nodes directly.
Definition at line 496 of file PrecedenceRulesGraph.cpp.
std::string concurrency::PrecedenceRulesGraph::dumpDataFlow | ( | ) | const |
Print out all data origins and destinations, as reflected in the EF graph.
Definition at line 776 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpExecutionPlan | ( | ) |
dump to file encountered execution plan
Definition at line 804 of file PrecedenceRulesGraph.cpp.
AlgorithmNode * concurrency::PrecedenceRulesGraph::getAlgorithmNode | ( | const std::string & | algoName | ) | const |
Get the AlgorithmNode from by algorithm name using graph index.
Definition at line 645 of file PrecedenceRulesGraph.cpp.
|
inline |
Definition at line 346 of file PrecedenceRulesGraph.h.
|
inline |
Get total number of graph nodes.
Definition at line 321 of file PrecedenceRulesGraph.h.
const std::vector< AlgorithmNode * > concurrency::PrecedenceRulesGraph::getDataIndependentNodes | ( | ) | const |
Definition at line 761 of file PrecedenceRulesGraph.cpp.
Get DataNode by DataObject path using graph index.
Definition at line 674 of file PrecedenceRulesGraph.cpp.
|
inline |
Definition at line 344 of file PrecedenceRulesGraph.h.
|
inline |
Definition at line 348 of file PrecedenceRulesGraph.h.
StatusCode concurrency::PrecedenceRulesGraph::initialize | ( | const std::unordered_map< std::string, unsigned int > & | algname_index_map | ) |
Initialize graph.
Definition at line 439 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::initialize | ( | const std::unordered_map< std::string, unsigned int > & | algname_index_map, |
std::vector< EventSlot > & | eventSlots | ||
) |
Definition at line 452 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
Retrieve name of the service.
Definition at line 340 of file PrecedenceRulesGraph.h.
|
inline |
Print a string representing the control flow state.
Definition at line 333 of file PrecedenceRulesGraph.h.
void concurrency::PrecedenceRulesGraph::rankAlgorithms | ( | IGraphVisitor & | ranker | ) | const |
Rank Algorithm nodes by the number of data outputs.
Definition at line 747 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::registerIODataObjects | ( | const Algorithm * | algo | ) |
Register algorithm in the Data Dependency index.
Definition at line 470 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
Retrieve pointer to service locator.
Definition at line 342 of file PrecedenceRulesGraph.h.
void concurrency::PrecedenceRulesGraph::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 738 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::updateEventState | ( | AlgsExecutionStates & | states, |
std::vector< int > & | node_decisions | ||
) | const |
XXX CF tests. Is needed for older CF implementation.
Definition at line 732 of file PrecedenceRulesGraph.cpp.
|
private |
Definition at line 281 of file PrecedenceRulesGraph.h.
|
private |
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
Definition at line 366 of file PrecedenceRulesGraph.h.
|
private |
Index: map of algorithm's name to AlgorithmNode.
Definition at line 360 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 367 of file PrecedenceRulesGraph.h.
|
private |
Index: map of data path to DataNode.
Definition at line 364 of file PrecedenceRulesGraph.h.
|
private |
Index: map of decision's name to DecisionHub.
Definition at line 362 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 375 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 378 of file PrecedenceRulesGraph.h.
|
private |
temporary items to experiment with execution planning
Definition at line 377 of file PrecedenceRulesGraph.h.
|
private |
the head node of the control flow graph; may want to have multiple ones once supporting trigger paths
Definition at line 358 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 373 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 372 of file PrecedenceRulesGraph.h.
|
private |
Total number of nodes in the graph.
Definition at line 369 of file PrecedenceRulesGraph.h.
|
mutableprivate |
Service locator (needed to access the MessageSvc)
Definition at line 371 of file PrecedenceRulesGraph.h.