ATLAS Offline Software
Loading...
Searching...
No Matches
EventInfoAuxContainer_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
12 m_decorFlags (SG::auxid_set_size_hint)
13 {
14
15 // Basic event information:
26
27 // Event type information:
30
31 // Detector flags:
32#define DET_FLAG(VAR) \
33 AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
34 do { \
35 static const auxid_t auxid = \
36 getAuxID( #VAR, VAR, \
37 SG::AuxTypeRegistry::Flags::Atomic ); \
38 m_decorFlags.insert( auxid ); \
39 } while( false )
40
51#undef DET_FLAG
52
53 // MC information:
57
58 // Pileup information:
61 }
62
72 size_t size,
73 size_t capacity)
74 {
75 if (m_decorFlags.test (auxid)) {
76 return AuxContainerBase::getData (auxid, size, capacity);
77 }
78
79 return AuxContainerBase::getDecoration (auxid, size, capacity);
80 }
81
82
88 {
89 if (m_decorFlags.test (auxid)) {
90 return true;
91 }
92
93 return AuxContainerBase::isDecoration (auxid);
94 }
95
96
102 {
103 if (m_decorFlags.test (auxid)) {
104 m_decorFlags.reset (auxid);
105 return;
106 }
107
109 }
110
111
118 {
120 static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
121 m_decorFlags.end());
122
123 // Check each detector flag. If it has been set to something,
124 // then lock this flag.
125 // This check may be too strict; we'll have to see.
126 size_t sz = size();
127 for (SG::auxid_t id : flagIds) {
128 const uint32_t* flags = reinterpret_cast<const uint32_t*>(getData (id, sz, sz));
129 for (size_t i = 0; i < sz; i++) {
130 if (flags[i] != 0) {
131 m_decorFlags.reset (id);
132 break;
133 }
134 }
135 }
136 }
137
138
139} // namespace xAOD
#define AUX_VARIABLE(VAR,...)
Convenience macro for declaring an auxiliary variable.
Definition AuxVariable.h:23
#define DET_FLAG(VAR)
static Double_t sz
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
virtual size_t size() const override
Get the size of the container.
AuxContainerBase(bool allowDynamicVars=true)
Default constructor.
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
std::vector< uint32_t > timeStampNSOffset
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::vector< float > > mcEventWeights
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
std::vector< std::vector< std::pair< std::string, std::string > > > detDescrTags
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
std::vector< uint64_t > pileUpMixtureIDLowBits
std::vector< uint64_t > pileUpMixtureIDHighBits
void toTransient()
Called after one of these objects is read.
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