36 std::ostringstream ost;
73 if ( ctx.usesSubSlot() ) {
75 std::scoped_lock lock(
m_mut );
82 if ( ctx.subSlot() >= subSlots.size() ) subSlots.resize( ctx.subSlot() + 1 );
85 return subSlots[ctx.subSlot()].try_emplace( k ).first->second;
89 assert(
static_cast<size_t>( k ) <
m_algStates.at( ctx.slot() ).size() );
90 return m_algStates.at( ctx.slot() )[
static_cast<size_t>( k )];
100 if ( ctx.usesSubSlot() ) {
102 std::scoped_lock lock(
m_mut );
109 if ( ctx.subSlot() >= subSlots.size() ) {
113 return subSlots[ctx.subSlot()].at( k );
116 return m_algStates.at( ctx.slot() )[
static_cast<size_t>( k )];
190 const size_t slotID = ctx.valid() ? ctx.slot() : 0;
191 ost <<
" [slot: " << slotID <<
", incident: " <<
m_eventStatus.at( slotID ) <<
"]:\n\n";
194 [](
size_t m,
const auto& as ) {
return std::max( m, as.length() ); } );
195 for (
size_t k = 0;
const auto& e : algState )
207 for (
auto& it :
m_algStates.at( ctx.slot() ) ) it.reset();
212 for (
auto& it : subSlot ) it.second.reset();
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
AlgExecState::State State
internal state of an algorithm
void setState(AlgExecStateRef::State s)
void setFilterPassed(bool f=true)
bool filterPassed() const
const StatusCode & execStatus() const
AlgExecStateRef::State state() const
void setExecStatus(const StatusCode &sc=StatusCode::SUCCESS)
A service that keeps track of the execution state of Algorithm.
void reset(const EventContext &ctx) override
void dump(std::ostream &ost, const EventContext &ctx) const override
std::vector< std::string > m_algNames
std::vector< EventStatus::Status > m_eventStatus
AlgExecStateRef::AlgKey addAlg(const Gaudi::StringKey &) override
unsigned int incrementErrorCount(const IAlgorithm *iAlg) override
void setFilterPassed(const EventContext &, AlgExecStateRef::AlgKey, bool) override
void updateEventStatus(const bool &b, const EventContext &ctx) override
AlgExecStateInternal & getInternalState(const EventContext &ctx, AlgExecStateRef::AlgKey k)
const StatusCode & execStatus(const EventContext &, AlgExecStateRef::AlgKey) const override
void setState(const EventContext &, AlgExecStateRef::AlgKey, AlgExecStateRef::State) override
std::unordered_map< AlgExecStateRef::AlgKey, std::atomic< unsigned int > > m_errorCount
unsigned int algErrorCount(const IAlgorithm *iAlg) const override
std::vector< std::vector< AlgStatesWithSubSlot > > m_algSubSlotStates
void setEventStatus(const EventStatus::Status &sc, const EventContext &ctx) override
const EventStatus::Status & eventStatus(const EventContext &ctx) const override
std::vector< Gaudi::StringKey > m_preInitAlgs
bool filterPassed(const EventContext &, AlgExecStateRef::AlgKey) const override
std::once_flag m_initFlag
std::vector< AlgStates > m_algStates
std::unordered_map< Gaudi::StringKey, AlgExecStateRef::AlgKey, Gaudi::StringKeyHash, std::equal_to<> > m_algNameToIndex
const std::string & algName(AlgExecStateRef::AlgKey) const override
AlgExecStateRef::AlgKey algKey(const std::string &algName) const
void setExecStatus(const EventContext &, AlgExecStateRef::AlgKey, const StatusCode &) override
AlgExecStateRef::State state(const EventContext &, AlgExecStateRef::AlgKey) const override
void resetErrorCount() override
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MSG::Level msgLevel() const
This class represents an entry point to all the event specific data.
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
Helper class for efficient "key" access for strings.
Define general base for Gaudi exception.
The IAlgorithm is the interface implemented by the Algorithm base class.
This class is used for returning status codes from appropriate routines.
constexpr static const auto FAILURE
GAUDI_API const EventContext & currentContext()