ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODEventInfo
Root
EventAuxInfo_v1.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_v1.h
"
7
#include "
xAODEventInfo/EventInfoLockHelper.h
"
8
9
namespace
xAOD
{
10
11
EventAuxInfo_v1::EventAuxInfo_v1
()
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
actualInteractionsPerCrossing
(0),
28
averageInteractionsPerCrossing
(0),
29
pixelFlags
(0),
30
sctFlags
(0),
31
trtFlags
(0),
32
larFlags
(0),
33
tileFlags
(0),
34
muonFlags
(0),
35
forwardDetFlags
(0),
36
coreFlags
(0),
37
backgroundFlags
(0),
38
lumiFlags
(0),
39
beamPosX
(0),
40
beamPosY
(0),
41
beamPosZ
(0),
42
beamPosSigmaX
(0),
43
beamPosSigmaY
(0),
44
beamPosSigmaZ
(0),
45
beamPosSigmaXY
(0),
46
beamTiltXZ
(0),
47
beamTiltYZ
(0),
48
beamStatus
(0),
49
m_decorFlags
(
SG
::auxid_set_size_hint)
50
{
51
52
// Basic event information:
53
AUX_VARIABLE
(
runNumber
);
54
AUX_VARIABLE
(
eventNumber
);
55
AUX_VARIABLE
(
lumiBlock
);
56
AUX_VARIABLE
(
timeStamp
);
57
AUX_VARIABLE
(
timeStampNSOffset
);
58
AUX_VARIABLE
(
bcid
);
59
AUX_VARIABLE
(
detectorMask0
);
60
AUX_VARIABLE
(
detectorMask1
);
61
AUX_VARIABLE
(
detectorMask2
);
62
AUX_VARIABLE
(
detectorMask3
);
63
64
// Event type information:
65
AUX_VARIABLE
(
detDescrTags
);
66
AUX_VARIABLE
(
eventTypeBitmask
);
67
68
// Trigger related information:
69
AUX_VARIABLE
(
statusElement
);
70
AUX_VARIABLE
(
extendedLevel1ID
);
71
AUX_VARIABLE
(
level1TriggerType
);
72
AUX_VARIABLE
(
streamTagNames
);
73
AUX_VARIABLE
(
streamTagTypes
);
74
AUX_VARIABLE
(
streamTagObeysLumiblock
);
75
76
// Pileup information:
77
AUX_VARIABLE
(
actualInteractionsPerCrossing
);
78
AUX_VARIABLE
(
averageInteractionsPerCrossing
);
79
80
// Beam spot information:
81
AUX_VARIABLE
(
beamPosX
);
82
AUX_VARIABLE
(
beamPosY
);
83
AUX_VARIABLE
(
beamPosZ
);
84
AUX_VARIABLE
(
beamPosSigmaX
);
85
AUX_VARIABLE
(
beamPosSigmaY
);
86
AUX_VARIABLE
(
beamPosSigmaZ
);
87
AUX_VARIABLE
(
beamPosSigmaXY
);
88
AUX_VARIABLE
(
beamTiltXZ
);
89
AUX_VARIABLE
(
beamTiltYZ
);
90
AUX_VARIABLE
(
beamStatus
);
91
92
// Detector flags:
93
#define DET_FLAG(VAR) \
94
AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
95
do { \
96
static const auxid_t auxid = \
97
getAuxID( #VAR, VAR, \
98
SG::AuxTypeRegistry::Flags::Atomic ); \
99
m_decorFlags.insert( auxid ); \
100
} while( false )
101
102
DET_FLAG
(
pixelFlags
);
103
DET_FLAG
(
sctFlags
);
104
DET_FLAG
(
trtFlags
);
105
DET_FLAG
(
larFlags
);
106
DET_FLAG
(
tileFlags
);
107
DET_FLAG
(
muonFlags
);
108
DET_FLAG
(
forwardDetFlags
);
109
DET_FLAG
(
coreFlags
);
110
DET_FLAG
(
backgroundFlags
);
111
DET_FLAG
(
lumiFlags
);
112
#undef DET_FLAG
113
}
114
115
124
void
*
EventAuxInfo_v1::getDecoration
(
SG::auxid_t
auxid,
125
size_t
size
,
126
size_t
capacity)
127
{
128
if
(
m_decorFlags
.test (auxid)) {
129
return
AuxInfoBase::getData
(auxid,
size
, capacity);
130
}
131
132
return
AuxInfoBase::getDecoration
(auxid,
size
, capacity);
133
}
134
135
140
bool
EventAuxInfo_v1::isDecoration
(
SG::auxid_t
auxid)
const
141
{
142
if
(
m_decorFlags
.test (auxid)) {
143
return
true
;
144
}
145
146
return
AuxInfoBase::isDecoration
(auxid);
147
}
148
149
154
void
EventAuxInfo_v1::lockDecoration
(
SG::auxid_t
auxid)
155
{
156
if
(
m_decorFlags
.test (auxid)) {
157
m_decorFlags
.reset (auxid);
158
return
;
159
}
160
161
AuxInfoBase::lockDecoration
(auxid);
162
}
163
164
172
void
EventAuxInfo_v1::toTransient
(
const
EventContext& ctx )
173
{
174
AuxInfoBase::toTransient
( ctx );
175
toTransient
( );
176
}
177
178
void
EventAuxInfo_v1::toTransient
( )
179
{
180
EventInfoLockHelper
helper;
181
if
(helper.evalUnlockFunc(
runNumber
,
lumiBlock
,
eventNumber
))
return
;
183
static
const
std::vector<SG::auxid_t> flagIds (
m_decorFlags
.begin(),
184
m_decorFlags
.end());
185
186
// Check each detector flag. If it has been set to something,
187
// then lock this flag.
188
// This check may be too strict; we'll have to see.
189
for
(
SG::auxid_t
id
: flagIds) {
190
if
(*
reinterpret_cast<
const
uint32_t
*
>
(
getData
(
id
)) != 0) {
191
m_decorFlags
.reset (
id
);
192
}
193
}
194
}
195
196
197
}
// 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_v1.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_v1::detectorMask0
uint32_t detectorMask0
Definition
EventAuxInfo_v1.h:84
xAOD::EventAuxInfo_v1::trtFlags
uint32_t trtFlags
Definition
EventAuxInfo_v1.h:116
xAOD::EventAuxInfo_v1::beamTiltXZ
float beamTiltXZ
Definition
EventAuxInfo_v1.h:135
xAOD::EventAuxInfo_v1::beamPosY
float beamPosY
Definition
EventAuxInfo_v1.h:129
xAOD::EventAuxInfo_v1::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition
EventAuxInfo_v1.cxx:154
xAOD::EventAuxInfo_v1::pixelFlags
uint32_t pixelFlags
Definition
EventAuxInfo_v1.h:114
xAOD::EventAuxInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing
Definition
EventAuxInfo_v1.h:108
xAOD::EventAuxInfo_v1::detDescrTags
std::vector< std::pair< std::string, std::string > > detDescrTags
Definition
EventAuxInfo_v1.h:92
xAOD::EventAuxInfo_v1::beamPosZ
float beamPosZ
Definition
EventAuxInfo_v1.h:130
xAOD::EventAuxInfo_v1::streamTagNames
std::vector< std::string > streamTagNames
Definition
EventAuxInfo_v1.h:101
xAOD::EventAuxInfo_v1::EventAuxInfo_v1
EventAuxInfo_v1()
Default constructor.
Definition
EventAuxInfo_v1.cxx:11
xAOD::EventAuxInfo_v1::larFlags
uint32_t larFlags
Definition
EventAuxInfo_v1.h:117
xAOD::EventAuxInfo_v1::lumiFlags
uint32_t lumiFlags
Definition
EventAuxInfo_v1.h:123
xAOD::EventAuxInfo_v1::coreFlags
uint32_t coreFlags
Definition
EventAuxInfo_v1.h:121
xAOD::EventAuxInfo_v1::streamTagObeysLumiblock
std::vector< char > streamTagObeysLumiblock
Definition
EventAuxInfo_v1.h:103
xAOD::EventAuxInfo_v1::detectorMask3
uint32_t detectorMask3
Definition
EventAuxInfo_v1.h:87
xAOD::EventAuxInfo_v1::extendedLevel1ID
uint32_t extendedLevel1ID
Definition
EventAuxInfo_v1.h:99
xAOD::EventAuxInfo_v1::statusElement
uint32_t statusElement
Definition
EventAuxInfo_v1.h:98
xAOD::EventAuxInfo_v1::sctFlags
uint32_t sctFlags
Definition
EventAuxInfo_v1.h:115
xAOD::EventAuxInfo_v1::beamPosSigmaXY
float beamPosSigmaXY
Definition
EventAuxInfo_v1.h:134
xAOD::EventAuxInfo_v1::lumiBlock
uint32_t lumiBlock
Definition
EventAuxInfo_v1.h:80
xAOD::EventAuxInfo_v1::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_v1.cxx:124
xAOD::EventAuxInfo_v1::beamStatus
uint32_t beamStatus
Definition
EventAuxInfo_v1.h:137
xAOD::EventAuxInfo_v1::backgroundFlags
uint32_t backgroundFlags
Definition
EventAuxInfo_v1.h:122
xAOD::EventAuxInfo_v1::eventNumber
uint64_t eventNumber
Definition
EventAuxInfo_v1.h:79
xAOD::EventAuxInfo_v1::muonFlags
uint32_t muonFlags
Definition
EventAuxInfo_v1.h:119
xAOD::EventAuxInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing
Definition
EventAuxInfo_v1.h:109
xAOD::EventAuxInfo_v1::level1TriggerType
uint16_t level1TriggerType
Definition
EventAuxInfo_v1.h:100
xAOD::EventAuxInfo_v1::forwardDetFlags
uint32_t forwardDetFlags
Definition
EventAuxInfo_v1.h:120
xAOD::EventAuxInfo_v1::beamPosSigmaZ
float beamPosSigmaZ
Definition
EventAuxInfo_v1.h:133
xAOD::EventAuxInfo_v1::timeStampNSOffset
uint32_t timeStampNSOffset
Definition
EventAuxInfo_v1.h:82
xAOD::EventAuxInfo_v1::toTransient
void toTransient()
Definition
EventAuxInfo_v1.cxx:178
xAOD::EventAuxInfo_v1::streamTagTypes
std::vector< std::string > streamTagTypes
Definition
EventAuxInfo_v1.h:102
xAOD::EventAuxInfo_v1::detectorMask1
uint32_t detectorMask1
Definition
EventAuxInfo_v1.h:85
xAOD::EventAuxInfo_v1::runNumber
uint32_t runNumber
Definition
EventAuxInfo_v1.h:78
xAOD::EventAuxInfo_v1::tileFlags
uint32_t tileFlags
Definition
EventAuxInfo_v1.h:118
xAOD::EventAuxInfo_v1::m_decorFlags
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
Definition
EventAuxInfo_v1.h:145
xAOD::EventAuxInfo_v1::timeStamp
uint32_t timeStamp
Definition
EventAuxInfo_v1.h:81
xAOD::EventAuxInfo_v1::bcid
uint32_t bcid
Definition
EventAuxInfo_v1.h:83
xAOD::EventAuxInfo_v1::beamTiltYZ
float beamTiltYZ
Definition
EventAuxInfo_v1.h:136
xAOD::EventAuxInfo_v1::eventTypeBitmask
uint32_t eventTypeBitmask
Definition
EventAuxInfo_v1.h:93
xAOD::EventAuxInfo_v1::beamPosSigmaX
float beamPosSigmaX
Definition
EventAuxInfo_v1.h:131
xAOD::EventAuxInfo_v1::detectorMask2
uint32_t detectorMask2
Definition
EventAuxInfo_v1.h:86
xAOD::EventAuxInfo_v1::beamPosSigmaY
float beamPosSigmaY
Definition
EventAuxInfo_v1.h:132
xAOD::EventAuxInfo_v1::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
Definition
EventAuxInfo_v1.cxx:140
xAOD::EventAuxInfo_v1::beamPosX
float beamPosX
Definition
EventAuxInfo_v1.h:128
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