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
9namespace xAOD {
10
12 : AuxInfoBase(),
13 runNumber(0),
14 eventNumber(0),
15 lumiBlock(0),
16 timeStamp(0),
18 bcid(0),
27 pixelFlags(0),
28 sctFlags(0),
29 trtFlags(0),
30 larFlags(0),
31 tileFlags(0),
32 muonFlags(0),
34 coreFlags(0),
36 lumiFlags(0),
37 m_decorFlags (SG::auxid_set_size_hint)
38 {
39
40 // Basic event information:
51
52 // Event type information:
55
56 // Trigger related information:
63
64 // Detector flags:
65#define DET_FLAG(VAR) \
66 AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
67 do { \
68 static const auxid_t auxid = \
69 getAuxID( #VAR, VAR, \
70 SG::AuxTypeRegistry::Flags::Atomic ); \
71 m_decorFlags.insert( auxid ); \
72 } while( false )
73
84#undef DET_FLAG
85 }
86
87
97 size_t size,
98 size_t capacity)
99 {
100 if (m_decorFlags.test (auxid)) {
101 return AuxInfoBase::getData (auxid, size, capacity);
102 }
103
104 return AuxInfoBase::getDecoration (auxid, size, capacity);
105 }
106
107
116 EventAuxInfo_v3::getCopyIDs (bool warnUnlocked) const
117 {
118 static const std::string ignored[1] = { "mcEventWeights" };
119 return SG::getCopyIDs (getAuxIDs(), getDecorIDs(), warnUnlocked, ignored);
120 }
121
122
128 {
129 if (m_decorFlags.test (auxid)) {
130 return true;
131 }
132
133 return AuxInfoBase::isDecoration (auxid);
134 }
135
136
142 {
143 if (m_decorFlags.test (auxid)) {
144 m_decorFlags.reset (auxid);
145 return;
146 }
147
149 }
150
151
159 void EventAuxInfo_v3::toTransient( const EventContext& ctx )
160 {
162 toTransient( );
163 }
164
166 {
168 static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
169 m_decorFlags.end());
170
171 // Check each detector flag. If it has been set to something,
172 // then lock this flag.
173 // This check may be too strict; we'll have to see.
174 for (SG::auxid_t id : flagIds) {
175 if (*reinterpret_cast<const uint32_t*>(getData (id)) != 0) {
176 m_decorFlags.reset (id);
177 }
178 }
179 }
180
181
182} // 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