17 for (
auto& is : serviceLocator()->getServices() ) {
27 wbs = serviceLocator()->service( wbn,
false );
33 m_algStates.resize( 1 );
34 m_eventStatus.resize( 1 );
37 if ( msgLevel(
MSG::DEBUG ) ) debug() <<
"resizing state containers to : " << m_algStates.size() <<
endmsg;
41 fatal() <<
"could not get the AlgManager" <<
endmsg;
48 for (
auto& alg : algos ) addAlg( alg );
49 for (
auto& alg : m_preInitAlgs ) addAlg( alg );
64 fatal() <<
"AlgExecStateSvc not initialized before first use" <<
endmsg;
73 size_t slotID = ctx.
valid() ? ctx.
slot() : 0;
75 ost <<
" [slot: " << slotID <<
", incident: " <<
m_eventStatus.
at( slotID ) <<
"]:\n\n";
79 [](
size_t m,
const auto& as ) {
return std::max( m, as.first.str().length() ); } );
81 for (
auto& e : algState ) ost <<
" + " <<
std::setw( ml ) << e.first.str() <<
" " << e.second <<
'\n';
124 auto itr = algState.find( algName );
125 if (
UNLIKELY( itr == algState.end() ) ) {
145 auto itr = algState.find( iAlg->
nameKey() );
147 if (
UNLIKELY( itr == algState.end() ) ) {
210 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map" 211 <<
" of ErrorCounts" <<
endmsg;
226 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map" 227 <<
" of ErrorCounts" <<
endmsg;
237 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map" 238 <<
" of ErrorCounts" <<
endmsg;
241 return ++( itr->second );
void resetErrorCount(const IAlgorithm *iAlg) override
constexpr static const auto FAILURE
A service that keeps track of the execution state of Algorithm.
Define general base for Gaudi exception.
const std::string & name() const override
Retrieve name of the service.
std::vector< AlgStateMap_t > m_algStates
const AlgExecState & algExecState(const Gaudi::StringKey &algName, const EventContext &ctx) const override
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
void dump(std::ostringstream &ost, const EventContext &ctx) const override
class MergingTransformer< Out(const vector_of_const_< In > void
void updateEventStatus(const bool &b, const EventContext &ctx) override
std::once_flag m_initFlag
This class represents an entry point to all the event specific data.
The helper class to represent the efficient "key" for access.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
GAUDI_API const EventContext & currentContext()
unsigned int incrementErrorCount(const IAlgorithm *iAlg) override
std::vector< Gaudi::StringKey > m_preInitAlgs
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
unsigned int algErrorCount(const IAlgorithm *iAlg) const override
The IAlgorithm is the interface implemented by the Algorithm base class.
const AlgStateMap_t & algExecStates(const EventContext &ctx) const override
void reset(const EventContext &ctx) override
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool isValid() const
Allow for check if smart pointer is valid.
const EventStatus::Status & eventStatus(const EventContext &ctx) const override
virtual const std::vector< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
std::vector< EventStatus::Status > m_eventStatus
AttribStringParser::Iterator begin(const AttribStringParser &parser)
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
virtual size_t getNumberOfStores() const =0
Get the number of 'slots'.
void setEventStatus(const EventStatus::Status &sc, const EventContext &ctx) override
const std::string & str() const
the actual string
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void addAlg(IAlgorithm *iAlg) override
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)