ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODEventInfo
Root
EventAuxInfo_v2.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Local include(s):
6
#include "
xAODEventInfo/versions/EventAuxInfo_v2.h
"
7
#include "
xAODEventInfo/EventInfoLockHelper.h
"
8
9
namespace
xAOD
{
10
11
EventAuxInfo_v2::EventAuxInfo_v2
()
12
:
AuxInfoBase
(),
13
runNumber
(0),
14
eventNumber
(0),
15
lumiBlock
(0),
16
timeStamp
(0),
17
timeStampNSOffset
(0),
18
bcid
(0),
19
detectorMask0
(0),
20
detectorMask1
(0),
21
detectorMask2
(0),
22
detectorMask3
(0),
23
eventTypeBitmask
(0),
24
statusElement
(0),
25
extendedLevel1ID
(0),
26
level1TriggerType
(0),
27
pixelFlags
(0),
28
sctFlags
(0),
29
trtFlags
(0),
30
larFlags
(0),
31
tileFlags
(0),
32
muonFlags
(0),
33
forwardDetFlags
(0),
34
coreFlags
(0),
35
backgroundFlags
(0),
36
lumiFlags
(0),
37
beamPosX
(0),
38
beamPosY
(0),
39
beamPosZ
(0),
40
beamPosSigmaX
(0),
41
beamPosSigmaY
(0),
42
beamPosSigmaZ
(0),
43
beamPosSigmaXY
(0),
44
beamTiltXZ
(0),
45
beamTiltYZ
(0),
46
beamStatus
(0),
47
m_decorFlags
(
SG
::auxid_set_size_hint)
48
{
49
50
// Basic event information:
51
AUX_VARIABLE
(
runNumber
);
52
AUX_VARIABLE
(
eventNumber
);
53
AUX_VARIABLE
(
lumiBlock
);
54
AUX_VARIABLE
(
timeStamp
);
55
AUX_VARIABLE
(
timeStampNSOffset
);
56
AUX_VARIABLE
(
bcid
);
57
AUX_VARIABLE
(
detectorMask0
);
58
AUX_VARIABLE
(
detectorMask1
);
59
AUX_VARIABLE
(
detectorMask2
);
60
AUX_VARIABLE
(
detectorMask3
);
61
62
// Event type information:
63
AUX_VARIABLE
(
detDescrTags
);
64
AUX_VARIABLE
(
eventTypeBitmask
);
65
66
// Trigger related information:
67
AUX_VARIABLE
(
statusElement
);
68
AUX_VARIABLE
(
extendedLevel1ID
);
69
AUX_VARIABLE
(
level1TriggerType
);
70
AUX_VARIABLE
(
streamTagNames
);
71
AUX_VARIABLE
(
streamTagTypes
);
72
AUX_VARIABLE
(
streamTagObeysLumiblock
);
73
74
// Beam spot information:
75
AUX_VARIABLE
(
beamPosX
);
76
AUX_VARIABLE
(
beamPosY
);
77
AUX_VARIABLE
(
beamPosZ
);
78
AUX_VARIABLE
(
beamPosSigmaX
);
79
AUX_VARIABLE
(
beamPosSigmaY
);
80
AUX_VARIABLE
(
beamPosSigmaZ
);
81
AUX_VARIABLE
(
beamPosSigmaXY
);
82
AUX_VARIABLE
(
beamTiltXZ
);
83
AUX_VARIABLE
(
beamTiltYZ
);
84
AUX_VARIABLE
(
beamStatus
);
85
86
// Detector flags:
87
#define DET_FLAG(VAR) \
88
AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
89
do { \
90
static const auxid_t auxid = \
91
getAuxID( #VAR, VAR, \
92
SG::AuxTypeRegistry::Flags::Atomic ); \
93
m_decorFlags.insert( auxid ); \
94
} while( false )
95
96
DET_FLAG
(
pixelFlags
);
97
DET_FLAG
(
sctFlags
);
98
DET_FLAG
(
trtFlags
);
99
DET_FLAG
(
larFlags
);
100
DET_FLAG
(
tileFlags
);
101
DET_FLAG
(
muonFlags
);
102
DET_FLAG
(
forwardDetFlags
);
103
DET_FLAG
(
coreFlags
);
104
DET_FLAG
(
backgroundFlags
);
105
DET_FLAG
(
lumiFlags
);
106
#undef DET_FLAG
107
}
108
109
118
void
*
EventAuxInfo_v2::getDecoration
(
SG::auxid_t
auxid,
119
size_t
size
,
120
size_t
capacity)
121
{
122
if
(
m_decorFlags
.test (auxid)) {
123
return
AuxInfoBase::getData
(auxid,
size
, capacity);
124
}
125
126
return
AuxInfoBase::getDecoration
(auxid,
size
, capacity);
127
}
128
129
134
bool
EventAuxInfo_v2::isDecoration
(
SG::auxid_t
auxid)
const
135
{
136
if
(
m_decorFlags
.test (auxid)) {
137
return
true
;
138
}
139
140
return
AuxInfoBase::isDecoration
(auxid);
141
}
142
143
148
void
EventAuxInfo_v2::lockDecoration
(
SG::auxid_t
auxid)
149
{
150
if
(
m_decorFlags
.test (auxid)) {
151
m_decorFlags
.reset (auxid);
152
return
;
153
}
154
155
AuxInfoBase::lockDecoration
(auxid);
156
}
157
158
166
void
EventAuxInfo_v2::toTransient
(
const
EventContext& ctx )
167
{
168
AuxInfoBase::toTransient
( ctx );
169
toTransient
( );
170
}
171
172
void
EventAuxInfo_v2::toTransient
( )
173
{
174
EventInfoLockHelper
helper;
175
if
(helper.evalUnlockFunc(
runNumber
,
lumiBlock
,
eventNumber
))
return
;
177
static
const
std::vector<SG::auxid_t> flagIds (
m_decorFlags
.begin(),
178
m_decorFlags
.end());
179
180
// Check each detector flag. If it has been set to something,
181
// then lock this flag.
182
// This check may be too strict; we'll have to see.
183
for
(
SG::auxid_t
id
: flagIds) {
184
if
(*
reinterpret_cast<
const
uint32_t
*
>
(
getData
(
id
)) != 0) {
185
m_decorFlags
.reset (
id
);
186
}
187
}
188
}
189
190
191
}
// namespace xAOD
AUX_VARIABLE
#define AUX_VARIABLE(VAR,...)
Convenience macro for declaring an auxiliary variable.
Definition
AuxVariable.h:23
DET_FLAG
#define DET_FLAG(VAR)
EventAuxInfo_v2.h
EventInfoLockHelper.h
EventInfoLockHelper
Definition
EventInfoLockHelper.h:19
xAOD::AuxInfoBase::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition
AuxInfoBase.cxx:357
xAOD::AuxInfoBase::size
virtual size_t size() const override
Get the size of the container.
Definition
AuxInfoBase.cxx:417
xAOD::AuxInfoBase::AuxInfoBase
AuxInfoBase(bool allowDynamicVars=true)
Default constructor.
Definition
AuxInfoBase.cxx:26
xAOD::AuxInfoBase::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
Definition
AuxInfoBase.cxx:245
xAOD::AuxInfoBase::getData
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
Definition
AuxInfoBase.cxx:196
xAOD::AuxInfoBase::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
Definition
AuxInfoBase.cxx:271
xAOD::AuxInfoBase::toTransient
virtual void toTransient(const EventContext &ctx) override
Perform processing on aux variable objects just after reading to make them usable as transient object...
Definition
AuxInfoBase.cxx:399
xAOD::EventAuxInfo_v2::streamTagTypes
std::vector< std::string > streamTagTypes
Definition
EventAuxInfo_v2.h:99
xAOD::EventAuxInfo_v2::lumiBlock
uint32_t lumiBlock
Definition
EventAuxInfo_v2.h:77
xAOD::EventAuxInfo_v2::muonFlags
uint32_t muonFlags
Definition
EventAuxInfo_v2.h:110
xAOD::EventAuxInfo_v2::pixelFlags
uint32_t pixelFlags
Definition
EventAuxInfo_v2.h:105
xAOD::EventAuxInfo_v2::detectorMask1
uint32_t detectorMask1
Definition
EventAuxInfo_v2.h:82
xAOD::EventAuxInfo_v2::lumiFlags
uint32_t lumiFlags
Definition
EventAuxInfo_v2.h:114
xAOD::EventAuxInfo_v2::eventNumber
uint64_t eventNumber
Definition
EventAuxInfo_v2.h:76
xAOD::EventAuxInfo_v2::statusElement
uint32_t statusElement
Definition
EventAuxInfo_v2.h:95
xAOD::EventAuxInfo_v2::beamPosX
float beamPosX
Definition
EventAuxInfo_v2.h:119
xAOD::EventAuxInfo_v2::timeStamp
uint32_t timeStamp
Definition
EventAuxInfo_v2.h:78
xAOD::EventAuxInfo_v2::runNumber
uint32_t runNumber
Definition
EventAuxInfo_v2.h:75
xAOD::EventAuxInfo_v2::detectorMask0
uint32_t detectorMask0
Definition
EventAuxInfo_v2.h:81
xAOD::EventAuxInfo_v2::detectorMask2
uint32_t detectorMask2
Definition
EventAuxInfo_v2.h:83
xAOD::EventAuxInfo_v2::backgroundFlags
uint32_t backgroundFlags
Definition
EventAuxInfo_v2.h:113
xAOD::EventAuxInfo_v2::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
Definition
EventAuxInfo_v2.cxx:134
xAOD::EventAuxInfo_v2::level1TriggerType
uint16_t level1TriggerType
Definition
EventAuxInfo_v2.h:97
xAOD::EventAuxInfo_v2::beamPosSigmaXY
float beamPosSigmaXY
Definition
EventAuxInfo_v2.h:125
xAOD::EventAuxInfo_v2::beamPosY
float beamPosY
Definition
EventAuxInfo_v2.h:120
xAOD::EventAuxInfo_v2::beamPosSigmaX
float beamPosSigmaX
Definition
EventAuxInfo_v2.h:122
xAOD::EventAuxInfo_v2::streamTagObeysLumiblock
std::vector< char > streamTagObeysLumiblock
Definition
EventAuxInfo_v2.h:100
xAOD::EventAuxInfo_v2::toTransient
void toTransient()
Definition
EventAuxInfo_v2.cxx:172
xAOD::EventAuxInfo_v2::forwardDetFlags
uint32_t forwardDetFlags
Definition
EventAuxInfo_v2.h:111
xAOD::EventAuxInfo_v2::EventAuxInfo_v2
EventAuxInfo_v2()
Default constructor.
Definition
EventAuxInfo_v2.cxx:11
xAOD::EventAuxInfo_v2::coreFlags
uint32_t coreFlags
Definition
EventAuxInfo_v2.h:112
xAOD::EventAuxInfo_v2::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition
EventAuxInfo_v2.cxx:148
xAOD::EventAuxInfo_v2::getDecoration
virtual void * getDecoration(SG::auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
Definition
EventAuxInfo_v2.cxx:118
xAOD::EventAuxInfo_v2::tileFlags
uint32_t tileFlags
Definition
EventAuxInfo_v2.h:109
xAOD::EventAuxInfo_v2::beamTiltXZ
float beamTiltXZ
Definition
EventAuxInfo_v2.h:126
xAOD::EventAuxInfo_v2::detDescrTags
std::vector< std::pair< std::string, std::string > > detDescrTags
Definition
EventAuxInfo_v2.h:89
xAOD::EventAuxInfo_v2::beamPosSigmaZ
float beamPosSigmaZ
Definition
EventAuxInfo_v2.h:124
xAOD::EventAuxInfo_v2::sctFlags
uint32_t sctFlags
Definition
EventAuxInfo_v2.h:106
xAOD::EventAuxInfo_v2::larFlags
uint32_t larFlags
Definition
EventAuxInfo_v2.h:108
xAOD::EventAuxInfo_v2::beamPosSigmaY
float beamPosSigmaY
Definition
EventAuxInfo_v2.h:123
xAOD::EventAuxInfo_v2::m_decorFlags
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
Definition
EventAuxInfo_v2.h:136
xAOD::EventAuxInfo_v2::beamPosZ
float beamPosZ
Definition
EventAuxInfo_v2.h:121
xAOD::EventAuxInfo_v2::extendedLevel1ID
uint32_t extendedLevel1ID
Definition
EventAuxInfo_v2.h:96
xAOD::EventAuxInfo_v2::trtFlags
uint32_t trtFlags
Definition
EventAuxInfo_v2.h:107
xAOD::EventAuxInfo_v2::beamStatus
uint32_t beamStatus
Definition
EventAuxInfo_v2.h:128
xAOD::EventAuxInfo_v2::streamTagNames
std::vector< std::string > streamTagNames
Definition
EventAuxInfo_v2.h:98
xAOD::EventAuxInfo_v2::beamTiltYZ
float beamTiltYZ
Definition
EventAuxInfo_v2.h:127
xAOD::EventAuxInfo_v2::bcid
uint32_t bcid
Definition
EventAuxInfo_v2.h:80
xAOD::EventAuxInfo_v2::eventTypeBitmask
uint32_t eventTypeBitmask
Definition
EventAuxInfo_v2.h:90
xAOD::EventAuxInfo_v2::timeStampNSOffset
uint32_t timeStampNSOffset
Definition
EventAuxInfo_v2.h:79
xAOD::EventAuxInfo_v2::detectorMask3
uint32_t detectorMask3
Definition
EventAuxInfo_v2.h:84
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition
AuxTypes.h:27
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition
ICaloAffectedTool.h:24
xAOD::uint32_t
setEventNumber uint32_t
Definition
EventInfo_v1.cxx:127
Generated on
for ATLAS Offline Software by
1.17.0