The Gaudi Framework  v29r2 (7a580596)
concurrency::recursive_CF::ExecutionFlowManager Class Reference

Manage control flow part of the execution flow. More...

#include <GaudiHive/src/ExecutionFlowManager.h>

Inheritance diagram for concurrency::recursive_CF::ExecutionFlowManager:
Collaboration diagram for concurrency::recursive_CF::ExecutionFlowManager:

Public Member Functions

 ExecutionFlowManager ()
 Constructor. More...
 
 ~ExecutionFlowManager () override=default
 Destructor. More...
 
void initialize (ControlFlowGraph *graph, 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. More...
 
ControlFlowGraphgetCFGraph () const
 Get the flow graph instance. More...
 
void updateEventState (AlgsExecutionStates &algo_states, std::vector< int > &node_decisions) const
 Update states and decisions of algorithms. More...
 
bool rootDecisionResolved (const std::vector< int > &node_decisions) const
 Check whether root decision was resolved. More...
 
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. More...
 
const std::stringname () const override
 Retrieve name of the service. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the cached level (originally extracted 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...
 

Private Attributes

std::string m_name
 
ControlFlowGraphm_CFGraph
 the control flow graph More...
 

Additional Inherited Members

- Public Types inherited from CommonMessaging< IExecutionFlowManager >
using base_class = CommonMessaging
 
- Protected Member Functions inherited from CommonMessaging< IExecutionFlowManager >
MSG::Level setUpMessaging ()
 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...
 

Detailed Description

Manage control flow part of the execution flow.

Once initialized, the CF graph is const and can be shared across events

Author
Benedikt Hegner
Illya Shapoval

Definition at line 24 of file ExecutionFlowManager.h.

Constructor & Destructor Documentation

concurrency::recursive_CF::ExecutionFlowManager::ExecutionFlowManager ( )
inline

Constructor.

Definition at line 28 of file ExecutionFlowManager.h.

28 : m_name( "ExecutionFlowManager" ), m_CFGraph( 0 ){};
ControlFlowGraph * m_CFGraph
the control flow graph
concurrency::recursive_CF::ExecutionFlowManager::~ExecutionFlowManager ( )
overridedefault

Destructor.

Member Function Documentation

ControlFlowGraph* concurrency::recursive_CF::ExecutionFlowManager::getCFGraph ( ) const
inline

Get the flow graph instance.

Definition at line 36 of file ExecutionFlowManager.h.

36 { return m_CFGraph; }
ControlFlowGraph * m_CFGraph
the control flow graph
void concurrency::recursive_CF::ExecutionFlowManager::initialize ( ControlFlowGraph graph,
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.

Definition at line 10 of file ExecutionFlowManager.cpp.

12  {
13  m_CFGraph = graph;
14  graph->initialize( algname_index_map );
15  }
ControlFlowGraph * m_CFGraph
the control flow graph
const std::string& concurrency::recursive_CF::ExecutionFlowManager::name ( ) const
inlineoverride

Retrieve name of the service.

Definition at line 48 of file ExecutionFlowManager.h.

void concurrency::recursive_CF::ExecutionFlowManager::printEventState ( std::stringstream ss,
AlgsExecutionStates states,
const std::vector< int > &  node_decisions,
const unsigned int &  recursionLevel 
) const
inline

Print the state of the control flow for a given event.

Definition at line 42 of file ExecutionFlowManager.h.

44  {
45  m_CFGraph->printState( ss, states, node_decisions, recursionLevel );
46  }
ControlFlowGraph * m_CFGraph
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.
bool concurrency::recursive_CF::ExecutionFlowManager::rootDecisionResolved ( const std::vector< int > &  node_decisions) const

Check whether root decision was resolved.

Definition at line 24 of file ExecutionFlowManager.cpp.

25  {
26 
27  return ( -1 != node_decisions[m_CFGraph->getHeadNode()->getNodeIndex()] ) ? true : false;
28  }
ControlFlowGraph * m_CFGraph
the control flow graph
const unsigned int & getNodeIndex() const
Get node index.
DecisionNode * getHeadNode() const
Get head node.
SmartIF<ISvcLocator>& concurrency::recursive_CF::ExecutionFlowManager::serviceLocator ( ) const
inlineoverride

Retrieve pointer to service locator.

Definition at line 50 of file ExecutionFlowManager.h.

50 { return m_CFGraph->serviceLocator(); }
ControlFlowGraph * m_CFGraph
the control flow graph
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
void concurrency::recursive_CF::ExecutionFlowManager::updateEventState ( AlgsExecutionStates algo_states,
std::vector< int > &  node_decisions 
) const

Update states and decisions of algorithms.

Definition at line 17 of file ExecutionFlowManager.cpp.

19  {
20  m_CFGraph->updateEventState( algo_states, node_decisions );
21  }
ControlFlowGraph * m_CFGraph
the control flow graph
void updateEventState(AlgsExecutionStates &states, std::vector< int > &node_decisions) const
Start revision of states and decisions.

Member Data Documentation

ControlFlowGraph* concurrency::recursive_CF::ExecutionFlowManager::m_CFGraph
private

the control flow graph

Definition at line 55 of file ExecutionFlowManager.h.

std::string concurrency::recursive_CF::ExecutionFlowManager::m_name
private

Definition at line 53 of file ExecutionFlowManager.h.


The documentation for this class was generated from the following files: