ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetConditions
SCT_ConditionsData
SCT_ConditionsData
SCT_ByteStreamErrors.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
/*
4
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5
*/
6
12
13
#ifndef SCT_ByteStreamErrors_h
14
#define SCT_ByteStreamErrors_h
15
16
#include <array>
17
#include <vector>
18
#include <cstdint>
19
118
124
#ifndef SCT_ERRORTYPELIST
125
#define SCT_ERRORTYPELIST(XYZ) \
126
XYZ(ByteStreamParseError) \
127
XYZ(TimeOutError) \
128
XYZ(BCIDError) \
129
XYZ(LVL1IDError) \
130
XYZ(PreambleError) \
131
XYZ(FormatterError) \
132
XYZ(TrailerError) \
133
XYZ(TrailerOverflowError) \
134
XYZ(HeaderTrailerLimitError) \
135
XYZ(ABCDError) \
136
XYZ(RawError) \
137
XYZ(MaskedLink) \
138
XYZ(RODClockError) \
139
XYZ(TruncatedROD) \
140
XYZ(ROBFragmentError) \
141
XYZ(MissingLinkHeaderError) \
142
XYZ(MaskedROD) \
143
XYZ(ABCDError_Chip0) \
144
XYZ(ABCDError_Chip1) \
145
XYZ(ABCDError_Chip2) \
146
XYZ(ABCDError_Chip3) \
147
XYZ(ABCDError_Chip4) \
148
XYZ(ABCDError_Chip5) \
149
XYZ(ABCDError_Error1) \
150
XYZ(ABCDError_Error2) \
151
XYZ(ABCDError_Error4) \
152
XYZ(TempMaskedChip0) \
153
XYZ(TempMaskedChip1) \
154
XYZ(TempMaskedChip2) \
155
XYZ(TempMaskedChip3) \
156
XYZ(TempMaskedChip4) \
157
XYZ(TempMaskedChip5) \
158
XYZ(ABCDError_Error7) \
159
XYZ(ABCDError_Invalid) \
160
XYZ(RODSimulatedData) \
161
XYZ(NUM_ERROR_TYPES)
// always have this one last, so we can use it as a loop index
162
#endif
// SCT_ERRORTYPELIST
163
164
#ifndef SCT_DO_ENUM
165
#define SCT_DO_ENUM(e) e,
166
#endif
// SCT_DO_ENUM
167
168
#ifndef SCT_DO_DESCRIPTION
169
#define SCT_DO_DESCRIPTION(e) #e,
170
#endif
// SCT_DO_DESCRIPTION
171
172
namespace
SCT_ByteStreamErrors
{
178
enum
ErrorType
{
179
SCT_ERRORTYPELIST
(
SCT_DO_ENUM
)
180
};
181
185
static
const
std::vector<std::string>
ErrorTypeDescription
= {
186
SCT_ERRORTYPELIST
(
SCT_DO_DESCRIPTION
)
187
};
188
193
static
const
std::vector<ErrorType>
BadErrors
= {
194
TimeOutError,
195
BCIDError,
196
LVL1IDError,
197
HeaderTrailerLimitError,
198
MaskedLink,
199
TruncatedROD,
200
ROBFragmentError,
201
MissingLinkHeaderError,
202
MaskedROD
203
};
204
208
static
const
std::vector<ErrorType>
LinkLevelBadErrors
= {
209
TimeOutError,
210
BCIDError,
211
LVL1IDError,
212
HeaderTrailerLimitError,
213
MaskedLink
214
};
215
219
static
const
std::vector<ErrorType>
RodLevelBadErrors
= {
220
TruncatedROD,
221
ROBFragmentError,
222
MissingLinkHeaderError,
223
// We cannot know which FE-link does not have header. We assign this error
224
// to all the FE-links without hit, ABCD error or raw data of the ROD.
225
MaskedROD
226
};
227
231
static
const
std::vector<ErrorType>
LinkLevelErrors
= {
232
ByteStreamParseError,
233
TimeOutError,
234
BCIDError,
235
LVL1IDError,
236
PreambleError,
237
FormatterError,
238
TrailerError,
239
TrailerOverflowError,
240
HeaderTrailerLimitError,
241
ABCDError,
242
RawError,
243
MaskedLink,
244
ABCDError_Chip0,
245
ABCDError_Chip1,
246
ABCDError_Chip2,
247
ABCDError_Chip3,
248
ABCDError_Chip4,
249
ABCDError_Chip5,
250
ABCDError_Error1,
251
ABCDError_Error2,
252
ABCDError_Error4,
253
TempMaskedChip0,
254
TempMaskedChip1,
255
TempMaskedChip2,
256
TempMaskedChip3,
257
TempMaskedChip4,
258
TempMaskedChip5,
259
ABCDError_Error7
260
};
261
265
static
const
std::vector<ErrorType>
RodLevelErrors
= {
266
RODClockError,
267
TruncatedROD,
268
ROBFragmentError,
269
MissingLinkHeaderError,
// We cannot know which FE-link does not have header. We assign this error to all the FE-links of the ROD.
270
MaskedROD
271
};
272
273
template
<ErrorType et>
static
constexpr
uint64_t
maskUpTo
() {
return
( uint64_t(1) <<
et
) - 1; }
274
// Bit mask for ABCDError_Chip0, ABCDError_Chip1, ..., ABCDError_Chip5
275
static
constexpr
uint64_t
ABCDErrorMask
() {
return
maskUpTo<static_cast<ErrorType>
(ABCDError_Chip5 + 1)>() & ~(
maskUpTo<ABCDError_Chip0>
()); }
276
// Bit mask for TempMaskedChip0, TempMaskedChip1, ..., TempMaskedChip5
277
static
constexpr
uint64_t
TempMaskedChipsMask
() {
return
maskUpTo<static_cast<ErrorType>
(TempMaskedChip5 + 1)>() & ~(
maskUpTo<TempMaskedChip0>
()); }
278
inline
ErrorType
TempMaskedChipToBit
(
const
int
chip){
return
std::array<ErrorType, 6>{{
279
TempMaskedChip0,
280
TempMaskedChip1,
281
TempMaskedChip2,
282
TempMaskedChip3,
283
TempMaskedChip4,
284
TempMaskedChip5}}[chip]; }
285
286
}
287
288
#endif
// SCT_ByteStreamErrors_h
SCT_ERRORTYPELIST
#define SCT_ERRORTYPELIST(XYZ)
Specifications of the data format and errors is found in [1] http://www-eng.lbl.gov/~jmjoseph/Atlas-S...
Definition
SCT_ByteStreamErrors.h:125
SCT_DO_ENUM
#define SCT_DO_ENUM(e)
Definition
SCT_ByteStreamErrors.h:165
SCT_DO_DESCRIPTION
#define SCT_DO_DESCRIPTION(e)
Definition
SCT_ByteStreamErrors.h:169
SCT_ByteStreamErrors
Definition
SCT_ByteStreamErrors.h:172
SCT_ByteStreamErrors::ErrorType
ErrorType
SCT byte stream error type enums used in SCT_RodDecoder, SCT_ByteStreamErrorsTool,...
Definition
SCT_ByteStreamErrors.h:178
SCT_ByteStreamErrors::ABCDErrorMask
static constexpr uint64_t ABCDErrorMask()
Definition
SCT_ByteStreamErrors.h:275
SCT_ByteStreamErrors::RodLevelBadErrors
static const std::vector< ErrorType > RodLevelBadErrors
Bad error enums in ROD level used in SCTErrMonAlg.
Definition
SCT_ByteStreamErrors.h:219
SCT_ByteStreamErrors::TempMaskedChipsMask
static constexpr uint64_t TempMaskedChipsMask()
Definition
SCT_ByteStreamErrors.h:277
SCT_ByteStreamErrors::ErrorTypeDescription
static const std::vector< std::string > ErrorTypeDescription
SCT byte stream error type strings used in SCTErrMonAlg.
Definition
SCT_ByteStreamErrors.h:185
SCT_ByteStreamErrors::BadErrors
static const std::vector< ErrorType > BadErrors
Bad error enums used in SCT_ByteStreamErrorsTool and SCTErrMonAlg.
Definition
SCT_ByteStreamErrors.h:193
SCT_ByteStreamErrors::LinkLevelErrors
static const std::vector< ErrorType > LinkLevelErrors
Error enums in FE-link level used in SCTErrMonAlg (assigned by SCT_RodDecoder::addSingleError).
Definition
SCT_ByteStreamErrors.h:231
SCT_ByteStreamErrors::TempMaskedChipToBit
ErrorType TempMaskedChipToBit(const int chip)
Definition
SCT_ByteStreamErrors.h:278
SCT_ByteStreamErrors::RodLevelErrors
static const std::vector< ErrorType > RodLevelErrors
Error enums in ROD level used in SCTErrMonAlg (assigned by SCT_RodDecoder::addRODError).
Definition
SCT_ByteStreamErrors.h:265
SCT_ByteStreamErrors::maskUpTo
static constexpr uint64_t maskUpTo()
Definition
SCT_ByteStreamErrors.h:273
SCT_ByteStreamErrors::LinkLevelBadErrors
static const std::vector< ErrorType > LinkLevelBadErrors
Bad error enums in FE-link level used in SCTErrMonAlg.
Definition
SCT_ByteStreamErrors.h:208
et
Extra patterns decribing particle interation process.
Generated on
for ATLAS Offline Software by
1.17.0