ATLAS Offline Software
Loading...
Searching...
No Matches
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):
8
9namespace xAOD {
10
12 : AuxInfoBase(),
13 runNumber(0),
14 eventNumber(0),
15 lumiBlock(0),
16 timeStamp(0),
18 bcid(0),
29 pixelFlags(0),
30 sctFlags(0),
31 trtFlags(0),
32 larFlags(0),
33 tileFlags(0),
34 muonFlags(0),
36 coreFlags(0),
38 lumiFlags(0),
39 beamPosX(0),
40 beamPosY(0),
41 beamPosZ(0),
46 beamTiltXZ(0),
47 beamTiltYZ(0),
48 beamStatus(0),
49 m_decorFlags (SG::auxid_set_size_hint)
50 {
51
52 // Basic event information:
63
64 // Event type information:
67
68 // Trigger related information:
75
76 // Pileup information:
79
80 // Beam spot information:
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
112#undef DET_FLAG
113 }
114
115
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
141 {
142 if (m_decorFlags.test (auxid)) {
143 return true;
144 }
145
146 return AuxInfoBase::isDecoration (auxid);
147 }
148
149
155 {
156 if (m_decorFlags.test (auxid)) {
157 m_decorFlags.reset (auxid);
158 return;
159 }
160
162 }
163
164
172 void EventAuxInfo_v1::toTransient( const EventContext& ctx )
173 {
175 toTransient( );
176 }
177
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
#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 toTransient(const EventContext &ctx) override
Perform processing on aux variable objects just after reading to make them usable as transient object...
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.
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