ATLAS Offline Software
Loading...
Searching...
No Matches
EventAuxInfo_v3.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 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 m_decorFlags (SG::auxid_set_size_hint)
37 {
38
39 // Basic event information:
50
51 // Event type information:
54
55 // Trigger related information:
62
63 // Detector flags:
64#define DET_FLAG(VAR) \
65 AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
66 do { \
67 static const auxid_t auxid = \
68 getAuxID( #VAR, VAR, \
69 SG::AuxTypeRegistry::Flags::Atomic ); \
70 m_decorFlags.insert( auxid ); \
71 } while( false )
72
83#undef DET_FLAG
84 }
85
86
96 size_t size,
97 size_t capacity)
98 {
99 if (m_decorFlags.test (auxid)) {
100 return AuxInfoBase::getData (auxid, size, capacity);
101 }
102
103 return AuxInfoBase::getDecoration (auxid, size, capacity);
104 }
105
106
112 {
113 if (m_decorFlags.test (auxid)) {
114 return true;
115 }
116
117 return AuxInfoBase::isDecoration (auxid);
118 }
119
120
126 {
127 if (m_decorFlags.test (auxid)) {
128 m_decorFlags.reset (auxid);
129 return;
130 }
131
133 }
134
135
142 {
144 static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
145 m_decorFlags.end());
146
147 // Check each detector flag. If it has been set to something,
148 // then lock this flag.
149 // This check may be too strict; we'll have to see.
150 for (SG::auxid_t id : flagIds) {
151 if (*reinterpret_cast<const uint32_t*>(getData (id)) != 0) {
152 m_decorFlags.reset (id);
153 }
154 }
155 }
156
157
158} // 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 * 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
void toTransient()
Called after one of these objects is read.
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.
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