The Gaudi Framework  v30r3 (a5ef0a68)
AlgExecStateSvc Class Reference

A service that keeps track of the execution state of Algorithm. More...

#include <src/AlgExecStateSvc/AlgExecStateSvc.h>

Inheritance diagram for AlgExecStateSvc:
Collaboration diagram for AlgExecStateSvc:

Public Types

typedef IAlgExecStateSvc::AlgStateMap_t AlgStateMap_t
 
- Public Types inherited from extends< Service, IAlgExecStateSvc >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces... >
 Typedef to the base of this class. More...
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl = PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 Typedef used to refer to this class from derived classes, as in. More...
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type
 take union of the ext_iids of all Interfaces... More...
 

Public Member Functions

const AlgExecStatealgExecState (const Gaudi::StringKey &algName, const EventContext &ctx) const override
 
const AlgExecStatealgExecState (IAlgorithm *iAlg, const EventContext &ctx) const override
 
AlgExecStatealgExecState (IAlgorithm *iAlg, const EventContext &ctx) override
 
const AlgStateMap_talgExecStates (const EventContext &ctx) const override
 
void reset (const EventContext &ctx) override
 
void addAlg (IAlgorithm *iAlg) override
 
void addAlg (const Gaudi::StringKey &algName) override
 
const EventStatus::StatuseventStatus (const EventContext &ctx) const override
 
void setEventStatus (const EventStatus::Status &sc, const EventContext &ctx) override
 
void updateEventStatus (const bool &b, const EventContext &ctx) override
 
unsigned int algErrorCount (const IAlgorithm *iAlg) const override
 
void resetErrorCount (const IAlgorithm *iAlg) override
 
unsigned int incrementErrorCount (const IAlgorithm *iAlg) override
 
void dump (std::ostringstream &ost, const EventContext &ctx) const override
 
- Public Member Functions inherited from extends< Service, IAlgExecStateSvc >
void * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast. More...
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface. More...
 
std::vector< std::stringgetInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames. More...
 
- Public Member Functions inherited from Service
const std::stringname () const override
 Retrieve name of the service. More...
 
StatusCode configure () override
 
StatusCode initialize () override
 
StatusCode start () override
 
StatusCode stop () override
 
StatusCode finalize () override
 
StatusCode terminate () override
 
Gaudi::StateMachine::State FSMState () const override
 
Gaudi::StateMachine::State targetFSMState () const override
 
StatusCode reinitialize () override
 
StatusCode restart () override
 
StatusCode sysInitialize () override
 Initialize Service. More...
 
StatusCode sysStart () override
 Initialize Service. More...
 
StatusCode sysStop () override
 Initialize Service. More...
 
StatusCode sysFinalize () override
 Finalize Service. More...
 
StatusCode sysReinitialize () override
 Re-initialize the Service. More...
 
StatusCode sysRestart () override
 Re-initialize the Service. More...
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
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. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName, bool createIf=true)
 Declare used tool. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property. More...
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation. More...
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property. More...
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p) override
 set the property form another property More...
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 set the property from name and the value More...
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property More...
 
const Gaudi::Details::PropertyBasegetProperty (const std::string &name) const override
 get the property by name More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 convert the property to the string More...
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties More...
 
bool hasProperty (const std::string &name) const override
 Return true if we have a property with the given name. More...
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream) More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const
 Backward compatibility function for getting the output level. More...
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 

Private Member Functions

void init ()
 
void checkInit () const
 

Private Attributes

std::vector< AlgStateMap_tm_algStates
 
std::vector< EventStatus::Statusm_eventStatus
 
std::vector< Gaudi::StringKeym_preInitAlgs
 
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
 
std::once_flag m_initFlag
 
bool m_isInit = false
 
std::mutex m_mut
 

Additional Inherited Members

- Protected Member Functions inherited from Service
 ~Service () override
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
Gaudi::Details::PropertyBaseproperty (const std::string &name) const
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches. More...
 
MSG::Level resetMessaging ()
 Reinitialize internal states. More...
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state. More...
 
Gaudi::Property< int > m_outputLevel {this, "OutputLevel", MSG::NIL, "output level"}
 
Gaudi::Property< bool > m_auditInit {this, "AuditServices", false, "[[deprecated]] unused"}
 
Gaudi::Property< bool > m_auditorInitialize {this, "AuditInitialize", false, "trigger auditor on initialize()"}
 
Gaudi::Property< bool > m_auditorStart {this, "AuditStart", false, "trigger auditor on start()"}
 
Gaudi::Property< bool > m_auditorStop {this, "AuditStop", false, "trigger auditor on stop()"}
 
Gaudi::Property< bool > m_auditorFinalize {this, "AuditFinalize", false, "trigger auditor on finalize()"}
 
Gaudi::Property< bool > m_auditorReinitialize {this, "AuditReinitialize", false, "trigger auditor on reinitialize()"}
 
Gaudi::Property< bool > m_auditorRestart {this, "AuditRestart", false, "trigger auditor on restart()"}
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service. More...
 

Detailed Description

A service that keeps track of the execution state of Algorithm.

Definition at line 16 of file AlgExecStateSvc.h.

Member Typedef Documentation

Member Function Documentation

void AlgExecStateSvc::addAlg ( IAlgorithm iAlg)
override

Definition at line 86 of file AlgExecStateSvc.cpp.

86 { return addAlg( iAlg->nameKey() ); }
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
void addAlg(IAlgorithm *iAlg) override
void AlgExecStateSvc::addAlg ( const Gaudi::StringKey algName)
override

Definition at line 90 of file AlgExecStateSvc.cpp.

91 {
92  if ( !m_isInit ) {
93  if ( msgLevel( MSG::DEBUG ) ) debug() << "preInit: will add Alg " << alg.str() << " later" << endmsg;
94  m_preInitAlgs.push_back( alg );
95  return;
96  }
97 
98  if ( !m_algStates.empty() && m_algStates.front().find( alg ) != m_algStates.front().end() ) {
99  // already added
100  return;
101  }
102 
103  {
104  // in theory, this should only get called during initialization (serial)
105  // so shouldn't have to protect with a mutex...
107 
108  AlgExecState s;
109  for ( auto& a : m_algStates ) a[alg] = s;
110  m_errorCount[alg] = 0;
111  }
112 
113  if ( msgLevel( MSG::DEBUG ) )
114  debug() << "adding alg " << alg.str() << " to " << m_algStates.size() << " slots" << endmsg;
115 }
std::vector< AlgStateMap_t > m_algStates
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
T push_back(T...args)
T lock(T...args)
std::vector< Gaudi::StringKey > m_preInitAlgs
std::mutex m_mut
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
string s
Definition: gaudirun.py:253
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
unsigned int AlgExecStateSvc::algErrorCount ( const IAlgorithm iAlg) const
override

Definition at line 206 of file AlgExecStateSvc.cpp.

207 {
208  auto itr = m_errorCount.find( iAlg->nameKey() );
209  if ( itr == m_errorCount.end() ) {
210  error() << "Unable to find Algorithm \"" << iAlg->name() << "\" in map"
211  << " of ErrorCounts" << endmsg;
212  return 0;
213  }
214 
215  return itr->second;
216 }
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
T end(T...args)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
T find(T...args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
const AlgExecState & AlgExecStateSvc::algExecState ( const Gaudi::StringKey algName,
const EventContext ctx 
) const
override

Definition at line 119 of file AlgExecStateSvc.cpp.

120 {
121  checkInit();
122 
123  auto& algState = m_algStates.at( ctx.slot() );
124  auto itr = algState.find( algName );
125  if ( UNLIKELY( itr == algState.end() ) ) {
126  throw GaudiException{"cannot find Alg " + algName.str() + " in AlgStateMap", name(), StatusCode::FAILURE};
127  }
128  return itr->second;
129 }
#define UNLIKELY(x)
Definition: Kernel.h:122
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Define general base for Gaudi exception.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:288
std::vector< AlgStateMap_t > m_algStates
ContextID_t slot() const
Definition: EventContext.h:40
void checkInit() const
const std::string & str() const
the actual string
Definition: StringKey.h:47
const AlgExecState & AlgExecStateSvc::algExecState ( IAlgorithm iAlg,
const EventContext ctx 
) const
override

Definition at line 133 of file AlgExecStateSvc.cpp.

134 {
135  return algExecState( iAlg->nameKey(), ctx );
136 }
const AlgExecState & algExecState(const Gaudi::StringKey &algName, const EventContext &ctx) const override
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
AlgExecState & AlgExecStateSvc::algExecState ( IAlgorithm iAlg,
const EventContext ctx 
)
override

Definition at line 140 of file AlgExecStateSvc.cpp.

141 {
143 
144  auto& algState = m_algStates.at( ctx.slot() );
145  auto itr = algState.find( iAlg->nameKey() );
146 
147  if ( UNLIKELY( itr == algState.end() ) ) {
148  throw GaudiException{std::string{"cannot find Alg "} + iAlg->name() + " in AlgStateMap", name(),
150  }
151 
152  return itr->second;
153 }
#define UNLIKELY(x)
Definition: Kernel.h:122
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Define general base for Gaudi exception.
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:288
std::vector< AlgStateMap_t > m_algStates
ContextID_t slot() const
Definition: EventContext.h:40
std::once_flag m_initFlag
T call_once(T...args)
STL class.
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
const IAlgExecStateSvc::AlgStateMap_t & AlgExecStateSvc::algExecStates ( const EventContext ctx) const
override

Definition at line 157 of file AlgExecStateSvc.cpp.

158 {
159  checkInit();
160  return m_algStates.at( ctx.slot() );
161 }
std::vector< AlgStateMap_t > m_algStates
ContextID_t slot() const
Definition: EventContext.h:40
void checkInit() const
void AlgExecStateSvc::checkInit ( ) const
private

Definition at line 60 of file AlgExecStateSvc.cpp.

61 {
62 
63  if ( !m_isInit ) {
64  fatal() << "AlgExecStateSvc not initialized before first use" << endmsg;
65  throw GaudiException( "AlgExecStateSvc not initialized before first use!", "AlgExecStateSvc", StatusCode::FAILURE );
66  }
67 }
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Define general base for Gaudi exception.
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
void AlgExecStateSvc::dump ( std::ostringstream ost,
const EventContext ctx 
) const
override

Definition at line 71 of file AlgExecStateSvc.cpp.

72 {
73  size_t slotID = ctx.valid() ? ctx.slot() : 0;
74 
75  ost << " [slot: " << slotID << ", incident: " << m_eventStatus.at( slotID ) << "]:\n\n";
76 
77  auto& algState = m_algStates.at( slotID );
78  auto ml = std::accumulate( begin( algState ), end( algState ), size_t{0},
79  []( size_t m, const auto& as ) { return std::max( m, as.first.str().length() ); } );
80 
81  for ( auto& e : algState ) ost << " + " << std::setw( ml ) << e.first.str() << " " << e.second << '\n';
82 }
std::vector< AlgStateMap_t > m_algStates
ContextID_t slot() const
Definition: EventContext.h:40
T setw(T...args)
T at(T...args)
constexpr double m
Definition: SystemOfUnits.h:94
T max(T...args)
std::vector< EventStatus::Status > m_eventStatus
AttribStringParser::Iterator begin(const AttribStringParser &parser)
T accumulate(T...args)
bool valid() const
Definition: EventContext.h:41
const EventStatus::Status & AlgExecStateSvc::eventStatus ( const EventContext ctx) const
override

Definition at line 165 of file AlgExecStateSvc.cpp.

166 {
167  checkInit();
168  return m_eventStatus.at( ctx.slot() );
169 }
ContextID_t slot() const
Definition: EventContext.h:40
void checkInit() const
T at(T...args)
std::vector< EventStatus::Status > m_eventStatus
unsigned int AlgExecStateSvc::incrementErrorCount ( const IAlgorithm iAlg)
override

Definition at line 233 of file AlgExecStateSvc.cpp.

234 {
235  auto itr = m_errorCount.find( iAlg->nameKey() );
236  if ( itr == m_errorCount.end() ) {
237  error() << "Unable to find Algorithm \"" << iAlg->name() << "\" in map"
238  << " of ErrorCounts" << endmsg;
239  return 0;
240  }
241  return ++( itr->second );
242 }
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
T end(T...args)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
T find(T...args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
void AlgExecStateSvc::init ( )
private

Definition at line 12 of file AlgExecStateSvc.cpp.

13 {
14 
15  // seriously? do we have no way of getting a Service by type???
16  std::string wbn;
17  for ( auto& is : serviceLocator()->getServices() ) {
18  IHiveWhiteBoard* iwb = dynamic_cast<IHiveWhiteBoard*>( is );
19  if ( iwb ) {
20  wbn = is->name();
21  if ( msgLevel( MSG::VERBOSE ) ) verbose() << "HiveWhiteBoard service name is " << wbn << endmsg;
22  break;
23  }
24  }
25 
27  wbs = serviceLocator()->service( wbn, false );
28 
29  if ( wbs.isValid() ) {
30  m_algStates.resize( wbs->getNumberOfStores() );
32  } else {
33  m_algStates.resize( 1 );
34  m_eventStatus.resize( 1 );
35  }
36 
37  if ( msgLevel( MSG::DEBUG ) ) debug() << "resizing state containers to : " << m_algStates.size() << endmsg;
38 
40  if ( !algMan.isValid() ) {
41  fatal() << "could not get the AlgManager" << endmsg;
42  throw GaudiException( "In AlgExecStateSvc, unable to get the AlgManager!", "AlgExecStateSvc", StatusCode::FAILURE );
43  }
44 
45  m_isInit = true;
46 
47  auto algos = algMan->getAlgorithms();
48  for ( auto& alg : algos ) addAlg( alg );
49  for ( auto& alg : m_preInitAlgs ) addAlg( alg );
50 
51  if ( msgLevel( MSG::VERBOSE ) ) {
54  verbose() << "dumping state:\n" << ost.str() << endmsg;
55  }
56 }
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Define general base for Gaudi exception.
std::vector< AlgStateMap_t > m_algStates
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
void dump(std::ostringstream &ost, const EventContext &ctx) const override
T resize(T...args)
STL class.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:79
GAUDI_API const EventContext & currentContext()
std::vector< Gaudi::StringKey > m_preInitAlgs
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:68
std::vector< EventStatus::Status > m_eventStatus
MsgStream & fatal() const
shortcut for the method msgStream(MSG::FATAL)
virtual size_t getNumberOfStores() const =0
Get the number of &#39;slots&#39;.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition: Service.cpp:291
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
void addAlg(IAlgorithm *iAlg) override
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
void AlgExecStateSvc::reset ( const EventContext ctx)
override

Definition at line 194 of file AlgExecStateSvc.cpp.

195 {
196  if ( msgLevel( MSG::DEBUG ) ) verbose() << "reset(" << ctx.slot() << ")" << endmsg;
197 
199  for ( auto& e : m_algStates.at( ctx.slot() ) ) e.second.reset();
200 
202 }
std::vector< AlgStateMap_t > m_algStates
ContextID_t slot() const
Definition: EventContext.h:40
MsgStream & verbose() const
shortcut for the method msgStream(MSG::VERBOSE)
std::once_flag m_initFlag
T call_once(T...args)
T at(T...args)
std::vector< EventStatus::Status > m_eventStatus
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
MSG::Level msgLevel() const
get the cached level (originally extracted from the embedded MsgStream)
void AlgExecStateSvc::resetErrorCount ( const IAlgorithm iAlg)
override

Definition at line 220 of file AlgExecStateSvc.cpp.

221 {
222  auto itr = m_errorCount.find( iAlg->nameKey() );
223  if ( itr != m_errorCount.end() ) {
224  itr->second = 0;
225  } else {
226  error() << "Unable to find Algorithm \"" << iAlg->name() << "\" in map"
227  << " of ErrorCounts" << endmsg;
228  }
229 }
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
T end(T...args)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual const Gaudi::StringKey & nameKey() const =0
StringKey rep of name.
T find(T...args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:209
void AlgExecStateSvc::setEventStatus ( const EventStatus::Status sc,
const EventContext ctx 
)
override

Definition at line 173 of file AlgExecStateSvc.cpp.

174 {
176  m_eventStatus.at( ctx.slot() ) = sc;
177 }
ContextID_t slot() const
Definition: EventContext.h:40
std::once_flag m_initFlag
T call_once(T...args)
T at(T...args)
std::vector< EventStatus::Status > m_eventStatus
void AlgExecStateSvc::updateEventStatus ( const bool &  b,
const EventContext ctx 
)
override

Definition at line 181 of file AlgExecStateSvc.cpp.

182 {
184  auto& status = m_eventStatus.at( ctx.slot() );
185  if ( status == EventStatus::Success ) {
186  if ( fail ) status = EventStatus::AlgFail;
187  } else if ( status == EventStatus::Invalid ) {
188  status = ( fail ? EventStatus::AlgFail : EventStatus::Success );
189  }
190 }
ContextID_t slot() const
Definition: EventContext.h:40
std::once_flag m_initFlag
T call_once(T...args)
T at(T...args)
std::vector< EventStatus::Status > m_eventStatus

Member Data Documentation

std::vector<AlgStateMap_t> AlgExecStateSvc::m_algStates
private

Definition at line 47 of file AlgExecStateSvc.h.

std::map<Gaudi::StringKey, std::atomic<unsigned int> > AlgExecStateSvc::m_errorCount
private

Definition at line 52 of file AlgExecStateSvc.h.

std::vector<EventStatus::Status> AlgExecStateSvc::m_eventStatus
private

Definition at line 49 of file AlgExecStateSvc.h.

std::once_flag AlgExecStateSvc::m_initFlag
private

Definition at line 56 of file AlgExecStateSvc.h.

bool AlgExecStateSvc::m_isInit = false
private

Definition at line 57 of file AlgExecStateSvc.h.

std::mutex AlgExecStateSvc::m_mut
private

Definition at line 59 of file AlgExecStateSvc.h.

std::vector<Gaudi::StringKey> AlgExecStateSvc::m_preInitAlgs
private

Definition at line 50 of file AlgExecStateSvc.h.


The documentation for this class was generated from the following files: