229 MsgStream log(messageSvc,
"SequentialAlgoExecutionTask");
237 std::vector<int> nodeDecisions(algPool->getExecutionFlowGraph()->getControlFlowNodeCounter(), -1);
247 bool eventFailed =
false;
251 while(!eventFailed && algStates.algsPresent(AlgsExecutionStates::State::CONTROLREADY) ){
258 for(
auto it = algStates.begin(AlgsExecutionStates::State::CONTROLREADY); it != algStates.end(AlgsExecutionStates::State::CONTROLREADY); ++it){
273 if(sc.
isFailure() || ialgoPtr ==
nullptr){
294 log <<
MSG::ERROR <<
".executeEvent(): Exception with tag=" << Exception.
tag()
295 <<
" thrown by " << algName <<
endmsg;
298 log <<
MSG::FATAL <<
".executeEvent(): Standard std::exception thrown by "
302 log <<
MSG::FATAL <<
".executeEvent(): UNKNOWN Exception thrown by "
313 << (eventFailed ?
" failed" :
" succeded") << endmsg;
317 state = AlgsExecutionStates::State::EVTACCEPTED;
319 state = AlgsExecutionStates::State::EVTREJECTED;
325 << (ialgoPtr->
filterPassed() ?
" passed" :
" rejected") << endmsg;
329 algStates.updateState(algIndex,state);
356 if(!algStates.algsPresent(AlgsExecutionStates::State::CONTROLREADY) && !algStates.allAlgsExecuted()){
std::list< IAlgorithm * > m_algList
Cache the list of algs to be executed.
Definition of the MsgStream class used to transmit messages.
virtual StatusCode acquireAlgorithm(const std::string &name, IAlgorithm *&algo, bool blocking=false)=0
Acquire a certain algorithm using its name.
Define general base for Gaudi exception.
Helper class to set the application return code in case of early exit (e.g.
void updateEventState(AlgsExecutionStates &algo_states, std::vector< int > &node_decisions) const
Update the state of algorithms to controlready, where possible.
GAUDI_API void setCurrentContextId(ContextIdType newId)
Used by the framework to change the value of the current context id.
bool isSuccess() const
Test for a status code of SUCCESS.
SmartIF< ParallelSequentialSchedulerSvc > m_scheduler
EventContext * m_eventContext
tbb::concurrent_bounded_queue< EventContext * > m_finishedEvents
Queue of finished events.
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
bool isFailure() const
Test for a status code of FAILURE.
void setContext(EventContext *context)
set the context
constexpr int UnhandledException
TYPE * get() const
Get interface pointer.
The AlgsExecutionStates encodes the state machine for the execution of algorithms within a single eve...
SmartIF< IAlgResourcePool > m_algPool
void promoteToControlReadyState(AlgsExecutionStates &algo_states, std::vector< int > &node_decisions, const int &slotNum=-1) const
XXX: CF tests.
This class is used for returning status codes from appropriate routines.
StatusCode sysExecute() override
The actions to be performed by the algorithm on an event.
void setFail(const bool &b=true)
virtual const std::string & tag() const
name tag for the exception, or exception type
The IAlgorithm is the interface implemented by the Algorithm base class.
virtual bool filterPassed() const =0
Did this algorithm pass or fail its filter criterion for the last event?
Base class from which all concrete algorithm classes should be derived.
SmartIF< ISvcLocator > m_serviceLocator
State
Execution states of the algorithms.
virtual StatusCode releaseAlgorithm(const std::string &name, IAlgorithm *&algo)=0
Release a certain algorithm.
std::vector< std::string > m_algname_vect
Vector to bookkeep the information necessary to the index2name conversion.
concurrency::ExecutionFlowManager m_controlFlow
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IAlgResourcePool > m_algResourcePool
Cache for the algorithm resource pool.