ATLAS Offline Software
RODHeader_v1.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_v1.cxx 685662 2015-07-27 10:30:15Z amazurov $
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_v1 , unsigned int , version , setVersion )
24  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , sourceId , setSourceId )
25  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , run , setRun )
26  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , lvl1Id , setLvl1Id )
27  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , bcid , setBcid )
28  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , trigType , setTrigType )
29  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , detType , setDetType )
30  AUXSTORE_OBJECT_SETTER_AND_GETTER( RODHeader_v1 , std::vector<unsigned int> , statusWords , setStatusWords )
31  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( RODHeader_v1 , unsigned int , payloadSize , setPayloadSize )
32 
34  uint32_t lvl1Id, uint32_t bcId, uint32_t trigType,
35  uint32_t detType, 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  setDetType(detType);
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_v1::crate() const
76  {
77  return sourceId() & 0xf;
78  }
79 
80  int RODHeader_v1::sLink() const
81  {
82  return (sourceId() >> 4) & 0x3;
83  }
84 
86  {
87  return (sourceId() >> 7) & 0x1;
88  }
89 
90  int RODHeader_v1::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_v1::ecrID() const
106  {
107  return (lvl1Id() >> 24) & 0xff;
108  }
109 
110  int RODHeader_v1::l1ID() const
111  {
112  return lvl1Id() & 0xffffff;
113  }
114 
116  {
117  return bcid();
118  }
119 
121  {
122  return trigType();
123  }
124 
126  {
127  return detType();
128  }
129 
131  {
132  return (detType() >> 16) & 0xffff;
133  }
134 
136  {
137  return (detType() >> 4) & 0xfff;
138  }
139 
141  {
142  return detType() & 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::RODHeader_v1::gLinkError
bool gLinkError() const
Definition: RODHeader_v1.cxx:177
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_v1::detEventType
int detEventType() const
Definition: RODHeader_v1.cxx:125
xAOD::RODHeader_v1::orbitCount
int orbitCount() const
Definition: RODHeader_v1.cxx:130
xAOD::RODHeader_v1::l1ID
int l1ID() const
Definition: RODHeader_v1.cxx:110
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::RODHeader_v1::dataTransportError
bool dataTransportError() const
Definition: RODHeader_v1.cxx:157
AuxStoreAccessorMacros.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::RODHeader_v1::majorVersion
int majorVersion() const
Definition: RODHeader_v1.cxx:50
xAOD::RODHeader_v1::stepNumber
int stepNumber() const
Definition: RODHeader_v1.cxx:135
xAOD::RODHeader_v1::cmmParityError
bool cmmParityError() const
Definition: RODHeader_v1.cxx:172
initialize
void initialize()
Definition: run_EoverP.cxx:894
xAOD::RODHeader_v1::stepType
int stepType() const
Definition: RODHeader_v1.cxx:140
xAOD::RODHeader_v1::triggerTypeTimeout
bool triggerTypeTimeout() const
Definition: RODHeader_v1.cxx:188
xAOD::RODHeader_v1::limitedRoISet
bool limitedRoISet() const
Definition: RODHeader_v1.cxx:183
xAOD::RODHeader_v1::RODHeader_v1
RODHeader_v1()
Definition: RODHeader_v1.cxx:18
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::RODHeader_v1::run
unsigned int run() const
get run
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
xAOD::RODHeader_v1::moduleID
int moduleID() const
Definition: RODHeader_v1.cxx:70
xAOD::RODHeader_v1::gLinkTimeout
bool gLinkTimeout() const
Definition: RODHeader_v1.cxx:152
empty
bool empty(TH1 *h)
Definition: computils.cxx:295
xAOD::RODHeader_v1::lvl1Id
unsigned int lvl1Id() const
get lvl1Id
xAOD::RODHeader_v1::subDetectorID
int subDetectorID() const
Definition: RODHeader_v1.cxx:65
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::RODHeader_v1::ecrID
int ecrID() const
Definition: RODHeader_v1.cxx:105
xAOD::RODHeader_v1::runType
int runType() const
Definition: RODHeader_v1.cxx:90
vector
Definition: MultiHisto.h:13
xAOD::RODHeader_v1::version
unsigned int version() const
get version
xAOD::RODHeader_v1::sourceID
int sourceID() const
Definition: RODHeader_v1.cxx:60
run
Definition: run.py:1
xAOD::RODHeader_v1::bunchCrossing
int bunchCrossing() const
Definition: RODHeader_v1.cxx:115
xAOD::RODHeader_v1::crate
int crate() const
Definition: RODHeader_v1.cxx:75
xAOD::RODHeader_v1::sLink
int sLink() const
Definition: RODHeader_v1.cxx:80
xAOD::RODHeader_v1::extendedL1ID
int extendedL1ID() const
Definition: RODHeader_v1.cxx:100
xAOD::RODHeader_v1::detType
unsigned int detType() const
get detType
bcId
uint16_t bcId(uint32_t data)
Definition: TgcByteStreamData.h:326
xAOD::RODHeader_v1::bcnMismatch
bool bcnMismatch() const
Definition: RODHeader_v1.cxx:147
xAOD::RODHeader_v1::trigType
unsigned int trigType() const
get trigType
xAOD::RODHeader_v1::sourceId
unsigned int sourceId() const
get sourceId
xAOD::RODHeader_v1::runNumber
int runNumber() const
Definition: RODHeader_v1.cxx:95
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
xAOD::RODHeader_v1::l1TriggerType
int l1TriggerType() const
Definition: RODHeader_v1.cxx:120
xAOD::RODHeader_v1::statusWords
const std::vector< unsigned int > & statusWords() const
get statusWords
get_generator_info.version
version
Definition: get_generator_info.py:33
xAOD::RODHeader_v1
Description of RODHeader_v1.
Definition: RODHeader_v1.h:23
xAOD::RODHeader_v1::dataType
int dataType() const
Definition: RODHeader_v1.cxx:85
RODHeader_v1.h
xAOD::RODHeader_v1::bcid
unsigned int bcid() const
get bcid
xAOD::RODHeader_v1::minorVersion
int minorVersion() const
Definition: RODHeader_v1.cxx:55
xAOD::RODHeader_v1::rodFifoOverflow
bool rodFifoOverflow() const
Definition: RODHeader_v1.cxx:162
xAOD::RODHeader_v1::lvdsLinkError
bool lvdsLinkError() const
Definition: RODHeader_v1.cxx:167
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27