ATLAS Offline Software
EventAuxInfo_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 
8 namespace xAOD {
9 
11  : AuxInfoBase(),
12  runNumber(0),
13  eventNumber(0),
14  lumiBlock(0),
15  timeStamp(0),
16  timeStampNSOffset(0),
17  bcid(0),
18  detectorMask0(0),
19  detectorMask1(0),
20  detectorMask2(0),
21  detectorMask3(0),
22  eventTypeBitmask(0),
23  statusElement(0),
24  extendedLevel1ID(0),
25  level1TriggerType(0),
26  actualInteractionsPerCrossing(0),
27  averageInteractionsPerCrossing(0),
28  pixelFlags(0),
29  sctFlags(0),
30  trtFlags(0),
31  larFlags(0),
32  tileFlags(0),
33  muonFlags(0),
34  forwardDetFlags(0),
35  coreFlags(0),
36  backgroundFlags(0),
37  lumiFlags(0),
38  beamPosX(0),
39  beamPosY(0),
40  beamPosZ(0),
41  beamPosSigmaX(0),
42  beamPosSigmaY(0),
43  beamPosSigmaZ(0),
44  beamPosSigmaXY(0),
45  beamTiltXZ(0),
46  beamTiltYZ(0),
47  beamStatus(0),
48  m_decorFlags (SG::auxid_set_size_hint)
49  {
50 
51  // Basic event information:
57  AUX_VARIABLE( bcid );
62 
63  // Event type information:
66 
67  // Trigger related information:
74 
75  // Pileup information:
78 
79  // Beam spot information:
90 
91  // Detector flags:
92 #define DET_FLAG(VAR) \
93  AUX_VARIABLE( VAR, SG::AuxTypeRegistry::Flags::Atomic ); \
94  do { \
95  static const auxid_t auxid = \
96  getAuxID( #VAR, VAR, \
97  SG::AuxTypeRegistry::Flags::Atomic ); \
98  m_decorFlags.insert( auxid ); \
99  } while( false )
100 
101  DET_FLAG( pixelFlags );
102  DET_FLAG( sctFlags );
103  DET_FLAG( trtFlags );
104  DET_FLAG( larFlags );
105  DET_FLAG( tileFlags );
106  DET_FLAG( muonFlags );
108  DET_FLAG( coreFlags );
110  DET_FLAG( lumiFlags );
111 #undef DET_FLAG
112  }
113 
114 
124  size_t size,
125  size_t capacity)
126  {
127  if (m_decorFlags.test (auxid)) {
128  return AuxInfoBase::getData (auxid, size, capacity);
129  }
130 
131  return AuxInfoBase::getDecoration (auxid, size, capacity);
132  }
133 
134 
140  {
141  if (m_decorFlags.test (auxid)) {
142  return true;
143  }
144 
145  return AuxInfoBase::isDecoration (auxid);
146  }
147 
148 
154  {
155  if (m_decorFlags.test (auxid)) {
156  m_decorFlags.reset (auxid);
157  return;
158  }
159 
161  }
162 
163 
170  {
172  static const std::vector<SG::auxid_t> flagIds (m_decorFlags.begin(),
173  m_decorFlags.end());
174 
175  // Check each detector flag. If it has been set to something,
176  // then lock this flag.
177  // This check may be too strict; we'll have to see.
178  for (SG::auxid_t id : flagIds) {
179  if (*reinterpret_cast<const uint32_t*>(getData (id)) != 0) {
180  m_decorFlags.reset (id);
181  }
182  }
183  }
184 
185 
186 } // namespace xAOD
xAOD::AuxInfoBase
Common base class for auxiliary info objects.
Definition: AuxInfoBase.h:49
xAOD::EventAuxInfo_v1::beamTiltXZ
float beamTiltXZ
Definition: EventAuxInfo_v1.h:132
xAOD::EventAuxInfo_v1::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: EventAuxInfo_v1.cxx:153
xAOD::EventAuxInfo_v1::streamTagNames
std::vector< std::string > streamTagNames
Definition: EventAuxInfo_v1.h:98
xAOD::EventAuxInfo_v1::detectorMask0
uint32_t detectorMask0
Definition: EventAuxInfo_v1.h:81
xAOD::EventAuxInfo_v1::bcid
uint32_t bcid
Definition: EventAuxInfo_v1.h:80
xAOD::EventAuxInfo_v1::beamPosZ
float beamPosZ
Definition: EventAuxInfo_v1.h:127
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::EventAuxInfo_v1::runNumber
uint32_t runNumber
Definition: EventAuxInfo_v1.h:75
xAOD::EventAuxInfo_v1::beamPosSigmaY
float beamPosSigmaY
Definition: EventAuxInfo_v1.h:129
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::EventAuxInfo_v1::beamPosSigmaZ
float beamPosSigmaZ
Definition: EventAuxInfo_v1.h:130
xAOD::EventAuxInfo_v1::level1TriggerType
uint16_t level1TriggerType
Definition: EventAuxInfo_v1.h:97
CxxUtils::ConcurrentBitset::end
const_iterator end() const
Return an end iterator.
xAOD::AuxInfoBase::size
virtual size_t size() const override
Get the size of the container.
Definition: AuxInfoBase.cxx:393
xAOD::EventAuxInfo_v1::streamTagObeysLumiblock
std::vector< char > streamTagObeysLumiblock
Definition: EventAuxInfo_v1.h:100
xAOD::EventAuxInfo_v1::backgroundFlags
uint32_t backgroundFlags
Definition: EventAuxInfo_v1.h:119
xAOD::EventAuxInfo_v1::larFlags
uint32_t larFlags
Definition: EventAuxInfo_v1.h:114
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::EventAuxInfo_v1::coreFlags
uint32_t coreFlags
Definition: EventAuxInfo_v1.h:118
xAOD::detectorMask1
setEventNumber setTimeStamp setBCID detectorMask1
Definition: EventInfo_v1.cxx:137
xAOD::EventAuxInfo_v1::eventTypeBitmask
uint32_t eventTypeBitmask
Definition: EventAuxInfo_v1.h:90
xAOD::EventAuxInfo_v1::sctFlags
uint32_t sctFlags
Definition: EventAuxInfo_v1.h:112
xAOD::EventAuxInfo_v1::beamTiltYZ
float beamTiltYZ
Definition: EventAuxInfo_v1.h:133
xAOD::EventAuxInfo_v1::pixelFlags
uint32_t pixelFlags
Definition: EventAuxInfo_v1.h:111
xAOD::EventAuxInfo_v1::timeStamp
uint32_t timeStamp
Definition: EventAuxInfo_v1.h:78
xAOD::AuxInfoBase::getData
virtual const void * getData(auxid_t auxid) const override
Get a pointer to a given array.
Definition: AuxInfoBase.cxx:195
xAOD::AuxInfoBase::getDecoration
virtual void * getDecoration(auxid_t auxid, size_t size, size_t capacity) override
Get a pointer to a given array, as a decoration.
Definition: AuxInfoBase.cxx:265
xAOD::EventAuxInfo_v1::trtFlags
uint32_t trtFlags
Definition: EventAuxInfo_v1.h:113
xAOD::EventAuxInfo_v1::EventAuxInfo_v1
EventAuxInfo_v1()
Default constructor.
Definition: EventAuxInfo_v1.cxx:10
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::EventAuxInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing
Definition: EventAuxInfo_v1.h:105
xAOD::AuxInfoBase::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a variable is a decoration.
Definition: AuxInfoBase.cxx:239
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
xAOD::EventAuxInfo_v1::detectorMask2
uint32_t detectorMask2
Definition: EventAuxInfo_v1.h:83
AUX_VARIABLE
#define AUX_VARIABLE(VAR,...)
Convenience macro for declaring an auxiliary variable.
Definition: AuxVariable.h:23
xAOD::EventAuxInfo_v1::lumiFlags
uint32_t lumiFlags
Definition: EventAuxInfo_v1.h:120
xAOD::EventAuxInfo_v1::forwardDetFlags
uint32_t forwardDetFlags
Definition: EventAuxInfo_v1.h:117
CxxUtils::ConcurrentBitset::reset
ConcurrentBitset & reset(bit_t bit)
Turn off one bit.
xAOD::EventAuxInfo_v1::isDecoration
virtual bool isDecoration(auxid_t auxid) const override
Test if a particular variable is tagged as a decoration.
Definition: EventAuxInfo_v1.cxx:139
xAOD::beamStatus
setBeamTiltXZ beamStatus
Definition: EventInfo_v1.cxx:958
xAOD::EventAuxInfo_v1::detectorMask1
uint32_t detectorMask1
Definition: EventAuxInfo_v1.h:82
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
xAOD::EventAuxInfo_v1::beamPosSigmaXY
float beamPosSigmaXY
Definition: EventAuxInfo_v1.h:131
xAOD::EventAuxInfo_v1::tileFlags
uint32_t tileFlags
Definition: EventAuxInfo_v1.h:115
CxxUtils::ConcurrentBitset::begin
const_iterator begin() const
Return a begin iterator.
DET_FLAG
#define DET_FLAG(VAR)
xAOD::EventAuxInfo_v1::getDecoration
virtual void * getDecoration(SG::auxid_t auxid, size_t size, size_t capacity) override
Return the data vector for one aux data decoration item.
Definition: EventAuxInfo_v1.cxx:123
xAOD::EventAuxInfo_v1::beamPosX
float beamPosX
Definition: EventAuxInfo_v1.h:125
xAOD::EventAuxInfo_v1::beamStatus
uint32_t beamStatus
Definition: EventAuxInfo_v1.h:134
xAOD::EventAuxInfo_v1::beamPosY
float beamPosY
Definition: EventAuxInfo_v1.h:126
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
xAOD::AuxInfoBase::lockDecoration
virtual void lockDecoration(SG::auxid_t auxid) override
Lock a decoration.
Definition: AuxInfoBase.cxx:351
xAOD::EventAuxInfo_v1::detDescrTags
std::vector< std::pair< std::string, std::string > > detDescrTags
Definition: EventAuxInfo_v1.h:89
xAOD::timeStamp
setEventNumber timeStamp
Definition: EventInfo_v1.cxx:128
xAOD::EventAuxInfo_v1::lumiBlock
uint32_t lumiBlock
Definition: EventAuxInfo_v1.h:77
xAOD::EventAuxInfo_v1::muonFlags
uint32_t muonFlags
Definition: EventAuxInfo_v1.h:116
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
xAOD::EventAuxInfo_v1::statusElement
uint32_t statusElement
Definition: EventAuxInfo_v1.h:95
EventAuxInfo_v1.h
xAOD::EventAuxInfo_v1::m_decorFlags
CxxUtils::ConcurrentBitset m_decorFlags
Keep track of the event status flags.
Definition: EventAuxInfo_v1.h:142
xAOD::EventAuxInfo_v1::detectorMask3
uint32_t detectorMask3
Definition: EventAuxInfo_v1.h:84
xAOD::EventAuxInfo_v1::timeStampNSOffset
uint32_t timeStampNSOffset
Definition: EventAuxInfo_v1.h:79
xAOD::beamTiltXZ
beamTiltXZ
Definition: EventInfo_v1.cxx:953
xAOD::EventAuxInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing
Definition: EventAuxInfo_v1.h:106
xAOD::detectorMask3
setEventNumber setTimeStamp setBCID setDetectorMask1 detectorMask3
Definition: EventInfo_v1.cxx:141
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
xAOD::EventAuxInfo_v1::toTransient
void toTransient()
Called after one of these objects is read.
Definition: EventAuxInfo_v1.cxx:169
xAOD::EventAuxInfo_v1::streamTagTypes
std::vector< std::string > streamTagTypes
Definition: EventAuxInfo_v1.h:99
xAOD::EventAuxInfo_v1::eventNumber
uint64_t eventNumber
Definition: EventAuxInfo_v1.h:76
xAOD::EventAuxInfo_v1::beamPosSigmaX
float beamPosSigmaX
Definition: EventAuxInfo_v1.h:128
xAOD::EventAuxInfo_v1::extendedLevel1ID
uint32_t extendedLevel1ID
Definition: EventAuxInfo_v1.h:96
CxxUtils::ConcurrentBitset::test
bool test(bit_t bit) const
Test to see if a bit is set.