The Gaudi Framework
master (37c0b60a)
|
#include </builds/gaudi/Gaudi/GaudiHive/src/PRGraph/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 Gaudi::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 (Gaudi::Algorithm *daughterAlgo, const std::string &parentName) |
Add algorithm node. More... | |
AlgorithmNode * | getAlgorithmNode (const std::string &algoName) const |
Get the AlgorithmNode from by algorithm name using graph index. More... | |
StatusCode | addDecisionHubNode (Gaudi::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, EventSlot &slot, 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 &, const EventSlot &slot) |
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... | |
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 620 of file PrecedenceRulesGraph.h.
|
inline |
void concurrency::PrecedenceRulesGraph::accept | ( | IGraphVisitor & | visitor | ) | const |
StatusCode concurrency::PrecedenceRulesGraph::addAlgorithmNode | ( | Gaudi::Algorithm * | daughterAlgo, |
const std::string & | parentName | ||
) |
Add algorithm node.
Create new, or fetch existent, AlgorithmNode
Attach AlgorithmNode to its parent DecisionNode
Definition at line 372 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addDataNode | ( | const DataObjID & | dataPath | ) |
Add DataNode that represents DataObject.
Definition at line 421 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::addDecisionHubNode | ( | Gaudi::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 451 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 719 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 504 of file PrecedenceRulesGraph.cpp.
StatusCode concurrency::PrecedenceRulesGraph::buildDataDependenciesRealm | ( | ) |
Build data dependency realm WITH data object nodes participating.
Definition at line 318 of file PrecedenceRulesGraph.cpp.
std::string concurrency::PrecedenceRulesGraph::dumpControlFlow | ( | ) | const |
Print out control flow of Algorithms and Sequences.
Definition at line 560 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpControlFlow | ( | std::ostringstream & | ost, |
ControlFlowNode * | node, | ||
const int & | indent | ||
) | const |
Definition at line 566 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 591 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 625 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::dumpPrecTrace | ( | const boost::filesystem::path & | fileName, |
const EventSlot & | slot | ||
) |
dump to file the precedence trace
Definition at line 666 of file PrecedenceRulesGraph.cpp.
|
inline |
|
inline |
Get the AlgorithmNode from by algorithm name using graph index.
Definition at line 651 of file PrecedenceRulesGraph.h.
|
inline |
Get total number of control flow graph nodes.
Definition at line 659 of file PrecedenceRulesGraph.h.
Get DataNode by DataObject path using graph index.
Definition at line 637 of file PrecedenceRulesGraph.h.
|
inline |
StatusCode concurrency::PrecedenceRulesGraph::initialize | ( | ) |
Initialize graph.
Definition at line 220 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
PRVertexDesc concurrency::PrecedenceRulesGraph::node | ( | const std::string & | name | ) | const |
Definition at line 529 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::printState | ( | std::stringstream & | output, |
EventSlot & | slot, | ||
const unsigned int & | recursionLevel | ||
) | const |
Print a string representing the control flow state.
Definition at line 260 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::rankAlgorithms | ( | IGraphVisitor & | ranker | ) | const |
Rank Algorithm nodes by the number of data outputs.
Definition at line 550 of file PrecedenceRulesGraph.cpp.
void concurrency::PrecedenceRulesGraph::registerIODataObjects | ( | const Gaudi::Algorithm * | algo | ) |
Register algorithm in the Data Dependency index.
Definition at line 299 of file PrecedenceRulesGraph.cpp.
|
inlineoverride |
|
private |
Total number of algorithm nodes in the graph.
Definition at line 705 of file PrecedenceRulesGraph.h.
|
private |
Indexes: maps of algorithm's name to algorithm's inputs/outputs.
Definition at line 699 of file PrecedenceRulesGraph.h.
|
private |
Index: map of algorithm's name to AlgorithmNode.
Definition at line 693 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 700 of file PrecedenceRulesGraph.h.
|
private |
Enable conditions realm of precedence rules.
Definition at line 719 of file PrecedenceRulesGraph.h.
|
private |
Index: map of data path to DataNode.
Definition at line 697 of file PrecedenceRulesGraph.h.
|
private |
Index: map of decision's name to DecisionHub.
Definition at line 695 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 714 of file PrecedenceRulesGraph.h.
|
private |
the head node of the control flow graph
Definition at line 691 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 709 of file PrecedenceRulesGraph.h.
|
private |
Total number of nodes in the graph.
Definition at line 703 of file PrecedenceRulesGraph.h.
|
private |
Definition at line 713 of file PrecedenceRulesGraph.h.
|
private |
facilities for algorithm precedence tracing
Definition at line 712 of file PrecedenceRulesGraph.h.
|
private |
BGL-based graph of precedence rules.
Definition at line 716 of file PrecedenceRulesGraph.h.
|
mutableprivate |
Service locator (needed to access the MessageSvc)
Definition at line 708 of file PrecedenceRulesGraph.h.