ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetMonitoring
PixelMonitoring
src
PixelAthErrorMonAlg.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef PIXELATHERRORMONTOOL_H
6
#define PIXELATHERRORMONTOOL_H
7
8
#include "
PixelAthMonitoringBase.h
"
9
#include "
InDetConditionsSummaryService/IInDetConditionsTool.h
"
10
#include "
PixelConditionsData/PixelByteStreamErrors.h
"
11
#include "
PixelReadoutGeometry/IPixelReadoutManager.h
"
12
#include "
InDetByteStreamErrors/IDCInDetBSErrContainer.h
"
13
14
class
PixelID
;
15
16
class
ErrorCategory
{
17
public
:
18
enum
ErrorCategoryID
{
19
kSync
= 0,
kTrunc
,
kOpt
,
kSeu
,
kTout
,
COUNT
20
};
21
};
22
23
class
ErrorCategoryRODMOD
{
24
public
:
25
enum
ErrorCategoryRODMODID
{
26
kSyncMod
= 0,
kSyncROD
,
kTruncMod
,
kTruncROD
,
kOpt
,
kSeu
,
kTout
,
COUNT
27
};
28
};
29
30
static
const
int
kNumErrorStatesFEI3
{
31
17
32
};
33
static
const
int
kNumErrorStatesFEI4
{
34
27
35
};
36
static
const
int
kNumErrorStatesPerFE
{
37
5
38
};
39
40
// error states = enumerators of PixelByteStreamErrors and FEI4 SR's we care about
41
//
42
static
constexpr
std::array<const char*, kNumErrorStatesFEI3>
error_names_stateFEI3
{
43
"RODTimeout"
,
44
"RODSyncBCIDErrors"
,
45
"RODSyncLVL1IDErrors"
,
46
"OpticalErrors"
,
47
"ModSyncLVL1IDErrors"
,
48
"ModSyncBCID2Errors"
,
49
"ModSyncBCID1Errors"
,
50
"ModTruncEoEOverflowErrors"
,
51
"ModTruncHitOverflowErrors"
,
52
"FEWarning"
,
53
"SEUHitParity"
,
54
"SEURegisterParity"
,
55
"SEUHamming"
,
56
"ModTruncEOCErrors"
,
57
"RODTrailerBitErrors"
,
58
"RODTruncHTLimitErrors"
,
59
"RODTruncRODOFErrors"
60
};
61
62
static
constexpr
std::array<const char*, kNumErrorStatesFEI4>
error_names_stateFEI4
{
63
"RODTimeoutErrors"
,
64
"RODBCIDErrors"
,
65
"RODLVL1IDErrors"
,
66
"RODPreambleErrors"
,
67
"RODTrailerErrors"
,
68
"RODRowColumnErrors"
,
69
"RODMaskedLink"
,
70
"RODLimitErrors"
,
71
"SR0BCIDCounterErrors"
,
72
"SR1HammingCode0Errors"
,
73
"SR2HammingCode1Errors"
,
74
"SR3HammingCode2Errors"
,
75
"SR4L1InCounterErrors"
,
76
"SR5L1RequestCounterErrors"
,
77
"SR6L1RegisterErrors"
,
78
"SR7L1TriggerIDErrors"
,
79
"SR8FEReadoutProcessErrors"
,
80
"SR15SkipppedTrigCountErrors"
,
81
"SR16TruncatedEventFlagErrors"
,
82
"SR24TripleRedundantErrorsCNFGMEM"
,
83
"SR25WriteRegDataErrors"
,
84
"SR26AddressErrors"
,
85
"SR27OtherCMDDecoderErrors"
,
86
"SR28CMDDecoderBitflipErrors"
,
87
"SR29TripleRedundantErrorsCMD"
,
88
"SR30DataBusAddressErrors"
,
89
"SR31TripleRedundantErrorsEFUSE"
90
};
91
92
static
constexpr
std::array<const char*, ErrorCategoryRODMOD::COUNT>
error_names_cat_rodmod
{
93
"SyncErrorsMod"
,
94
"SyncErrorsROD"
,
95
"TruncErrorsMod"
,
96
"TruncErrorsROD"
,
97
"OpticalErrorsRODMod"
,
98
"SEUErrorsRODMod"
,
99
"TimeoutErrorsRODMod"
100
};
101
102
static
constexpr
std::array<const char*, 4>
error_names_cat_rodmod_norm
{
103
"SyncErrorsModFracPerEvent"
,
104
"SyncErrorsRODFracPerEvent"
,
105
"TruncErrorsModFracPerEvent"
,
106
"TruncErrorsRODFracPerEvent"
107
};
108
109
static
constexpr
std::array<const char*, ErrorCategory::COUNT>
error_names_cat
{
110
"SyncErrors"
,
111
"TruncErrors"
,
112
"OpticalErrors"
,
113
"SEUErrors"
,
114
"TimeoutErrors"
115
};
116
117
static
constexpr
std::array<const char*, ErrorCategory::COUNT>
error_names_cat_norm
{
118
"SyncErrorsFracPerEvent"
,
119
"TruncationErrorsFracPerEvent"
,
120
"OpticalErrorsFracPerEvent"
,
121
"SEUErrorsFracPerEvent"
,
122
"TimeoutErrorsFracPerEvent"
123
};
124
125
static
const
int
numErrorStatesLayer
[
PixLayers::COUNT
] = {
126
kNumErrorStatesFEI3
,
kNumErrorStatesFEI3
,
kNumErrorStatesFEI3
,
kNumErrorStatesFEI3
,
127
kNumErrorStatesFEI3
,
kNumErrorStatesFEI4
,
kNumErrorStatesFEI4
128
};
129
static
const
int
kNumErrorCatRODMods
{
130
ErrorCategoryRODMOD::COUNT
131
};
132
static
const
int
numErrorCatRODModsLayer
[
PixLayers::COUNT
] = {
133
kNumErrorCatRODMods
,
kNumErrorCatRODMods
,
kNumErrorCatRODMods
,
kNumErrorCatRODMods
,
134
kNumErrorCatRODMods
,
kNumErrorCatRODMods
,
kNumErrorCatRODMods
135
};
136
137
static
const
int
nFEIBL2D
{
138
2
139
};
140
141
class
PixelAthErrorMonAlg
:
public
PixelAthMonitoringBase
{
142
public
:
143
PixelAthErrorMonAlg
(
const
std::string& name, ISvcLocator* pSvcLocator);
144
virtual
~PixelAthErrorMonAlg
();
145
virtual
StatusCode
initialize
()
override
;
146
virtual
StatusCode
fillHistograms
(
const
EventContext& ctx)
const override
;
147
std::string
findComponentString
(
int
bec,
int
ld)
const
;
148
int
getErrorCategory
(
int
error_cat_rodmod)
const
;
149
std::bitset<kNumErrorStatesFEI3>
getErrorStateFEI3Mod
(uint64_t errorword)
const
;
150
std::bitset<kNumErrorStatesFEI3>
getErrorStateFE
(uint64_t errorword,
bool
isibl)
const
;
151
void
fillErrorCatRODmod
(uint64_t mod_errorword,
152
int
(&nerrors_cat_rodmod)[
ErrorCategoryRODMOD::COUNT
][
nFEIBL2D
])
const
;
153
void
fillErrorCatRODmod
(uint64_t fe_errorword,
bool
is_fei4,
154
int
(&nerrors_cat_rodmod)[
ErrorCategoryRODMOD::COUNT
][
nFEIBL2D
],
int
ife)
const
;
155
void
fillErrorCatRODmod
(
int
servicecode,
int
payload,
156
int
(&nerrors_cat_rodmod)[
ErrorCategoryRODMOD::COUNT
][
nFEIBL2D
],
int
ife)
const
;
157
bool
isPerFEI3State
(
const
std::string& state)
const
;
158
private
:
159
SG::ReadHandleKey<IDCInDetBSErrContainer>
m_idcErrContKey
160
{
this
,
"PixelByteStreamErrs"
,
"PixelByteStreamErrs"
,
"PixelByteStreamErrs container key"
};
161
Gaudi::Property<bool>
m_useByteStreamFEI4
162
{
this
,
"UseByteStreamFEI4"
,
false
,
"Switch of the ByteStream error for FEI4"
};
163
Gaudi::Property<bool>
m_useByteStreamFEI3
164
{
this
,
"UseByteStreamFEI3"
,
false
,
"Switch of the ByteStream error for FEI3"
};
165
Gaudi::Property<bool>
m_useByteStreamRD53
166
{
this
,
"UseByteStreamRD53"
,
false
,
"Switch of the ByteStream error for RD53"
};
167
168
unsigned
int
m_readoutTechnologyMask
{};
169
bool
m_doOnline
{};
170
bool
m_doLumiBlock
{};
171
bool
m_doLowOccupancy
{};
172
bool
m_doHighOccupancy
{};
173
bool
m_doHeavyIonMon
{};
174
175
};
176
#endif
IDCInDetBSErrContainer.h
IInDetConditionsTool.h
IPixelReadoutManager.h
kNumErrorStatesFEI4
static const int kNumErrorStatesFEI4
Definition
PixelAthErrorMonAlg.h:33
error_names_cat_rodmod_norm
static constexpr std::array< const char *, 4 > error_names_cat_rodmod_norm
Definition
PixelAthErrorMonAlg.h:102
error_names_stateFEI4
static constexpr std::array< const char *, kNumErrorStatesFEI4 > error_names_stateFEI4
Definition
PixelAthErrorMonAlg.h:62
error_names_cat_norm
static constexpr std::array< const char *, ErrorCategory::COUNT > error_names_cat_norm
Definition
PixelAthErrorMonAlg.h:117
kNumErrorCatRODMods
static const int kNumErrorCatRODMods
Definition
PixelAthErrorMonAlg.h:129
error_names_cat_rodmod
static constexpr std::array< const char *, ErrorCategoryRODMOD::COUNT > error_names_cat_rodmod
Definition
PixelAthErrorMonAlg.h:92
numErrorStatesLayer
static const int numErrorStatesLayer[PixLayers::COUNT]
Definition
PixelAthErrorMonAlg.h:125
numErrorCatRODModsLayer
static const int numErrorCatRODModsLayer[PixLayers::COUNT]
Definition
PixelAthErrorMonAlg.h:132
kNumErrorStatesPerFE
static const int kNumErrorStatesPerFE
Definition
PixelAthErrorMonAlg.h:36
kNumErrorStatesFEI3
static const int kNumErrorStatesFEI3
Definition
PixelAthErrorMonAlg.h:30
error_names_cat
static constexpr std::array< const char *, ErrorCategory::COUNT > error_names_cat
Definition
PixelAthErrorMonAlg.h:109
error_names_stateFEI3
static constexpr std::array< const char *, kNumErrorStatesFEI3 > error_names_stateFEI3
Definition
PixelAthErrorMonAlg.h:42
nFEIBL2D
static const int nFEIBL2D
Definition
PixelAthErrorMonAlg.h:137
PixelAthMonitoringBase.h
PixelByteStreamErrors.h
ErrorCategoryRODMOD
Definition
PixelAthErrorMonAlg.h:23
ErrorCategoryRODMOD::ErrorCategoryRODMODID
ErrorCategoryRODMODID
Definition
PixelAthErrorMonAlg.h:25
ErrorCategoryRODMOD::kSeu
@ kSeu
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::kTruncMod
@ kTruncMod
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::kTruncROD
@ kTruncROD
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::kSyncMod
@ kSyncMod
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::kTout
@ kTout
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::kOpt
@ kOpt
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::kSyncROD
@ kSyncROD
Definition
PixelAthErrorMonAlg.h:26
ErrorCategoryRODMOD::COUNT
@ COUNT
Definition
PixelAthErrorMonAlg.h:26
ErrorCategory
Definition
PixelAthErrorMonAlg.h:16
ErrorCategory::ErrorCategoryID
ErrorCategoryID
Definition
PixelAthErrorMonAlg.h:18
ErrorCategory::COUNT
@ COUNT
Definition
PixelAthErrorMonAlg.h:19
ErrorCategory::kTout
@ kTout
Definition
PixelAthErrorMonAlg.h:19
ErrorCategory::kTrunc
@ kTrunc
Definition
PixelAthErrorMonAlg.h:19
ErrorCategory::kOpt
@ kOpt
Definition
PixelAthErrorMonAlg.h:19
ErrorCategory::kSync
@ kSync
Definition
PixelAthErrorMonAlg.h:19
ErrorCategory::kSeu
@ kSeu
Definition
PixelAthErrorMonAlg.h:19
PixLayers::COUNT
@ COUNT
Definition
PixelAthMonitoringBase.h:24
PixelAthErrorMonAlg::PixelAthErrorMonAlg
PixelAthErrorMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
PixelAthErrorMonAlg.cxx:12
PixelAthErrorMonAlg::getErrorStateFE
std::bitset< kNumErrorStatesFEI3 > getErrorStateFE(uint64_t errorword, bool isibl) const
Definition
PixelAthErrorMonAlg.cxx:439
PixelAthErrorMonAlg::m_doHighOccupancy
bool m_doHighOccupancy
Definition
PixelAthErrorMonAlg.h:172
PixelAthErrorMonAlg::isPerFEI3State
bool isPerFEI3State(const std::string &state) const
Definition
PixelAthErrorMonAlg.cxx:513
PixelAthErrorMonAlg::m_useByteStreamRD53
Gaudi::Property< bool > m_useByteStreamRD53
Definition
PixelAthErrorMonAlg.h:166
PixelAthErrorMonAlg::fillErrorCatRODmod
void fillErrorCatRODmod(uint64_t mod_errorword, int(&nerrors_cat_rodmod)[ErrorCategoryRODMOD::COUNT][nFEIBL2D]) const
Definition
PixelAthErrorMonAlg.cxx:465
PixelAthErrorMonAlg::initialize
virtual StatusCode initialize() override
initialize
Definition
PixelAthErrorMonAlg.cxx:26
PixelAthErrorMonAlg::m_idcErrContKey
SG::ReadHandleKey< IDCInDetBSErrContainer > m_idcErrContKey
Definition
PixelAthErrorMonAlg.h:160
PixelAthErrorMonAlg::m_useByteStreamFEI4
Gaudi::Property< bool > m_useByteStreamFEI4
Definition
PixelAthErrorMonAlg.h:162
PixelAthErrorMonAlg::m_doLumiBlock
bool m_doLumiBlock
Definition
PixelAthErrorMonAlg.h:170
PixelAthErrorMonAlg::m_doHeavyIonMon
bool m_doHeavyIonMon
Definition
PixelAthErrorMonAlg.h:173
PixelAthErrorMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition
PixelAthErrorMonAlg.cxx:35
PixelAthErrorMonAlg::getErrorCategory
int getErrorCategory(int error_cat_rodmod) const
Definition
PixelAthErrorMonAlg.cxx:416
PixelAthErrorMonAlg::m_useByteStreamFEI3
Gaudi::Property< bool > m_useByteStreamFEI3
Definition
PixelAthErrorMonAlg.h:164
PixelAthErrorMonAlg::~PixelAthErrorMonAlg
virtual ~PixelAthErrorMonAlg()
Definition
PixelAthErrorMonAlg.cxx:23
PixelAthErrorMonAlg::m_readoutTechnologyMask
unsigned int m_readoutTechnologyMask
Definition
PixelAthErrorMonAlg.h:168
PixelAthErrorMonAlg::getErrorStateFEI3Mod
std::bitset< kNumErrorStatesFEI3 > getErrorStateFEI3Mod(uint64_t errorword) const
Definition
PixelAthErrorMonAlg.cxx:427
PixelAthErrorMonAlg::m_doOnline
bool m_doOnline
Definition
PixelAthErrorMonAlg.h:169
PixelAthErrorMonAlg::m_doLowOccupancy
bool m_doLowOccupancy
Definition
PixelAthErrorMonAlg.h:171
PixelAthErrorMonAlg::findComponentString
std::string findComponentString(int bec, int ld) const
PixelID
This is an Identifier helper class for the Pixel subdetector.
Definition
PixelID.h:69
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
PixelAthMonitoringBase
Definition
PixelAthMonitoringBase.py:1
Generated on
for ATLAS Offline Software by
1.17.0