25 m_eventContext(
nullptr),
27 declareProperty(
"UseTopAlgList", m_useTopAlgList=
true);
39 warning () <<
"Base class could not be initialized" <<
endmsg;
43 if (!algResourcePool.
isValid()){
44 error() <<
"Error retrieving AlgResourcePool" <<
endmsg;
80 if (
LIKELY(
nullptr != ialg)) ialg->resetExecuted();
85 bool eventfailed=
false;
92 "SequentialSchedulerSvc",
108 sc = ialgorithm->sysExecute();
110 warning() <<
"Execution of algorithm " << ialgorithm->name() <<
" failed" <<
endmsg;
115 error() <<
".executeEvent(): Exception with tag=" << Exception.
tag()
116 <<
" thrown by " << ialgorithm->name() <<
endmsg;
119 fatal() <<
".executeEvent(): Standard std::exception thrown by "
120 << ialgorithm->name() <<
endmsg;
123 fatal() <<
".executeEvent(): UNKNOWN Exception thrown by "
124 << ialgorithm->name() <<
endmsg;
127 debug() <<
"Algorithm " << this_algo->
name() << (eventfailed ?
" failed" :
" succeeded") << endmsg;
128 debug() <<
"Algorithm " << this_algo->
name() << (this_algo->
filterPassed() ?
" passed" :
" rejected") << endmsg;
145 for (
auto context : eventContexts){
StatusCode initialize() override
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Define general base for Gaudi exception.
Helper class to set the application return code in case of early exit (e.g.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode finalize() override
std::list< IAlgorithm * > m_algList
Cache the list of algs to be executed.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
bool isSuccess() const
Test for a status code of SUCCESS.
virtual StatusCode tryPopFinishedEvent(EventContext *&eventContext)
Try to fetch an event from the scheduler.
virtual StatusCode pushNewEvents(std::vector< EventContext * > &eventContexts)
bool filterPassed() const override
Did this algorithm pass or fail its filter criterion for the last event?
virtual const std::vector< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
virtual StatusCode finalize()
Finalise.
virtual std::list< IAlgorithm * > getFlatAlgList()=0
Get the flat list of algorithms.
virtual unsigned int freeSlots()
Get free slots number.
This class represents an entry point to all the event specific data.
void setContext(EventContext *context)
set the context
const std::string & name() const override
The identifying name of the algorithm object.
constexpr int UnhandledException
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
~SequentialSchedulerSvc()
Destructor.
virtual std::list< IAlgorithm * > getTopAlgList()=0
Get top list of algorithms.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
This class is used for returning status codes from appropriate routines.
void setFail(const bool &b=true)
virtual const std::string & tag() const
name tag for the exception, or exception type
#define DECLARE_SERVICE_FACTORY(x)
The IAlgorithm is the interface implemented by the Algorithm base class.
virtual StatusCode pushNewEvent(EventContext *eventContext)
Make an event available to the scheduler.
int m_freeSlots
The number of free slots (0 or 1)
Base class from which all concrete algorithm classes should be derived.
virtual StatusCode initialize()
Initialise.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool isValid() const
Allow for check if smart pointer is valid.
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
virtual StatusCode popFinishedEvent(EventContext *&eventContext)
Blocks until an event is availble.
bool m_useTopAlgList
Decide if the top alglist or its flat version has to be used.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
This SchedulerSvc implements the IScheduler interface.
EventContext * m_eventContext
The context of the event being processed.