The Gaudi Framework
master (82fdf313)
Loading...
Searching...
No Matches
Incident.h
Go to the documentation of this file.
1
/***********************************************************************************\
2
* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3
* *
4
* This software is distributed under the terms of the Apache version 2 licence, *
5
* copied verbatim in the file "LICENSE". *
6
* *
7
* In applying this licence, CERN does not waive the privileges and immunities *
8
* granted to it by virtue of its status as an Intergovernmental Organization *
9
* or submit itself to any jurisdiction. *
10
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/EventContext.h
>
14
#include <
GaudiKernel/Kernel.h
>
15
#include <string>
16
24
class
GAUDI_API
Incident
{
25
public
:
27
Incident
(
const
std::string&
source
,
28
const
std::string&
type
29
);
30
31
Incident
(
const
std::string&
source
,
32
const
std::string&
type
,
33
const
EventContext
& ctx
34
)
35
:
m_source
(
source
),
m_type
(
type
),
m_ctx
( ctx ) {}
36
37
virtual
~Incident
() =
default
;
38
43
const
std::string&
type
()
const
{
return
m_type
; }
44
49
const
std::string&
source
()
const
{
return
m_source
; }
50
55
EventContext
context
()
const
{
return
m_ctx
; }
56
57
private
:
58
std::string
m_source
;
59
std::string
m_type
;
60
EventContext
m_ctx
;
61
};
62
63
#ifndef _inc_types_impl_
64
# define _inc_type_( x ) extern const std::string x
65
#else
66
# define _inc_type_( x ) \
67
extern const std::string x; \
68
const std::string x { #x }
69
#endif
70
80
namespace
IncidentType
{
81
_inc_type_
( BeginEvent );
82
_inc_type_
( EndEvent );
83
_inc_type_
( BeginRun );
84
_inc_type_
( EndRun );
85
_inc_type_
( EndStream );
86
87
_inc_type_
( AbortEvent );
88
89
// Added by R. Lambert 2009-09-03, for summary services
90
// define a preprocessor macro to allow backward-compatibility
91
#define GAUDI_FILE_INCIDENTS
92
93
_inc_type_
( BeginOutputFile );
94
_inc_type_
( FailOutputFile );
95
_inc_type_
( WroteToOutputFile );
96
_inc_type_
( EndOutputFile );
97
98
_inc_type_
( BeginInputFile );
99
_inc_type_
( FailInputFile );
100
_inc_type_
( EndInputFile );
101
102
_inc_type_
( CorruptedInputFile );
103
105
_inc_type_
( BeginProcessing );
107
_inc_type_
( EndProcessing );
108
112
_inc_type_
( SvcPostFinalize );
113
}
// namespace IncidentType
114
#undef _inc_type_
EventContext.h
_inc_type_
#define _inc_type_(x)
Definition
Incident.h:64
Kernel.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
EventContext
This class represents an entry point to all the event specific data.
Definition
EventContext.h:34
Incident::Incident
Incident(const std::string &source, const std::string &type)
Default Constructor.
Definition
Incident.cpp:15
Incident::context
EventContext context() const
Access to the EventContext of the source of the incident.
Definition
Incident.h:55
Incident::m_ctx
EventContext m_ctx
Event Context when Incident created.
Definition
Incident.h:60
Incident::type
const std::string & type() const
Access to the incident type.
Definition
Incident.h:43
Incident::m_type
std::string m_type
incident type
Definition
Incident.h:59
Incident::source
const std::string & source() const
Access to the source of the incident.
Definition
Incident.h:49
Incident::m_source
std::string m_source
Incident source.
Definition
Incident.h:58
Incident::~Incident
virtual ~Incident()=default
Incident::Incident
Incident(const std::string &source, const std::string &type, const EventContext &ctx)
Definition
Incident.h:31
IncidentType
Namespace for pre-defined common incident types.
GaudiKernel
include
GaudiKernel
Incident.h
Generated on Thu Oct 2 2025 15:31:11 for The Gaudi Framework by
1.13.1