11 error() <<
"Could not initialize the flow graph." <<
endmsg;
24 error() <<
"Could not initialize the execution flow graph." <<
endmsg;
32 }
else if (mode ==
"COD") {
35 }
else if (mode ==
"E") {
38 }
else if (mode ==
"T") {
41 }
else if (mode ==
"DRE") {
44 }
else if (!mode.
empty()){
45 error() <<
"Requested optimization mode '" << mode <<
"' is not known." <<
endmsg;
63 debug() <<
" Proceeding with iteration #" << cntr <<
endmsg;
66 if ( fixedNodeDecisions == nodeDecisions) {
67 error() <<
" No progress on iteration " << cntr <<
" detected" <<
endmsg;
111 const int& slotNum)
const {
void simulateExecutionFlow(IGraphVisitor &visitor) const
StatusCode initialize(const std::unordered_map< std::string, unsigned int > &algname_index_map)
Initialize graph.
void updateEventState(AlgsExecutionStates &algo_states, std::vector< int > &node_decisions) const
Update the state of algorithms to controlready, where possible.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
bool algoDataDependenciesSatisfied(const std::string &algo_name, const int &slotNum) const
Check all data dependencies of an algorithm are satisfied.
bool dataDependenciesSatisfied(const int &slotNum) const
Method to check whether the Algorithm has its all data dependency satisfied.
bool isSuccess() const
Test for a status code of SUCCESS.
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.
void touchReadyAlgorithms(IGraphVisitor &visitor) const
Promote all algorithms, ready to be executed, to DataReady state.
std::vector< int > & getNodeDecisions(const int &slotNum) const
AlgsExecutionStates & getAlgoStates(const int &slotNum) const
bool accept(IGraphVisitor &visitor) override
void updateDecision(const std::string &algo_name, const int &slotNum, AlgsExecutionStates &states, std::vector< int > &node_decisions) const
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
bool rootDecisionResolved(const std::vector< int > &node_decisions) const
Check whether root decision was resolved.
DecisionNode * m_headNode
the head node of the control flow graph; may want to have multiple ones once supporting trigger paths...
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
void promoteToControlReadyState(AlgsExecutionStates &algo_states, std::vector< int > &node_decisions, const int &slotNum=-1) const
XXX: CF tests.
ExecutionFlowGraph * m_EFGraph
the control flow graph
This class is used for returning status codes from appropriate routines.
void rankAlgorithms(IGraphVisitor &ranker) const
Rank Algorithm nodes by the number of data outputs.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool promoteToControlReadyState(const int &slotNum, AlgsExecutionStates &states, std::vector< int > &node_decisions) const override
XXX: CF tests. Method to set algos to CONTROLREADY, if possible.
const unsigned int & getNodeIndex() const
XXX: CF tests.
StatusCode initialize(ExecutionFlowGraph *CFGraph, const std::unordered_map< std::string, unsigned int > &algname_index_map)
Initialize the control flow manager It greps the topalg list and the index map for the algo names...
void updateEventState(AlgsExecutionStates &states, std::vector< int > &node_decisions) const
XXX CF tests. Is needed for older CF implementation.
AlgorithmNode * getAlgorithmNode(const std::string &algoName) const
Get the AlgorithmNode from by algorithm name using graph index.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.