| The Gaudi Framework v29r0 (ff2e7097)

- 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/EventContext.h"
6 #include "GaudiKernel/Kernel.h"
7 #include <string>
8
17 class GAUDI_API Incident
18 {
19
20 public:
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 ), m_type( type ), m_ctx( ctx )
31 {
32 }
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 std::string m_source;
57 std::string m_type;
58 EventContext m_ctx;
59 };
60
61 #ifndef _inc_types_impl_
62 #define _inc_type_( x ) extern const std::string x
63 #else
64 #define _inc_type_( x ) \
65 extern const std::string x; \
66 const std::string x { #x }
67 #endif
68
77 namespace IncidentType
78 {
79 _inc_type_( BeginEvent );
80 _inc_type_( EndEvent );
81 _inc_type_( BeginRun );
82 _inc_type_( EndRun );
83 _inc_type_( EndStream );
84
85 _inc_type_( AbortEvent );
86
87 // Added by R. Lambert 2009-09-03, for summary services
88 // define a preprocessor macro to allow backward-compatibility
89 #define GAUDI_FILE_INCIDENTS
90
91 _inc_type_( BeginOutputFile );
92 _inc_type_( FailOutputFile );
93 _inc_type_( WroteToOutputFile );
94 _inc_type_( EndOutputFile );
95
96 _inc_type_( BeginInputFile );
97 _inc_type_( FailInputFile );
98 _inc_type_( EndInputFile );
99
100 _inc_type_( CorruptedInputFile );
101
103 _inc_type_( BeginProcessing );
105 _inc_type_( EndProcessing );
106
110 _inc_type_( SvcPostFinalize );
111 }
112 #undef _inc_type_
113
114 #endif // GAUDI_INCIDENT_H
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:24
Incident::m_type
std::string m_type
incident type
Definition: Incident.h:57
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:62
gaudirun.type
type
Definition: gaudirun.py:133
IncidentType
Namespace for pre-defined common incident types.
Incident::m_source
std::string m_source
Incident source.
Definition: Incident.h:56
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:110
Incident::m_ctx
EventContext m_ctx
Event Context when Incident created.
Definition: Incident.h:58