1 #ifndef EXECUTIONFLOWMANAGER_H_
2 #define EXECUTIONFLOWMANAGER_H_
30 const std::unordered_map<std::string,unsigned int>& algname_index_map);
32 const std::unordered_map<std::string,unsigned int>& algname_index_map,
33 std::vector<EventSlot>& eventSlots,
34 const std::string& mode);
43 std::vector<int>& node_decisions)
const;
48 std::vector<int>& node_decisions)
const;
53 std::vector<int>& node_decisions,
54 const int& slotNum=-1)
const;
62 const std::vector<int>& node_decisions,
63 const unsigned int& recursionLevel)
const {
m_EFGraph->
printState(ss,states,node_decisions,recursionLevel);}
67 const std::string&
name()
const override {
return m_name;}
void simulateExecutionFlow(IGraphVisitor &visitor) const
ExecutionFlowManager()
Constructor.
void updateEventState(AlgsExecutionStates &algo_states, std::vector< int > &node_decisions) const
Update the state of algorithms to controlready, where possible.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
void printEventState(std::stringstream &ss, AlgsExecutionStates &states, const std::vector< int > &node_decisions, const unsigned int &recursionLevel) const
Print the state of the control flow for a given event.
virtual ~IExecutionFlowManager()
bool algoDataDependenciesSatisfied(const std::string &algo_name, const int &slotNum) const
Check all data dependencies of an algorithm are satisfied.
const std::string & name() const override
Retrieve name of the service.
void touchReadyAlgorithms(IGraphVisitor &visitor) const
Promote all algorithms, ready to be executed, to DataReady state.
void updateDecision(const std::string &algo_name, const int &slotNum, AlgsExecutionStates &states, std::vector< int > &node_decisions) const
bool rootDecisionResolved(const std::vector< int > &node_decisions) const
Check whether root decision was resolved.
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
Manage the execution flow using an execution flow graph Once initialized, the graph is const and can ...
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
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
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.
This class is used for returning status codes from appropriate routines.
~ExecutionFlowManager() override=default
Destructor.
ExecutionFlowGraph * getExecutionFlowGraph() const
Get the flow graph instance.
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...
bool needsAlgorithmToRun(const unsigned int iAlgo) const
A little bit silly, but who cares. ;-)