28 m_algStates.resize( slots );
29 m_eventStatus.resize( slots );
31 if ( msgLevel(
MSG::DEBUG ) ) debug() <<
"resizing state containers to : " << slots <<
endmsg;
35 fatal() <<
"could not get the AlgManager" <<
endmsg;
42 for (
const auto&
alg : m_preInitAlgs ) addAlg(
alg );
63 const size_t slotID =
ctx.valid() ?
ctx.slot() : 0;
65 ost <<
" [slot: " << slotID <<
", incident: " <<
m_eventStatus.
at( slotID ) <<
"]:\n\n";
69 [](
size_t m,
const auto& as ) {
return std::max(
m, as.first.str().length() ); } );
71 for (
const auto& e : algState ) ost <<
" + " <<
std::setw( ml ) << e.first.str() <<
" " << e.second <<
'\n';
91 std::scoped_lock lock(
m_mut );
108 auto itr = algState.find( algName );
109 if (
UNLIKELY( itr == algState.end() ) ) {
121 auto itr = algState.find( iAlg->
nameKey() );
123 if (
UNLIKELY( itr == algState.end() ) ) {
180 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map" 181 <<
" of ErrorCounts" <<
endmsg;
195 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map" 196 <<
" of ErrorCounts" <<
endmsg;
205 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map" 206 <<
" of ErrorCounts" <<
endmsg;
209 return ++( itr->second );
void resetErrorCount(const IAlgorithm *iAlg) override
A service that keeps track of the execution state of Algorithm.
Define general base for Gaudi exception.
std::vector< AlgStateMap_t > m_algStates
std::unordered_map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
unsigned int algErrorCount(const IAlgorithm *iAlg) const override
const std::string & str() const
the actual string
bool isValid() const
Allow for check if smart pointer is valid.
void addAlg(const Gaudi::StringKey &algName) override
virtual const std::vector< IAlgorithm * > & getAlgorithms() const =0
Return the list of Algorithms.
void updateEventStatus(const bool &b, const EventContext &ctx) override
std::once_flag m_initFlag
void dump(std::ostringstream &ost, const EventContext &ctx) const override
This class represents an entry point to all the event specific data.
The helper class to represent the efficient "key" for access.
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
#define DECLARE_COMPONENT(type)
const std::string & name() const override
Retrieve name of the service.
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
const AlgExecState & algExecState(const Gaudi::StringKey &algName, const EventContext &ctx) const override
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
const AlgStateMap_t & algExecStates(const EventContext &ctx) const override
GAUDI_API const EventContext & currentContext()
unsigned int incrementErrorCount(const IAlgorithm *iAlg) override
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
std::vector< Gaudi::StringKey > m_preInitAlgs
The IAlgorithm is the interface implemented by the Algorithm base class.
void reset(const EventContext &ctx) override
constexpr static const auto FAILURE
const EventStatus::Status & eventStatus(const EventContext &ctx) const override
std::vector< EventStatus::Status > m_eventStatus
AttribStringParser::Iterator begin(const AttribStringParser &parser)
void setEventStatus(const EventStatus::Status &sc, const EventContext &ctx) override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)