Go to the documentation of this file.
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;
41 for (
const auto&
alg : algMan->getAlgorithms() ) addAlg(
alg );
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 ( itr == algState.end() ) {
114 if (
ctx.usesSubSlot() ) {
116 auto& thisSubSlot = subSlots[
ctx.subSlot()];
117 auto subitr = thisSubSlot.find( algName );
118 if ( subitr == thisSubSlot.end() ) {
121 return subitr->second;
134 auto itr = algState.find( iAlg->
nameKey() );
135 if ( itr == algState.end() ) {
143 if (
ctx.usesSubSlot() ) {
146 std::scoped_lock lock(
m_mut );
153 if (
ctx.subSlot() >= subSlots.size() ) subSlots.resize(
ctx.subSlot() + 1 );
156 auto& thisSubSlot = subSlots[
ctx.subSlot()];
157 auto subitr = thisSubSlot.find( iAlg->name() );
158 if ( subitr == thisSubSlot.end() ) {
160 return thisSubSlot[iAlg->name()];
162 return subitr->second;
213 for (
auto& e : subSlot ) e.second.reset();
225 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map"
226 <<
" of ErrorCounts" <<
endmsg;
240 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map"
241 <<
" of ErrorCounts" <<
endmsg;
250 error() <<
"Unable to find Algorithm \"" << iAlg->name() <<
"\" in map"
251 <<
" of ErrorCounts" <<
endmsg;
254 return ++( itr->second );
unsigned int incrementErrorCount(const IAlgorithm *iAlg) override
GAUDI_API const EventContext & currentContext()
const AlgExecState & algExecState(const Gaudi::StringKey &algName, const EventContext &ctx) const override
std::vector< EventStatus::Status > m_eventStatus
std::vector< Gaudi::StringKey > m_preInitAlgs
const EventStatus::Status & eventStatus(const EventContext &ctx) const override
void addAlg(const Gaudi::StringKey &algName) override
void resetErrorCount(const IAlgorithm *iAlg) override
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
A service that keeps track of the execution state of Algorithm.
void dump(std::ostringstream &ost, const EventContext &ctx) const override
static GAUDI_API std::size_t numConcurrentEvents()
number of Concurrent Events (for MT)
static GAUDI_API bool concurrent()
serial operation, or some form of concurrency
void updateEventStatus(const bool &b, const EventContext &ctx) override
AttribStringParser::Iterator begin(const AttribStringParser &parser)
bool isValid() const
Allow for check if smart pointer is valid.
const std::string & name() const override
Retrieve name of the service
unsigned int algErrorCount(const IAlgorithm *iAlg) const override
std::vector< std::vector< AlgStateMap_t > > m_algSubSlotStates
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
std::vector< AlgStateMap_t > m_algStates
void setEventStatus(const EventStatus::Status &sc, const EventContext &ctx) override
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
std::unordered_map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
void reset(const EventContext &ctx) override
std::once_flag m_initFlag
const AlgStateMap_t & algExecStates(const EventContext &ctx) const override
#define DECLARE_COMPONENT(type)
const std::string & str() const
the actual string
constexpr static const auto FAILURE