ATLAS Offline Software
Loading...
Searching...
No Matches
EventAuxInfo_v3.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):
7#include "AthContainers/AuxStoreInternal.h" // for SG::getAuxIDs
8
10
11namespace xAOD {
12
14 : AuxInfoBase(),
15 runNumber(0),
16 eventNumber(0),
17 lumiBlock(0),
18 timeStamp(0),
20 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 m_decorFlags (SG::auxid_set_size_hint)
40 {
41
42 // Basic event information:
53
54 // Event type information:
57
58 // Trigger related information:
65
66 // Detector flags:
67#define DET_FLAG(VAR) \
68 AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
69 do { \
70 static const auxid_t auxid = \
71 getAuxID( #VAR, VAR, \
72 SG::AuxTypeRegistry::Flags::Atomic ); \
73 m_decorFlags.insert( auxid ); \
74 } while( false )
75
86#undef DET_FLAG
87 }
88
89
99 size_t size,
100 size_t capacity)
101 {
102 if (m_decorFlags.test (auxid)) {
103 return AuxInfoBase::getData (auxid, size, capacity);
104 }
105
106 return AuxInfoBase::getDecoration (auxid, size, capacity);
107 }
108
109
118 EventAuxInfo_v3::getCopyIDs (bool warnUnlocked) const
119 {
120 static const std::string ignored[1] = { "mcEventWeights" };
121 return SG::getCopyIDs (getAuxIDs(), getDecorIDs(), warnUnlocked, ignored);
122 }
123
124
130 {
131 if (m_decorFlags.test (auxid)) {
132 return true;
133 }
134
135 return AuxInfoBase::isDecoration (auxid);
136 }
137
138
144 {
145 if (m_decorFlags.test (auxid)) {
146 m_decorFlags.reset (auxid);
147 return;
148 }
149
151 }
152
153
161 void EventAuxInfo_v3::toTransient( const EventContext& ctx )
162 {
164 toTransient( );
165 }
166
168 {
169 EventInfoLockHelper helper;
170 if (helper.evalUnlockFunc(runNumber,lumiBlock,eventNumber)) return;
171
173 static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
174 m_decorFlags.end());
175
176 // Check each detector flag. If it has been set to something,
177 // then lock this flag.
178 // This check may be too strict; we'll have to see.
179 for (SG::auxid_t id : flagIds) {
180 if (*reinterpret_cast<const uint32_t*>(getData (id)) != 0) {
181 m_decorFlags.reset (id);
182 }
183 }
184 }
185
186
187} // namespace xAOD
An auxiliary data store that holds data internally.
#define AUX_VARIABLE(VAR,...)
Convenience macro for declaring an auxiliary variable.
Definition AuxVariable.h:23
#define DET_FLAG(VAR)
A set of aux data identifiers.
Definition AuxTypes.h:47
virtual const auxid_set_t & getDecorIDs() const override
Get the types(names) of decorations handled by this container.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual size_t size() const override
Get the size of the container.
virtual const auxid_set_t & getAuxIDs() const override
Get the types(names) of variables handled by this 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 * 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
std::vector< std::string > streamTagNames
std::vector< char > streamTagObeysLumiblock
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
std::vector< std::string > streamTagTypes
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
EventAuxInfo_v3()
Default constructor.
virtual SG::auxid_set_t getCopyIDs(bool warnUnlocked=false) const override
Return the set of variables to copy in a deep copy.
Forward declaration.
virtual SG::auxid_set_t getCopyIDs(bool warnUnlocked=false) const override
Return the set of variables to copy in a deep copy.
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