ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
14class PixelID;
15
17public:
21};
22
29
30static const int kNumErrorStatesFEI3 {
31 17
32};
33static const int kNumErrorStatesFEI4 {
34 27
35};
36static const int kNumErrorStatesPerFE {
37 5
38};
39
40// error states = enumerators of PixelByteStreamErrors and FEI4 SR's we care about
41//
42static 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
62static 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
92static 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
102static constexpr std::array<const char*, 4> error_names_cat_rodmod_norm {
103 "SyncErrorsModFracPerEvent",
104 "SyncErrorsRODFracPerEvent",
105 "TruncErrorsModFracPerEvent",
106 "TruncErrorsRODFracPerEvent"
107};
108
109static constexpr std::array<const char*, ErrorCategory::COUNT> error_names_cat {
110 "SyncErrors",
111 "TruncErrors",
112 "OpticalErrors",
113 "SEUErrors",
114 "TimeoutErrors"
115};
116
117static constexpr std::array<const char*, ErrorCategory::COUNT> error_names_cat_norm {
118 "SyncErrorsFracPerEvent",
119 "TruncationErrorsFracPerEvent",
120 "OpticalErrorsFracPerEvent",
121 "SEUErrorsFracPerEvent",
122 "TimeoutErrorsFracPerEvent"
123};
124
136
137static const int nFEIBL2D {
138 2
139};
140
142public:
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;
158private:
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
174
175};
176#endif
static const int kNumErrorStatesFEI4
static constexpr std::array< const char *, 4 > error_names_cat_rodmod_norm
static constexpr std::array< const char *, kNumErrorStatesFEI4 > error_names_stateFEI4
static constexpr std::array< const char *, ErrorCategory::COUNT > error_names_cat_norm
static const int kNumErrorCatRODMods
static constexpr std::array< const char *, ErrorCategoryRODMOD::COUNT > error_names_cat_rodmod
static const int numErrorStatesLayer[PixLayers::COUNT]
static const int numErrorCatRODModsLayer[PixLayers::COUNT]
static const int kNumErrorStatesPerFE
static const int kNumErrorStatesFEI3
static constexpr std::array< const char *, ErrorCategory::COUNT > error_names_cat
static constexpr std::array< const char *, kNumErrorStatesFEI3 > error_names_stateFEI3
static const int nFEIBL2D
PixelAthErrorMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
std::bitset< kNumErrorStatesFEI3 > getErrorStateFE(uint64_t errorword, bool isibl) const
bool isPerFEI3State(const std::string &state) const
Gaudi::Property< bool > m_useByteStreamRD53
void fillErrorCatRODmod(uint64_t mod_errorword, int(&nerrors_cat_rodmod)[ErrorCategoryRODMOD::COUNT][nFEIBL2D]) const
virtual StatusCode initialize() override
initialize
SG::ReadHandleKey< IDCInDetBSErrContainer > m_idcErrContKey
Gaudi::Property< bool > m_useByteStreamFEI4
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
int getErrorCategory(int error_cat_rodmod) const
Gaudi::Property< bool > m_useByteStreamFEI3
unsigned int m_readoutTechnologyMask
std::bitset< kNumErrorStatesFEI3 > getErrorStateFEI3Mod(uint64_t errorword) const
std::string findComponentString(int bec, int ld) const
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
Property holding a SG store/key/clid from which a ReadHandle is made.