The Gaudi Framework
v29r0 (ff2e7097)
|
#include <src/PrecedenceRulesGraph.h>
Public Member Functions | |
PrecedenceRulesGraph (const std::string &name, SmartIF< ISvcLocator > svc) | |
Constructor. More... | |
~PrecedenceRulesGraph () override | |
Destructor. More... | |
StatusCode | initialize () |
Initialize graph. More... | |
void | accept (const std::string &algo_name, IGraphVisitor &visitor) const |
A method to update algorithm node decision, and propagate it upwards. 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... | |
void | registerIODataObjects (const Algorithm *algo) |
Register algorithm in the Data Dependency index. More... | |
StatusCode | buildDataDependenciesRealm () |
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... | |
DecisionNode * | getHeadNode () const |
Get head node. More... | |
StatusCode | addAlgorithmNode (Algorithm *daughterAlgo, const std::string &parentName, bool inverted, bool allPass) |
Add algorithm node. More... | |
AlgorithmNode * | getAlgorithmNode (const std::string &algoName) const |
Get the AlgorithmNode from by algorithm name 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 control flow graph nodes. More... | |
void | rankAlgorithms (IGraphVisitor &ranker) const |
Rank Algorithm nodes by the number of data outputs. More... | |
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 |
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... | |
PRVertexDesc | node (const std::string &) const |
BGL-based facilities. More... | |
std::string | dumpDataFlow () const |
Print out all data origins and destinations, as reflected in the EF graph. More... | |
std::string | dumpControlFlow () const |
Print out control flow of Algorithms and Sequences. More... | |
void | dumpPrecRules (const boost::filesystem::path &, const EventSlot &slot) |
dump to file the precedence rules More... | |
void | dumpPrecTrace (const boost::filesystem::path &) |
dump to file the precedence trace More... | |
void | addEdgeToPrecTrace (const AlgorithmNode *u, const AlgorithmNode *v) |
set cause-effect connection between two algorithms in the precedence trace More... | |
void | dumpControlFlow (std::ostringstream &, ControlFlowNode *, const int &) const |
Public Member Functions inherited from CommonMessagingBase | |
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 | |
Public Types inherited from CommonMessaging< IPrecedenceRulesGraph > | |
using | base_class = CommonMessaging |
Protected Member Functions inherited from CommonMessaging< IPrecedenceRulesGraph > | |
void | updateMsgStreamOutputLevel (int level) |
Update the output level of the cached MsgStream. More... | |
Definition at line 573 of file PrecedenceRulesGraph.h.
|
inline |
Constructor.
Definition at line 577 of file PrecedenceRulesGraph.h.
|
inlineoverride |
Destructor.
Definition at line 587 of file PrecedenceRulesGraph.h.
void concurrency::PrecedenceRulesGraph::accept | ( | const std::string & | algo_name, |
IGraphVisitor & | visitor | ||
) | const |
A method to update algorithm node decision, and propagate it upwards.
Definition at line 442 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addAlgorithmNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | inverted, | ||
bool | allPass | ||
) |
Add algorithm node.
Definition at line 258 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addDataNode | ( | const DataObjID & | dataPath | ) |
Add DataNode that represents DataObject.
Definition at line 310 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 355 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::addEdgeToPrecTrace | ( | const AlgorithmNode * | u, |
const AlgorithmNode * | v | ||
) |
set cause-effect connection between two algorithms in the precedence trace
Definition at line 650 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 401 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::buildDataDependenciesRealm | ( | ) |
Build data dependency realm WITH data object nodes participating.
Definition at line 206 of file PrecedenceRulesGraph.cpp.
std::string concurrency::PrecedenceRulesGraph::dumpControlFlow | ( | ) | const |
Print out control flow of Algorithms and Sequences.
Definition at line 459 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpControlFlow | ( | std::ostringstream & | ost, |
ControlFlowNode * | node, | ||
const int & | indent | ||
) | const |
Definition at line 466 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 496 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpPrecRules | ( | const boost::filesystem::path & | fileName, |
const EventSlot & | slot | ||
) |
dump to file the precedence rules
Definition at line 524 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpPrecTrace | ( | const boost::filesystem::path & | fileName | ) |
dump to file the precedence trace
Definition at line 614 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 303 of file PrecedenceRulesGraph.cpp.
|
inline |
Get total number of control flow graph nodes.
Definition at line 620 of file PrecedenceRulesGraph.h.
Get DataNode by DataObject path using graph index.
Definition at line 348 of file PrecedenceRulesGraph.cpp.
|
inline |
Get head node.
Definition at line 611 of file PrecedenceRulesGraph.h.
|
inline |
Definition at line 630 of file PrecedenceRulesGraph.h.
StatusCode concurrency::PrecedenceRulesGraph::initialize | ( | ) |
Initialize graph.
Definition at line 142 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
Retrieve name of the service.
Definition at line 626 of file PrecedenceRulesGraph.h.
PRVertexDesc concurrency::PrecedenceRulesGraph::node | ( | const std::string & | name | ) | const |
BGL-based facilities.
Definition at line 425 of file PrecedenceRulesGraph.cpp.
|
inline |
Print a string representing the control flow state.
Definition at line 633 of file PrecedenceRulesGraph.h.
void concurrency::PrecedenceRulesGraph::rankAlgorithms | ( | IGraphVisitor & | ranker | ) | const |
Rank Algorithm nodes by the number of data outputs.
Definition at line 448 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::registerIODataObjects | ( | const Algorithm * | algo | ) |
Register algorithm in the Data Dependency index.
Definition at line 185 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
Retrieve pointer to service locator.
Definition at line 628 of file PrecedenceRulesGraph.h.
|
private |
Total number of algorithm nodes in the graph.
Definition at line 671 of file PrecedenceRulesGraph.h.
|
private |
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
Definition at line 665 of file PrecedenceRulesGraph.h.
|
private |
Index: map of algorithm's name to AlgorithmNode.
Definition at line 659 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 666 of file PrecedenceRulesGraph.h.
|
private |
Enable conditions realm of precedence rules.
Definition at line 686 of file PrecedenceRulesGraph.h.
|
private |
Index: map of data path to DataNode.
Definition at line 663 of file PrecedenceRulesGraph.h.
|
private |
Index: map of decision's name to DecisionHub.
Definition at line 661 of file PrecedenceRulesGraph.h.
|
private |
the head node of the control flow graph
Definition at line 657 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 677 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 675 of file PrecedenceRulesGraph.h.
|
private |
Total number of nodes in the graph.
Definition at line 669 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 681 of file PrecedenceRulesGraph.h.
|
private |
facilities for algorithm precedence tracing
Definition at line 680 of file PrecedenceRulesGraph.h.
|
private |
BGL-based graph of precedence rules.
Definition at line 683 of file PrecedenceRulesGraph.h.
|
mutableprivate |
Service locator (needed to access the MessageSvc)
Definition at line 674 of file PrecedenceRulesGraph.h.