The Gaudi Framework
v30r3 (a5ef0a68)
|
#include <src/PrecedenceRulesGraph.h>
Public Member Functions | |
PrecedenceRulesGraph (const std::string &name, SmartIF< ISvcLocator > svc) | |
Constructor. More... | |
StatusCode | initialize () |
Initialize graph. More... | |
void | accept (IGraphVisitor &visitor) const |
An entry point to visit all graph nodes. 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, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted) |
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, concurrency::Concurrent, concurrency::PromptDecision, concurrency::ModeOr, concurrency::AllPass, concurrency::Inverted) |
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... | |
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... | |
void | enableAnalysis () |
BGL-based facilities. More... | |
PRVertexDesc | node (const std::string &) const |
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 CommonMessaging< IPrecedenceRulesGraph > | |
MSG::Level | msgLevel () const |
get the cached level (originally extracted from the embedded MsgStream) More... | |
bool | msgLevel (MSG::Level lvl) const |
get the output level from the embedded MsgStream More... | |
MSG::Level | outputLevel () const |
Backward compatibility function for getting the output level. More... | |
Public Member Functions inherited from CommonMessagingBase | |
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... | |
Additional Inherited Members | |
Public Types inherited from CommonMessaging< IPrecedenceRulesGraph > | |
using | base_class = CommonMessaging |
Protected Member Functions inherited from CommonMessaging< IPrecedenceRulesGraph > | |
MSG::Level | setUpMessaging () const |
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 658 of file PrecedenceRulesGraph.h.
|
inline |
Constructor.
Definition at line 662 of file PrecedenceRulesGraph.h.
void concurrency::PrecedenceRulesGraph::accept | ( | IGraphVisitor & | visitor | ) | const |
An entry point to visit all graph nodes.
Definition at line 404 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addAlgorithmNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
bool | inverted, | ||
bool | allPass | ||
) |
Add algorithm node.
Create new, or fetch existent, AlgorithmNode
Attach AlgorithmNode to its parent DecisionNode
Definition at line 229 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addDataNode | ( | const DataObjID & | dataPath | ) |
Add DataNode that represents DataObject.
Definition at line 283 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addDecisionHubNode | ( | Algorithm * | daughterAlgo, |
const std::string & | parentName, | ||
concurrency::Concurrent | modeConcurrent, | ||
concurrency::PromptDecision | modePromptDecision, | ||
concurrency::ModeOr | modeOR, | ||
concurrency::AllPass | allPass, | ||
concurrency::Inverted | isInverted | ||
) |
Add a node, which aggregates decisions of direct daughter nodes.
Create new, or fetch existent, DecisionNode
Attach DecisionNode to its parent DecisionNode
Definition at line 314 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 563 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::addHeadNode | ( | const std::string & | headName, |
concurrency::Concurrent | modeConcurrent, | ||
concurrency::PromptDecision | modePromptDecision, | ||
concurrency::ModeOr | modeOR, | ||
concurrency::AllPass | allPass, | ||
concurrency::Inverted | isInverted | ||
) |
Add a node, which has no parents.
Definition at line 368 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::buildDataDependenciesRealm | ( | ) |
Build data dependency realm WITH data object nodes participating.
Definition at line 180 of file PrecedenceRulesGraph.cpp.
std::string concurrency::PrecedenceRulesGraph::dumpControlFlow | ( | ) | const |
Print out control flow of Algorithms and Sequences.
Definition at line 428 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpControlFlow | ( | std::ostringstream & | ost, |
ControlFlowNode * | node, | ||
const int & | indent | ||
) | const |
Definition at line 435 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 462 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 490 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpPrecTrace | ( | const boost::filesystem::path & | fileName | ) |
dump to file the precedence trace
Definition at line 529 of file PrecedenceRulesGraph.cpp.
|
inline |
BGL-based facilities.
Definition at line 718 of file PrecedenceRulesGraph.h.
|
inline |
Get the AlgorithmNode from by algorithm name using graph index.
Definition at line 691 of file PrecedenceRulesGraph.h.
|
inline |
Get total number of control flow graph nodes.
Definition at line 700 of file PrecedenceRulesGraph.h.
Get DataNode by DataObject path using graph index.
Definition at line 677 of file PrecedenceRulesGraph.h.
|
inline |
Get head node.
Definition at line 687 of file PrecedenceRulesGraph.h.
StatusCode concurrency::PrecedenceRulesGraph::initialize | ( | ) |
Initialize graph.
Definition at line 115 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
Retrieve name of the service.
Definition at line 706 of file PrecedenceRulesGraph.h.
PRVertexDesc concurrency::PrecedenceRulesGraph::node | ( | const std::string & | name | ) | const |
Definition at line 394 of file PrecedenceRulesGraph.cpp.
|
inline |
Print a string representing the control flow state.
Definition at line 711 of file PrecedenceRulesGraph.h.
void concurrency::PrecedenceRulesGraph::rankAlgorithms | ( | IGraphVisitor & | ranker | ) | const |
Rank Algorithm nodes by the number of data outputs.
Definition at line 417 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::registerIODataObjects | ( | const Algorithm * | algo | ) |
Register algorithm in the Data Dependency index.
Definition at line 159 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
Retrieve pointer to service locator.
Definition at line 708 of file PrecedenceRulesGraph.h.
|
private |
Total number of algorithm nodes in the graph.
Definition at line 750 of file PrecedenceRulesGraph.h.
|
private |
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
Definition at line 744 of file PrecedenceRulesGraph.h.
|
private |
Index: map of algorithm's name to AlgorithmNode.
Definition at line 738 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 745 of file PrecedenceRulesGraph.h.
|
private |
Enable conditions realm of precedence rules.
Definition at line 764 of file PrecedenceRulesGraph.h.
|
private |
Index: map of data path to DataNode.
Definition at line 742 of file PrecedenceRulesGraph.h.
|
private |
Index: map of decision's name to DecisionHub.
Definition at line 740 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 759 of file PrecedenceRulesGraph.h.
|
private |
the head node of the control flow graph
Definition at line 736 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 754 of file PrecedenceRulesGraph.h.
|
private |
Total number of nodes in the graph.
Definition at line 748 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 758 of file PrecedenceRulesGraph.h.
|
private |
facilities for algorithm precedence tracing
Definition at line 757 of file PrecedenceRulesGraph.h.
|
private |
BGL-based graph of precedence rules.
Definition at line 761 of file PrecedenceRulesGraph.h.
|
mutableprivate |
Service locator (needed to access the MessageSvc)
Definition at line 753 of file PrecedenceRulesGraph.h.