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 <string>
7 
16 class GAUDI_API Incident {
17 
18 public:
19 
21  Incident ( std::string source,
22  std::string type
23  )
24  : m_source ( std::move(source) ),
25  m_type ( std::move(type) ) { }
26 
28  virtual ~Incident() = default;
29 
34  const std::string& type() const { return m_type; }
35 
40  const std::string& source() const { return m_source; }
41 
42 private:
43 
44  std::string m_source;
45  std::string m_type;
46 
47 };
48 
49 #ifndef _inc_types_impl_
50 #define _inc_type_(x) extern const std::string x
51 #else
52 #define _inc_type_(x) extern const std::string x; \
53  const std::string x{#x}
54 #endif
55 
64 namespace IncidentType
65 {
66  _inc_type_(BeginEvent);
67  _inc_type_(EndEvent);
68  _inc_type_(BeginRun);
69  _inc_type_(EndRun);
70  _inc_type_(EndStream);
71 
72  _inc_type_(AbortEvent);
73 
74  //Added by R. Lambert 2009-09-03, for summary services
75  //define a preprocessor macro to allow backward-compatibility
76 #define GAUDI_FILE_INCIDENTS
77 
78  _inc_type_(BeginOutputFile);
79  _inc_type_(FailOutputFile);
80  _inc_type_(WroteToOutputFile);
81  _inc_type_(EndOutputFile);
82 
83  _inc_type_(BeginInputFile);
84  _inc_type_(FailInputFile);
85  _inc_type_(EndInputFile);
86 
87  _inc_type_(CorruptedInputFile);
88 
90  _inc_type_(BeginProcessing);
92  _inc_type_(EndProcessing);
93 
97  _inc_type_(SvcPostFinalize);
98 }
99 #undef _inc_type_
100 
101 #endif //GAUDI_INCIDENT_H
102 
#define GAUDI_API
Definition: Kernel.h:107
STL namespace.
Namespace for pre-defined common incident types.
Base class for all Incidents (computing events).
Definition: Incident.h:16
_inc_type_(BeginEvent)
Processing of a new event has started.
string type
Definition: gaudirun.py:151