| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Incident.h
Go to the documentation of this file.
1 #ifndef GAUDI_INCIDENT_H
2 #define GAUDI_INCIDENT_H
3
4 // Include files
5 #include "GaudiKernel/Kernel.h"
6 #include "GaudiKernel/EventContext.h"
7 #include <string>
8
17 class GAUDI_API Incident {
18
19 public:
20
22 Incident ( const std::string& source,
23 const std::string& type
24 ) ;
25
26 Incident ( const std::string& source,
27 const std::string& type,
28 const EventContext& ctx
29 )
30 : m_source ( source ),
31 m_type ( type ),
32 m_ctx ( ctx ) { }
33
35 virtual ~Incident() = default;
36
41 const std::string& type() const { return m_type; }
42
47 const std::string& source() const { return m_source; }
48
53 EventContext context() const { return m_ctx; }
54
55 private:
56
57 std::string m_source;
58 std::string m_type;
59 EventContext m_ctx;
60
61 };
62
63 #ifndef _inc_types_impl_
64 #define _inc_type_(x) extern const std::string x
65 #else
66 #define _inc_type_(x) extern const std::string x; \
67 const std::string x{#x}
68 #endif
69
78 namespace IncidentType
79 {
80 _inc_type_(BeginEvent);
81 _inc_type_(EndEvent);
82 _inc_type_(BeginRun);
83 _inc_type_(EndRun);
84 _inc_type_(EndStream);
85
86 _inc_type_(AbortEvent);
87
88 //Added by R. Lambert 2009-09-03, for summary services
89 //define a preprocessor macro to allow backward-compatibility
90 #define GAUDI_FILE_INCIDENTS
91
92 _inc_type_(BeginOutputFile);
93 _inc_type_(FailOutputFile);
94 _inc_type_(WroteToOutputFile);
95 _inc_type_(EndOutputFile);
96
97 _inc_type_(BeginInputFile);
98 _inc_type_(FailInputFile);
99 _inc_type_(EndInputFile);
100
101 _inc_type_(CorruptedInputFile);
102
104 _inc_type_(BeginProcessing);
106 _inc_type_(EndProcessing);
107
111 _inc_type_(SvcPostFinalize);
112 }
113 #undef _inc_type_
114
115 #endif //GAUDI_INCIDENT_H
116
Kernel.h
Incident::type
const std::string & type() const
Access to the incident type.
Definition: Incident.h:41
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition: Incident.h:47
EventContext.h
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
Incident::m_type
std::string m_type
incident type
Definition: Incident.h:58
std::string
STL class.
Incident::Incident
Incident(const std::string &source, const std::string &type, const EventContext &ctx)
Definition: Incident.h:26
_inc_type_
#define _inc_type_(x)
Definition: Incident.h:64
gaudirun.type
type
Definition: gaudirun.py:125
IncidentType
Namespace for pre-defined common incident types.
Incident::m_source
std::string m_source
Incident source.
Definition: Incident.h:57
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
Incident::context
EventContext context() const
Access to the EventContext of the source of the incident.
Definition: Incident.h:53
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:107
Incident::m_ctx
EventContext m_ctx
Event Context when Incident created.
Definition: Incident.h:59