Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef TRIGT1CALO_RODHEADER_H
5 #define TRIGT1CALO_RODHEADER_H
6 
7 #include <stdint.h>
8 #include <vector>
9 
10 namespace LVL1 {
11 
17 class RODHeader {
18 
19  public:
20 
21  RODHeader() = default;
23  uint32_t lvl1Id, uint32_t bcId, uint32_t trigType,
24  uint32_t detType, const std::vector<uint32_t>& statusWords,
25  uint32_t nData);
26 
27 
28  // Header data
29  int version() const;
30  int majorVersion() const;
31  int minorVersion() const;
32  int sourceID() const;
33  int subDetectorID() const;
34  int moduleID() const;
35  int crate() const;
36  int sLink() const;
37  int dataType() const;
38  int run() const;
39  int runType() const;
40  int runNumber() const;
41  int extendedL1ID() const;
42  int ecrID() const;
43  int l1ID() const;
44  int bunchCrossing() const;
45  int l1TriggerType() const;
46  int detEventType() const;
47  int orbitCount() const;
48  int stepNumber() const;
49  int stepType() const;
50 
51  // Status bits - word 1
52  bool bcnMismatch() const;
53  bool gLinkTimeout() const;
54  bool dataTransportError() const;
55  bool rodFifoOverflow() const;
56  bool lvdsLinkError() const;
57  bool cmmParityError() const;
58  bool gLinkError() const;
59  // Status bits - word 2
60  bool limitedRoISet() const;
61  bool triggerTypeTimeout() const;
62 
63  // Status words
64  const std::vector<uint32_t>& statusWords() const;
65 
66  // Payload
67  int payloadSize() const;
68 
69  private:
70 
78  std::vector<uint32_t> m_statusWords{0};
80 
81 };
82 
83 inline int RODHeader::version() const
84 {
85  return m_version;
86 }
87 
88 inline int RODHeader::majorVersion() const
89 {
90  return (m_version >> 16) & 0xffff;
91 }
92 
93 inline int RODHeader::minorVersion() const
94 {
95  return m_version & 0xffff;
96 }
97 
98 inline int RODHeader::sourceID() const
99 {
100  return m_sourceId;
101 }
102 
103 inline int RODHeader::subDetectorID() const
104 {
105  return (m_sourceId >> 16) & 0xff;
106 }
107 
108 inline int RODHeader::moduleID() const
109 {
110  return m_sourceId & 0xffff;
111 }
112 
113 inline int RODHeader::crate() const
114 {
115  return m_sourceId & 0xf;
116 }
117 
118 inline int RODHeader::sLink() const
119 {
120  return (m_sourceId >> 4) & 0x3;
121 }
122 
123 inline int RODHeader::dataType() const
124 {
125  return (m_sourceId >> 7) & 0x1;
126 }
127 
128 inline int RODHeader::run() const
129 {
130  return m_run;
131 }
132 
133 inline int RODHeader::runType() const
134 {
135  return (m_run >> 24) & 0xff;
136 }
137 
138 inline int RODHeader::runNumber() const
139 {
140  return m_run & 0xffffff;
141 }
142 
143 inline int RODHeader::extendedL1ID() const
144 {
145  return m_lvl1Id;
146 }
147 
148 inline int RODHeader::ecrID() const
149 {
150  return (m_lvl1Id >> 24) & 0xff;
151 }
152 
153 inline int RODHeader::l1ID() const
154 {
155  return m_lvl1Id & 0xffffff;
156 }
157 
158 inline int RODHeader::bunchCrossing() const
159 {
160  return m_bcId;
161 }
162 
163 inline int RODHeader::l1TriggerType() const
164 {
165  return m_trigType;
166 }
167 
168 inline int RODHeader::detEventType() const
169 {
170  return m_detType;
171 }
172 
173 inline int RODHeader::orbitCount() const
174 {
175  return (m_detType >> 16) & 0xffff;
176 }
177 
178 inline int RODHeader::stepNumber() const
179 {
180  return (m_detType >> 4) & 0xfff;
181 }
182 
183 inline int RODHeader::stepType() const
184 {
185  return m_detType & 0xf;
186 }
187 
188 inline bool RODHeader::bcnMismatch() const
189 {
190  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x1;
191 }
192 
193 inline bool RODHeader::gLinkTimeout() const
194 {
195  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x4;
196 }
197 
198 inline bool RODHeader::dataTransportError() const
199 {
200  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x8;
201 }
202 
203 inline bool RODHeader::rodFifoOverflow() const
204 {
205  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x10;
206 }
207 
208 inline bool RODHeader::lvdsLinkError() const
209 {
210  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x10000;
211 }
212 
213 inline bool RODHeader::cmmParityError() const
214 {
215  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x20000;
216 }
217 
218 inline bool RODHeader::gLinkError() const
219 {
220  return (m_statusWords.empty()) ? false : m_statusWords[0] & 0x40000;
221 }
222 
223 inline bool RODHeader::limitedRoISet() const
224 {
225  return (m_statusWords.size() < 2) ? false : m_statusWords[1] & 0x2;
226 }
227 
228 inline bool RODHeader::triggerTypeTimeout() const
229 {
230  return (m_statusWords.size() < 2) ? false : m_statusWords[1] & 0x10000;
231 }
232 
233 inline const std::vector<uint32_t>& RODHeader::statusWords() const
234 {
235  return m_statusWords;
236 }
237 
238 inline int RODHeader::payloadSize() const
239 {
240  return m_payloadSize;
241 }
242 
243 } // end namespace
244 
245 #ifndef RODHeader_ClassDEF_H
247 #endif
248 
249 #endif
LVL1::RODHeader::RODHeader
RODHeader()=default
LVL1::RODHeader::dataTransportError
bool dataTransportError() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:198
LVL1::RODHeader::ecrID
int ecrID() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:148
LVL1::RODHeader::m_run
uint32_t m_run
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:73
LVL1::RODHeader::moduleID
int moduleID() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:108
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::RODHeader::l1ID
int l1ID() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:153
LVL1::RODHeader::m_bcId
uint32_t m_bcId
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:75
LVL1::RODHeader::statusWords
const std::vector< uint32_t > & statusWords() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:233
LVL1::RODHeader::lvdsLinkError
bool lvdsLinkError() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:208
LVL1::RODHeader::detEventType
int detEventType() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:168
LVL1::RODHeader
ROD Header data and status words.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:17
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::RODHeader::m_payloadSize
uint32_t m_payloadSize
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:79
LVL1::RODHeader::runType
int runType() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:133
LVL1::RODHeader::runNumber
int runNumber() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:138
LVL1::RODHeader::l1TriggerType
int l1TriggerType() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:163
LVL1::RODHeader::stepNumber
int stepNumber() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:178
LVL1::RODHeader::payloadSize
int payloadSize() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:238
LVL1::RODHeader::m_trigType
uint32_t m_trigType
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:76
LVL1::RODHeader::m_statusWords
std::vector< uint32_t > m_statusWords
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:78
LVL1::RODHeader::triggerTypeTimeout
bool triggerTypeTimeout() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:228
LVL1::RODHeader::limitedRoISet
bool limitedRoISet() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:223
LVL1::RODHeader::bunchCrossing
int bunchCrossing() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:158
run
Definition: run.py:1
LVL1::RODHeader::minorVersion
int minorVersion() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:93
LVL1::RODHeader::m_detType
uint32_t m_detType
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:77
LVL1::RODHeader::stepType
int stepType() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:183
LVL1::RODHeader::cmmParityError
bool cmmParityError() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:213
RODHeader_ClassDEF.h
bcId
uint16_t bcId(uint32_t data)
Definition: TgcByteStreamData.h:326
LVL1::RODHeader::m_lvl1Id
uint32_t m_lvl1Id
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:74
LVL1::RODHeader::m_version
uint32_t m_version
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:71
LVL1::RODHeader::orbitCount
int orbitCount() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:173
LVL1::RODHeader::crate
int crate() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:113
LVL1::RODHeader::gLinkError
bool gLinkError() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:218
LVL1::RODHeader::run
int run() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:128
LVL1::RODHeader::sLink
int sLink() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:118
LVL1::RODHeader::sourceID
int sourceID() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:98
LVL1::RODHeader::version
int version() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:83
LVL1::RODHeader::extendedL1ID
int extendedL1ID() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:143
LVL1::RODHeader::bcnMismatch
bool bcnMismatch() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:188
LVL1::RODHeader::m_sourceId
uint32_t m_sourceId
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:72
LVL1::RODHeader::dataType
int dataType() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:123
LVL1::RODHeader::rodFifoOverflow
bool rodFifoOverflow() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:203
LVL1::RODHeader::majorVersion
int majorVersion() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:88
LVL1::RODHeader::subDetectorID
int subDetectorID() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:103
LVL1::RODHeader::gLinkTimeout
bool gLinkTimeout() const
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/RODHeader.h:193