ATLAS Offline Software
Loading...
Searching...
No Matches
EventAuxInfo_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 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),
28 pixelFlags(0),
29 sctFlags(0),
30 trtFlags(0),
31 larFlags(0),
32 tileFlags(0),
33 muonFlags(0),
35 coreFlags(0),
37 lumiFlags(0),
38 beamPosX(0),
39 beamPosY(0),
40 beamPosZ(0),
45 beamTiltXZ(0),
46 beamTiltYZ(0),
47 beamStatus(0),
48 m_decorFlags (SG::auxid_set_size_hint)
49 {
50
51 // Basic event information:
62
63 // Event type information:
66
67 // Trigger related information:
74
75 // Pileup information:
78
79 // Beam spot information:
90
91 // Detector flags:
92#define DET_FLAG(VAR) \
93 AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
94 do { \
95 static const auxid_t auxid = \
96 getAuxID( #VAR, VAR, \
97 SG::AuxTypeRegistry::Flags::Atomic ); \
98 m_decorFlags.insert( auxid ); \
99 } while( false )
100
111#undef DET_FLAG
112 }
113
114
124 size_t size,
125 size_t capacity)
126 {
127 if (m_decorFlags.test (auxid)) {
128 return AuxInfoBase::getData (auxid, size, capacity);
129 }
130
131 return AuxInfoBase::getDecoration (auxid, size, capacity);
132 }
133
134
140 {
141 if (m_decorFlags.test (auxid)) {
142 return true;
143 }
144
145 return AuxInfoBase::isDecoration (auxid);
146 }
147
148
154 {
155 if (m_decorFlags.test (auxid)) {
156 m_decorFlags.reset (auxid);
157 return;
158 }
159
161 }
162
163
170 {
172 static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
173 m_decorFlags.end());
174
175 // Check each detector flag. If it has been set to something,
176 // then lock this flag.
177 // This check may be too strict; we'll have to see.
178 for (SG::auxid_t id : flagIds) {
179 if (*reinterpret_cast<const uint32_t*>(getData (id)) != 0) {
180 m_decorFlags.reset (id);
181 }
182 }
183 }
184
185
186} // 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.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
std::vector< std::pair< std::string, std::string > > detDescrTags
std::vector< std::string > streamTagNames
EventAuxInfo_v1()
Default constructor.
std::vector< char > streamTagObeysLumiblock
virtual void * getDecoration(SG::auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
void toTransient()
Called after one of these objects is read.
std::vector< std::string > streamTagTypes
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
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