ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODMetaData
Root
FileMetaDataAccessors_v1.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// System include(s):
6
#include <iostream>
7
8
// Local include(s):
9
#include "
FileMetaDataAccessors_v1.h
"
10
12
#define DECLARE_STRING_ACCESSOR( TYPE ) \
13
case FileMetaData_v1::TYPE: \
14
do { \
15
static const SG::AuxElement::Accessor< std::string > acc( #TYPE ); \
16
return &acc; \
17
} while( 0 )
18
20
#define DECLARE_UINT_ACCESSOR( TYPE ) \
21
case FileMetaData_v1::TYPE: \
22
do { \
23
static const SG::AuxElement::Accessor< uint32_t > acc( #TYPE ); \
24
return &acc; \
25
} while( 0 )
26
28
#define DECLARE_FLOAT_ACCESSOR( TYPE ) \
29
case FileMetaData_v1::TYPE: \
30
do { \
31
static const SG::AuxElement::Accessor< float > acc( #TYPE ); \
32
return &acc; \
33
} while( 0 )
34
36
#define DECLARE_CHAR_ACCESSOR( TYPE ) \
37
case FileMetaData_v1::TYPE: \
38
do { \
39
const static SG::AuxElement::Accessor< char > acc( #TYPE ); \
40
return &acc; \
41
} while( 0 )
42
43
namespace
xAOD
{
44
45
const
SG::AuxElement::Accessor< std::string >*
46
metaDataTypeStringAccessorV1
(
FileMetaData_v1::MetaDataType
type
) {
47
48
switch
(
type
) {
49
50
DECLARE_STRING_ACCESSOR
( productionRelease );
51
DECLARE_STRING_ACCESSOR
( AODFixVersion );
52
DECLARE_STRING_ACCESSOR
( AODCalibVersion );
53
DECLARE_STRING_ACCESSOR
( dataType );
54
DECLARE_STRING_ACCESSOR
( amiTag );
55
DECLARE_STRING_ACCESSOR
( geometryVersion );
56
DECLARE_STRING_ACCESSOR
( conditionsTag );
57
DECLARE_STRING_ACCESSOR
( beamType );
58
DECLARE_STRING_ACCESSOR
( simFlavour );
59
DECLARE_STRING_ACCESSOR
( mcCampaign );
60
DECLARE_STRING_ACCESSOR
( generatorsInfo );
61
62
default
:
63
std::cerr <<
"xAOD::FileMetaData_v1 ERROR No string accessor for "
64
<<
"type: "
<<
type
<< std::endl;
65
return
nullptr
;
66
}
67
68
// Just to make sure the compiler doesn't complain:
69
return
nullptr
;
70
}
71
72
const
SG::AuxElement::Accessor< uint32_t >*
73
metaDataTypeUIntAccessorV1
(
FileMetaData_v1::MetaDataType
type
) {
74
75
switch
(
type
) {
76
77
DECLARE_UINT_ACCESSOR
( dataYear );
78
79
default
:
80
std::cerr <<
"xAOD::FileMetaData_v1 ERROR No uint32_t accessor for "
81
<<
"type: "
<<
type
<< std::endl;
82
return
nullptr
;
83
}
84
85
// Just to make sure the compiler doesn't complain:
86
return
nullptr
;
87
}
88
89
const
SG::AuxElement::Accessor< float >*
90
metaDataTypeFloatAccessorV1
(
FileMetaData_v1::MetaDataType
type
) {
91
92
switch
(
type
) {
93
94
DECLARE_FLOAT_ACCESSOR
( beamEnergy );
95
DECLARE_FLOAT_ACCESSOR
( mcProcID );
96
97
default
:
98
std::cerr <<
"xAOD::FileMetaData_v1 ERROR No float accessor for "
99
<<
"type: "
<<
type
<< std::endl;
100
return
nullptr
;
101
}
102
103
// Just to make sure the compiler doesn't complain:
104
return
nullptr
;
105
}
106
107
const
SG::AuxElement::Accessor< char >*
108
metaDataTypeCharAccessorV1
(
FileMetaData_v1::MetaDataType
type
) {
109
110
switch
(
type
) {
111
112
DECLARE_CHAR_ACCESSOR
( isDataOverlay );
113
114
default
:
115
std::cerr <<
"xAOD::FileMetaData_v1 ERROR No char accessor for "
116
<<
"type: "
<<
type
<< std::endl;
117
return
nullptr
;
118
}
119
120
// Just to make sure the compiler doesn't complain:
121
return
nullptr
;
122
}
123
124
}
// namespace xAOD
DECLARE_FLOAT_ACCESSOR
#define DECLARE_FLOAT_ACCESSOR(TYPE)
Helper macro for implementing the accessor function.
Definition
FileMetaDataAccessors_v1.cxx:28
DECLARE_CHAR_ACCESSOR
#define DECLARE_CHAR_ACCESSOR(TYPE)
Helper macro for implementing the accessor function.
Definition
FileMetaDataAccessors_v1.cxx:36
DECLARE_STRING_ACCESSOR
#define DECLARE_STRING_ACCESSOR(TYPE)
Helper macro for implementing the accessor function.
Definition
FileMetaDataAccessors_v1.cxx:12
DECLARE_UINT_ACCESSOR
#define DECLARE_UINT_ACCESSOR(TYPE)
Helper macro for implementing the accessor function.
Definition
FileMetaDataAccessors_v1.cxx:20
FileMetaDataAccessors_v1.h
xAOD::FileMetaData_v1::MetaDataType
MetaDataType
Pre-defined metadata value types.
Definition
FileMetaData_v1.h:54
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::metaDataTypeStringAccessorV1
const SG::AuxElement::Accessor< std::string > * metaDataTypeStringAccessorV1(FileMetaData_v1::MetaDataType type)
Helper function for getting an accessor for a pre-defined property.
Definition
FileMetaDataAccessors_v1.cxx:46
xAOD::metaDataTypeUIntAccessorV1
const SG::AuxElement::Accessor< uint32_t > * metaDataTypeUIntAccessorV1(FileMetaData_v1::MetaDataType type)
Helper function for getting an accessor for a pre-defined property.
Definition
FileMetaDataAccessors_v1.cxx:73
xAOD::metaDataTypeFloatAccessorV1
const SG::AuxElement::Accessor< float > * metaDataTypeFloatAccessorV1(FileMetaData_v1::MetaDataType type)
Helper function for getting an accessor for a pre-defined property.
Definition
FileMetaDataAccessors_v1.cxx:90
xAOD::metaDataTypeCharAccessorV1
const SG::AuxElement::Accessor< char > * metaDataTypeCharAccessorV1(FileMetaData_v1::MetaDataType type)
Helper function for getting an accessor for a pre-defined property.
Definition
FileMetaDataAccessors_v1.cxx:108
type
Generated on
for ATLAS Offline Software by
1.17.0