ATLAS Offline Software
RODHeader_v2.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: RODHeader_v2.cxx 694350 2015-09-11 12:02:19Z krasznaa $
6 
7 // System include(s):
8 #include <cmath>
9 
10 // EDM includes(s):
12 
13 // Local include(s):
15 
16 namespace xAOD{
17 
19  SG::AuxElement()
20  {
21  }
22 
23  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , version , setVersion )
24  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , sourceId , setSourceId )
25  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , run , setRun )
26  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , lvl1Id , setLvl1Id )
27  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , bcid , setBcid )
28  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , trigType , setTrigType )
29  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , lvl1DetType , setLvl1DetType )
30  AUXSTORE_OBJECT_SETTER_AND_GETTER( RODHeader_v2 , std::vector<unsigned int> , statusWords , setStatusWords )
31  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v2 , unsigned int , payloadSize , setPayloadSize )
32 
34  uint32_t lvl1Id, uint32_t bcId, uint32_t trigType,
35  uint32_t lvl1DetType, const std::vector<uint32_t>& statusWords,
36  uint32_t nData) {
37  setVersion(version);
38  setSourceId(sourceId);
39  setRun(run);
40  setLvl1Id(lvl1Id);
41  setBcid(bcId);
42  setTrigType(trigType);
43  setLvl1DetType(lvl1DetType);
44  setStatusWords(statusWords);
45  setPayloadSize(nData);
46  }
47 
48 
49  // Header data
51  {
52  return (version() >> 16) & 0xffff;
53  }
54 
56  {
57  return version() & 0xffff;
58  }
59 
61  {
62  return sourceId();
63  }
64 
66  {
67  return (sourceId() >> 16) & 0xff;
68  }
69 
71  {
72  return sourceId() & 0xffff;
73  }
74 
75  int RODHeader_v2::crate() const
76  {
77  return sourceId() & 0xf;
78  }
79 
80  int RODHeader_v2::sLink() const
81  {
82  return (sourceId() >> 4) & 0x3;
83  }
84 
86  {
87  return (sourceId() >> 7) & 0x1;
88  }
89 
90  int RODHeader_v2::runType() const
91  {
92  return (run() >> 24) & 0xff;
93  }
94 
96  {
97  return run() & 0xffffff;
98  }
99 
101  {
102  return lvl1Id();
103  }
104 
105  int RODHeader_v2::ecrID() const
106  {
107  return (lvl1Id() >> 24) & 0xff;
108  }
109 
110  int RODHeader_v2::l1ID() const
111  {
112  return lvl1Id() & 0xffffff;
113  }
114 
116  {
117  return bcid();
118  }
119 
121  {
122  return trigType();
123  }
124 
126  {
127  return lvl1DetType();
128  }
129 
131  {
132  return (lvl1DetType() >> 16) & 0xffff;
133  }
134 
136  {
137  return (lvl1DetType() >> 4) & 0xfff;
138  }
139 
141  {
142  return lvl1DetType() & 0xf;
143  }
144 
145 
146  // Status bits - word 1
148  {
149  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x1;
150  }
151 
153  {
154  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x4;
155  }
156 
158  {
159  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x8;
160  }
161 
163  {
164  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x10;
165  }
166 
168  {
169  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x10000;
170  }
171 
173  {
174  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x20000;
175  }
176 
178  {
179  return (statusWords().empty()) ? false : statusWords()[ 0 ] & 0x40000;
180  }
181 
182  // Status bits - word 2
184  {
185  return (statusWords().size() < 2) ? false : statusWords()[ 1 ] & 0x2;
186  }
187 
189  {
190  return (statusWords().size() < 2) ? false : statusWords()[ 1 ] & 0x10000;
191  }
192 
193 
194 } // namespace xAOD
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::RODHeader_v2::triggerTypeTimeout
bool triggerTypeTimeout() const
Definition: RODHeader_v2.cxx:188
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::RODHeader_v2::trigType
unsigned int trigType() const
get trigType
AuxStoreAccessorMacros.h
xAOD::RODHeader_v2::dataTransportError
bool dataTransportError() const
Definition: RODHeader_v2.cxx:157
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::RODHeader_v2::ecrID
int ecrID() const
Definition: RODHeader_v2.cxx:105
xAOD::RODHeader_v2::runType
int runType() const
Definition: RODHeader_v2.cxx:90
xAOD::RODHeader_v2::stepNumber
int stepNumber() const
Definition: RODHeader_v2.cxx:135
initialize
void initialize()
Definition: run_EoverP.cxx:894
xAOD::RODHeader_v2::gLinkTimeout
bool gLinkTimeout() const
Definition: RODHeader_v2.cxx:152
xAOD::RODHeader_v2::run
unsigned int run() const
get run
xAOD::RODHeader_v2::moduleID
int moduleID() const
Definition: RODHeader_v2.cxx:70
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::RODHeader_v2::limitedRoISet
bool limitedRoISet() const
Definition: RODHeader_v2.cxx:183
xAOD::RODHeader_v2::cmmParityError
bool cmmParityError() const
Definition: RODHeader_v2.cxx:172
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
xAOD::RODHeader_v2::version
unsigned int version() const
get version
xAOD::RODHeader_v2::subDetectorID
int subDetectorID() const
Definition: RODHeader_v2.cxx:65
xAOD::RODHeader_v2::orbitCount
int orbitCount() const
Definition: RODHeader_v2.cxx:130
xAOD::RODHeader_v2::statusWords
const std::vector< unsigned int > & statusWords() const
get statusWords
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::RODHeader_v2::l1ID
int l1ID() const
Definition: RODHeader_v2.cxx:110
xAOD::RODHeader_v2::lvl1Id
unsigned int lvl1Id() const
get lvl1Id
xAOD::RODHeader_v2::bcid
unsigned int bcid() const
get bcid
vector
Definition: MultiHisto.h:13
xAOD::RODHeader_v2::majorVersion
int majorVersion() const
Definition: RODHeader_v2.cxx:50
run
Definition: run.py:1
xAOD::RODHeader_v2
Description of RODHeader_v2.
Definition: RODHeader_v2.h:23
xAOD::RODHeader_v2::RODHeader_v2
RODHeader_v2()
Definition: RODHeader_v2.cxx:18
xAOD::RODHeader_v2::sourceId
unsigned int sourceId() const
get sourceId
xAOD::RODHeader_v2::runNumber
int runNumber() const
Definition: RODHeader_v2.cxx:95
bcId
uint16_t bcId(uint32_t data)
Definition: TgcByteStreamData.h:326
xAOD::RODHeader_v2::extendedL1ID
int extendedL1ID() const
Definition: RODHeader_v2.cxx:100
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
xAOD::RODHeader_v2::detEventType
int detEventType() const
Definition: RODHeader_v2.cxx:125
xAOD::RODHeader_v2::minorVersion
int minorVersion() const
Definition: RODHeader_v2.cxx:55
xAOD::RODHeader_v2::lvdsLinkError
bool lvdsLinkError() const
Definition: RODHeader_v2.cxx:167
RODHeader_v2.h
get_generator_info.version
version
Definition: get_generator_info.py:33
xAOD::RODHeader_v2::rodFifoOverflow
bool rodFifoOverflow() const
Definition: RODHeader_v2.cxx:162
xAOD::RODHeader_v2::bunchCrossing
int bunchCrossing() const
Definition: RODHeader_v2.cxx:115
xAOD::RODHeader_v2::bcnMismatch
bool bcnMismatch() const
Definition: RODHeader_v2.cxx:147
xAOD::RODHeader_v2::l1TriggerType
int l1TriggerType() const
Definition: RODHeader_v2.cxx:120
xAOD::RODHeader_v2::crate
int crate() const
Definition: RODHeader_v2.cxx:75
xAOD::RODHeader_v2::sourceID
int sourceID() const
Definition: RODHeader_v2.cxx:60
xAOD::RODHeader_v2::sLink
int sLink() const
Definition: RODHeader_v2.cxx:80
xAOD::RODHeader_v2::stepType
int stepType() const
Definition: RODHeader_v2.cxx:140
xAOD::RODHeader_v2::gLinkError
bool gLinkError() const
Definition: RODHeader_v2.cxx:177
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
xAOD::RODHeader_v2::dataType
int dataType() const
Definition: RODHeader_v2.cxx:85
xAOD::RODHeader_v2::lvl1DetType
unsigned int lvl1DetType() const
get detType