The Gaudi Framework
v30r3 (a5ef0a68)
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
AlgExecStateSvc.h
Go to the documentation of this file.
1
#ifndef GAUDICORESVC_ALGEXECSTATESVC_H
2
#define GAUDICORESVC_ALGEXECSTATESVC_H 1
3
4
#include "
GaudiKernel/IAlgExecStateSvc.h
"
5
#include "
GaudiKernel/IAlgorithm.h
"
6
#include "
GaudiKernel/Service.h
"
7
8
#include <map>
9
#include <mutex>
10
#include <vector>
11
16
class
AlgExecStateSvc
:
public
extends
<Service, IAlgExecStateSvc>
17
{
18
public
:
19
using
extends::extends;
20
21
typedef
IAlgExecStateSvc::AlgStateMap_t
AlgStateMap_t
;
22
23
const
AlgExecState
&
algExecState
(
const
Gaudi::StringKey
& algName,
const
EventContext
& ctx )
const override
;
24
const
AlgExecState
&
algExecState
(
IAlgorithm
* iAlg,
const
EventContext
& ctx )
const override
;
25
AlgExecState
&
algExecState
(
IAlgorithm
* iAlg,
const
EventContext
& ctx )
override
;
26
const
AlgStateMap_t&
algExecStates
(
const
EventContext
& ctx )
const override
;
27
28
void
reset
(
const
EventContext
& ctx )
override
;
29
30
void
addAlg
(
IAlgorithm
* iAlg )
override
;
31
void
addAlg
(
const
Gaudi::StringKey
& algName )
override
;
32
33
const
EventStatus::Status
&
eventStatus
(
const
EventContext
& ctx )
const override
;
34
35
void
setEventStatus
(
const
EventStatus::Status
& sc,
const
EventContext
& ctx )
override
;
36
37
void
updateEventStatus
(
const
bool
& b,
const
EventContext
& ctx )
override
;
38
39
unsigned
int
algErrorCount
(
const
IAlgorithm
* iAlg )
const override
;
40
void
resetErrorCount
(
const
IAlgorithm
* iAlg )
override
;
41
unsigned
int
incrementErrorCount
(
const
IAlgorithm
* iAlg )
override
;
42
43
void
dump
(
std::ostringstream
& ost,
const
EventContext
& ctx )
const override
;
44
45
private
:
46
// one vector entry per event slot
47
std::vector<AlgStateMap_t>
m_algStates
;
48
49
std::vector<EventStatus::Status>
m_eventStatus
;
50
std::vector<Gaudi::StringKey>
m_preInitAlgs
;
51
52
std::map<Gaudi::StringKey, std::atomic<unsigned int>
>
m_errorCount
;
53
54
void
init
();
55
void
checkInit
()
const
;
56
std::once_flag
m_initFlag
;
57
bool
m_isInit
=
false
;
58
59
std::mutex
m_mut
;
60
};
61
62
#endif
AlgExecStateSvc::resetErrorCount
void resetErrorCount(const IAlgorithm *iAlg) override
Definition:
AlgExecStateSvc.cpp:220
AlgExecStateSvc
A service that keeps track of the execution state of Algorithm.
Definition:
AlgExecStateSvc.h:16
AlgExecStateSvc::AlgStateMap_t
IAlgExecStateSvc::AlgStateMap_t AlgStateMap_t
Definition:
AlgExecStateSvc.h:21
AlgExecStateSvc::m_algStates
std::vector< AlgStateMap_t > m_algStates
Definition:
AlgExecStateSvc.h:47
IAlgExecStateSvc.h
AlgExecStateSvc::algExecState
const AlgExecState & algExecState(const Gaudi::StringKey &algName, const EventContext &ctx) const override
Definition:
AlgExecStateSvc.cpp:119
AlgExecStateSvc::init
void init()
Definition:
AlgExecStateSvc.cpp:12
IAlgorithm.h
AlgExecStateSvc::m_errorCount
std::map< Gaudi::StringKey, std::atomic< unsigned int > > m_errorCount
Definition:
AlgExecStateSvc.h:52
AlgExecStateSvc::dump
void dump(std::ostringstream &ost, const EventContext &ctx) const override
Definition:
AlgExecStateSvc.cpp:71
AlgExecStateSvc::updateEventStatus
void updateEventStatus(const bool &b, const EventContext &ctx) override
Definition:
AlgExecStateSvc.cpp:181
AlgExecStateSvc::m_initFlag
std::once_flag m_initFlag
Definition:
AlgExecStateSvc.h:56
std::once_flag
EventContext
This class represents an entry point to all the event specific data.
Definition:
EventContext.h:24
std::map
STL class.
Gaudi::StringKey
The helper class to represent the efficient "key" for access.
Definition:
StringKey.h:35
std::mutex
AlgExecStateSvc::checkInit
void checkInit() const
Definition:
AlgExecStateSvc.cpp:60
Service.h
std::ostringstream
STL class.
AlgExecStateSvc::incrementErrorCount
unsigned int incrementErrorCount(const IAlgorithm *iAlg) override
Definition:
AlgExecStateSvc.cpp:233
AlgExecStateSvc::m_preInitAlgs
std::vector< Gaudi::StringKey > m_preInitAlgs
Definition:
AlgExecStateSvc.h:50
EventStatus::Status
Status
Definition:
IAlgExecStateSvc.h:67
AlgExecStateSvc::algErrorCount
unsigned int algErrorCount(const IAlgorithm *iAlg) const override
Definition:
AlgExecStateSvc.cpp:206
IAlgorithm
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition:
IAlgorithm.h:28
AlgExecStateSvc::m_isInit
bool m_isInit
Definition:
AlgExecStateSvc.h:57
AlgExecStateSvc::algExecStates
const AlgStateMap_t & algExecStates(const EventContext &ctx) const override
Definition:
AlgExecStateSvc.cpp:157
AlgExecStateSvc::m_mut
std::mutex m_mut
Definition:
AlgExecStateSvc.h:59
AlgExecStateSvc::reset
void reset(const EventContext &ctx) override
Definition:
AlgExecStateSvc.cpp:194
std::vector
STL class.
extends
Base class used to extend a class implementing other interfaces.
Definition:
extends.h:10
AlgExecStateSvc::eventStatus
const EventStatus::Status & eventStatus(const EventContext &ctx) const override
Definition:
AlgExecStateSvc.cpp:165
AlgExecStateSvc::m_eventStatus
std::vector< EventStatus::Status > m_eventStatus
Definition:
AlgExecStateSvc.h:49
AlgExecStateSvc::setEventStatus
void setEventStatus(const EventStatus::Status &sc, const EventContext &ctx) override
Definition:
AlgExecStateSvc.cpp:173
AlgExecState
Definition:
IAlgExecStateSvc.h:27
AlgExecStateSvc::addAlg
void addAlg(IAlgorithm *iAlg) override
Definition:
AlgExecStateSvc.cpp:86
GaudiCoreSvc
src
AlgExecStateSvc
AlgExecStateSvc.h
Generated on Wed Aug 1 2018 23:20:52 for The Gaudi Framework by
1.8.11