ATLAS Offline Software
Loading...
Searching...
No Matches
EventAuxInfo_v2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Local include(s):
7
8namespace xAOD {
9
11 : AuxInfoBase(),
12 runNumber(0),
13 eventNumber(0),
14 lumiBlock(0),
15 timeStamp(0),
17 bcid(0),
26 pixelFlags(0),
27 sctFlags(0),
28 trtFlags(0),
29 larFlags(0),
30 tileFlags(0),
31 muonFlags(0),
33 coreFlags(0),
35 lumiFlags(0),
36 beamPosX(0),
37 beamPosY(0),
38 beamPosZ(0),
43 beamTiltXZ(0),
44 beamTiltYZ(0),
45 beamStatus(0),
46 m_decorFlags (SG::auxid_set_size_hint)
47 {
48
49 // Basic event information:
60
61 // Event type information:
64
65 // Trigger related information:
72
73 // Beam spot information:
84
85 // Detector flags:
86#define DET_FLAG(VAR) \
87 AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
88 do { \
89 static const auxid_t auxid = \
90 getAuxID( #VAR, VAR, \
91 SG::AuxTypeRegistry::Flags::Atomic ); \
92 m_decorFlags.insert( auxid ); \
93 } while( false )
94
105#undef DET_FLAG
106 }
107
108
118 size_t size,
119 size_t capacity)
120 {
121 if (m_decorFlags.test (auxid)) {
122 return AuxInfoBase::getData (auxid, size, capacity);
123 }
124
125 return AuxInfoBase::getDecoration (auxid, size, capacity);
126 }
127
128
134 {
135 if (m_decorFlags.test (auxid)) {
136 return true;
137 }
138
139 return AuxInfoBase::isDecoration (auxid);
140 }
141
142
148 {
149 if (m_decorFlags.test (auxid)) {
150 m_decorFlags.reset (auxid);
151 return;
152 }
153
155 }
156
157
164 {
166 static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
167 m_decorFlags.end());
168
169 // Check each detector flag. If it has been set to something,
170 // then lock this flag.
171 // This check may be too strict; we'll have to see.
172 for (SG::auxid_t id : flagIds) {
173 if (*reinterpret_cast<const uint32_t*>(getData (id)) != 0) {
174 m_decorFlags.reset (id);
175 }
176 }
177 }
178
179
180} // namespace xAOD
#define AUX_VARIABLE(VAR,...)
Convenience macro for declaring an auxiliary variable.
Definition AuxVariable.h:23
#define DET_FLAG(VAR)
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual size_t size() const override
Get the size of the container.
AuxInfoBase(bool allowDynamicVars=true)
Default constructor.
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
std::vector< std::string > streamTagTypes
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
std::vector< char > streamTagObeysLumiblock
void toTransient()
Called after one of these objects is read.
EventAuxInfo_v2()
Default constructor.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual void * getDecoration(SG::auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
std::vector< std::pair< std::string, std::string > > detDescrTags
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
std::vector< std::string > streamTagNames
Forward declaration.
size_t auxid_t
Identifier for a particular aux data item.
Definition AuxTypes.h:27
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setEventNumber uint32_t