ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloCalibConditions
TrigT1CaloCalibConditions
ChanCalibErrorCode.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGT1CALOCALIBCONDITIONS_CHANCALIBERRORCODE_H
6
#define TRIGT1CALOCALIBCONDITIONS_CHANCALIBERRORCODE_H
7
8
#include "
TrigT1CaloCalibConditions/AbstractErrorCode.h
"
9
10
#include <string>
11
#include <iosfwd>
12
20
21
class
ChanCalibErrorCode
:
public
AbstractErrorCode
{
22
23
friend
std::ostream&
operator<<
(std::ostream& output,
const
ChanCalibErrorCode
&
r
);
24
25
public
:
26
27
enum
ChanErrorCodeBits
{
28
// Bits 0-3 common for all calibrations
29
NoDataBit
=0,
30
BadDataBit
=1,
31
BadResultBit
=2,
32
33
// Specific bits (4-15) for PPM calibrations
34
35
// PPM DAC scan
36
DacScanBadSlopeBit
=4,
37
DacScanBadOffsetBit
=5,
38
DacScanBadCorrCoeffBit
=6,
39
DacScanBadAdcDistribBit
=7,
40
41
// PPM pedestal run
42
PedRunBadMeanBit
=4,
43
PedRunBadSigmaBit
=5,
44
PedRunBadAdcDistribBit
=6,
45
46
// PPM PHOS4 Scan
47
Phos4ScanNoSignalBit
=4,
48
Phos4ScanBadSignalBit
=5,
49
Phos4ScanBadWidthBit
=6,
50
Phos4ScanBadRiseTimeBit
=7,
51
Phos4ScanBadAdcDistribBit
=8,
52
Phos4ScanBadSignalShapeBit
=9,
53
Phos4ScanSignalSaturatedBit
=10,
54
55
56
// Specific bits (4-15) for CPM calibrations
57
// (none defined yet)
58
59
// Specific bits (4-15) for JEM calibrations
60
TotalWindowSizeUndercutBit
=5,
61
DistToErrorRegionUndercutBit
=6,
62
ExceededDelayBit
=7,
63
ExceededDelayAfterCorrBit
=8
64
65
// Specific bits (4-15) for CMM calibrations
66
// (none defined yet)
67
68
// Bits 16-31 are used as copies of 0-3
69
// for component calibrations when combined
70
// several results into one validated folder.
71
};
72
73
enum
ChanErrorComponent
{
74
// NB the maximum allowed value here is 7.
75
// Components of PPrChanCalib folder.
76
DacScan
=0,
77
PedestalRun
=1,
78
CoarseTiming
=2,
79
Phos4Scan
=3,
80
SatBcidValues
=4,
81
FirFilterValues
=5,
82
LutValues
=6
83
};
84
85
86
// Identifies the various sets of specific bits
87
// (only used for printing the meaning of the bits).
88
enum
ChanErrorSet
{
89
PPM
=0,
90
CPM
=1,
91
JEM
=2,
92
CMM
=3
93
};
94
95
ChanCalibErrorCode
();
96
ChanCalibErrorCode
(
unsigned
int
errorCode
);
97
virtual
~ChanCalibErrorCode
() {}
98
99
ChanCalibErrorCode
(
const
ChanCalibErrorCode
& e);
100
ChanCalibErrorCode
&
operator=
(
const
ChanCalibErrorCode
& e);
101
ChanCalibErrorCode
&
operator=
(
ChanCalibErrorCode
&&) noexcept = default;
102
ChanCalibErrorCode
& operator|=(
const
ChanCalibErrorCode
& e);
103
104
using
AbstractErrorCode
::
errorCode
;
105
unsigned
int
errorCode
(
ChanErrorComponent
component)
const
;
106
107
bool
chanValid
()
const
;
108
bool
chanValid
(
ChanErrorComponent
component)
const
;
109
110
bool
noData
()
const
{
return
bitIsSet
(
NoDataBit
); }
111
void
noData
(
bool
nodata) {
setBit
(
NoDataBit
,nodata); }
112
113
bool
badData
()
const
{
return
bitIsSet
(
BadDataBit
); }
114
void
badData
(
bool
bad
) {
setBit
(
BadDataBit
,
bad
); }
115
116
bool
badResult
()
const
{
return
bitIsSet
(
BadResultBit
); }
117
void
badResult
(
bool
bad
) {
setBit
(
BadResultBit
,
bad
); }
118
119
bool
dacScanBadSlope
()
const
{
return
bitIsSet
(
DacScanBadSlopeBit
); }
120
void
dacScanBadSlope
(
bool
bad
) {
setBit
(
DacScanBadSlopeBit
,
bad
); }
121
122
bool
dacScanBadOffset
()
const
{
return
bitIsSet
(
DacScanBadOffsetBit
); }
123
void
dacScanBadOffset
(
bool
bad
) {
setBit
(
DacScanBadOffsetBit
,
bad
); }
124
125
bool
dacScanBadCorrCoeff
()
const
{
return
bitIsSet
(
DacScanBadCorrCoeffBit
); }
126
void
dacScanBadCorrCoeff
(
bool
bad
) {
setBit
(
DacScanBadCorrCoeffBit
,
bad
); }
127
128
bool
dacScanBadAdcDistrib
()
const
{
return
bitIsSet
(
DacScanBadAdcDistribBit
); }
129
void
dacScanBadAdcDistrib
(
bool
bad
) {
setBit
(
DacScanBadAdcDistribBit
,
bad
); }
130
131
bool
pedRunBadMean
()
const
{
return
bitIsSet
(
PedRunBadMeanBit
); }
132
void
pedRunBadMean
(
bool
bad
) {
setBit
(
PedRunBadMeanBit
,
bad
); }
133
134
bool
pedRunBadSigma
()
const
{
return
bitIsSet
(
PedRunBadSigmaBit
); }
135
void
pedRunBadSigma
(
bool
bad
) {
setBit
(
PedRunBadSigmaBit
,
bad
); }
136
137
bool
pedRunBadAdcDistrib
()
const
{
return
bitIsSet
(
PedRunBadAdcDistribBit
); }
138
void
pedRunBadAdcDistrib
(
bool
bad
) {
setBit
(
PedRunBadAdcDistribBit
,
bad
); }
139
140
bool
phos4ScanNoSignal
()
const
{
return
bitIsSet
(
Phos4ScanNoSignalBit
); }
141
void
phos4ScanNoSignal
(
bool
bad
) {
setBit
(
Phos4ScanNoSignalBit
,
bad
); }
142
143
bool
phos4ScanBadSignal
()
const
{
return
bitIsSet
(
Phos4ScanBadSignalBit
); }
144
void
phos4ScanBadSignal
(
bool
bad
) {
setBit
(
Phos4ScanBadSignalBit
,
bad
); }
145
146
bool
phos4ScanBadWidth
()
const
{
return
bitIsSet
(
Phos4ScanBadWidthBit
); }
147
void
phos4ScanBadWidth
(
bool
bad
) {
setBit
(
Phos4ScanBadWidthBit
,
bad
); }
148
149
bool
phos4ScanBadRiseTime
()
const
{
return
bitIsSet
(
Phos4ScanBadRiseTimeBit
); }
150
void
phos4ScanBadRiseTime
(
bool
bad
) {
setBit
(
Phos4ScanBadRiseTimeBit
,
bad
); }
151
152
bool
phos4ScanBadAdcDistrib
()
const
{
return
bitIsSet
(
Phos4ScanBadAdcDistribBit
); }
153
void
phos4ScanBadAdcDistrib
(
bool
bad
) {
setBit
(
Phos4ScanBadAdcDistribBit
,
bad
); }
154
155
bool
phos4ScanBadSignalShape
()
const
{
return
bitIsSet
(
Phos4ScanBadSignalShapeBit
); }
156
void
phos4ScanBadSignalShape
(
bool
bad
) {
setBit
(
Phos4ScanBadSignalShapeBit
,
bad
); }
157
158
bool
phos4ScanSignalSaturated
()
const
{
return
bitIsSet
(
Phos4ScanSignalSaturatedBit
); }
159
void
phos4ScanSignalSaturated
(
bool
bad
) {
setBit
(
Phos4ScanSignalSaturatedBit
,
bad
); }
160
161
bool
totalWindowSizeUndercut
()
const
{
return
bitIsSet
(
TotalWindowSizeUndercutBit
); }
162
void
totalWindowSizeUndercut
(
bool
undercut) {
setBit
(
TotalWindowSizeUndercutBit
,undercut);
setBad
(); }
163
164
bool
distToErrorRegionUndercut
()
const
{
return
bitIsSet
(
DistToErrorRegionUndercutBit
); }
165
void
distToErrorRegionUndercut
(
bool
undercut) {
setBit
(
DistToErrorRegionUndercutBit
,undercut);
setBad
(); }
166
167
bool
exceededDelay
()
const
{
return
bitIsSet
(
ExceededDelayBit
); }
168
void
exceededDelay
(
bool
exceeded ){
setBit
(
ExceededDelayBit
,exceeded);
setBad
(); }
169
170
bool
exceededDelayAfterCorr
()
const
{
return
bitIsSet
(
ExceededDelayAfterCorrBit
); }
171
void
exceededDelayAfterCorr
(
bool
exceeded ) {
setBit
(
ExceededDelayAfterCorrBit
,exceeded);
setBad
(); }
172
173
std::string
printStatus
(
ChanErrorSet
spec)
const
;
174
175
protected
:
176
void
setBad
() {
setBit
(
BadDataBit
,
true
); }
177
};
178
179
#endif
180
181
AbstractErrorCode.h
bad
@ bad
Definition
SUSYToolsTester.cxx:95
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition
AbstractErrorCode.cxx:7
AbstractErrorCode::setBit
void setBit(unsigned int number, bool value)
Definition
AbstractErrorCode.cxx:15
AbstractErrorCode::AbstractErrorCode
AbstractErrorCode(unsigned int errorCode)
Definition
AbstractErrorCode.h:24
ChanCalibErrorCode
ChanCalibErrorCode class for L1Calo error codes Adapted from /LVL1/l1calo/coolL1Calo/coolL1Calo/ChanE...
Definition
ChanCalibErrorCode.h:21
ChanCalibErrorCode::chanValid
bool chanValid() const
Checks if channel is valid, ie.
Definition
ChanCalibErrorCode.cxx:46
ChanCalibErrorCode::pedRunBadSigma
void pedRunBadSigma(bool bad)
Definition
ChanCalibErrorCode.h:135
ChanCalibErrorCode::dacScanBadSlope
bool dacScanBadSlope() const
Definition
ChanCalibErrorCode.h:119
ChanCalibErrorCode::pedRunBadMean
void pedRunBadMean(bool bad)
Definition
ChanCalibErrorCode.h:132
ChanCalibErrorCode::printStatus
std::string printStatus(ChanErrorSet spec) const
Definition
ChanCalibErrorCode.cxx:62
ChanCalibErrorCode::phos4ScanBadWidth
bool phos4ScanBadWidth() const
Definition
ChanCalibErrorCode.h:146
ChanCalibErrorCode::pedRunBadMean
bool pedRunBadMean() const
Definition
ChanCalibErrorCode.h:131
ChanCalibErrorCode::phos4ScanSignalSaturated
void phos4ScanSignalSaturated(bool bad)
Definition
ChanCalibErrorCode.h:159
ChanCalibErrorCode::badData
bool badData() const
Definition
ChanCalibErrorCode.h:113
ChanCalibErrorCode::ChanCalibErrorCode
ChanCalibErrorCode()
Definition
ChanCalibErrorCode.cxx:12
ChanCalibErrorCode::phos4ScanBadSignal
bool phos4ScanBadSignal() const
Definition
ChanCalibErrorCode.h:143
ChanCalibErrorCode::dacScanBadCorrCoeff
bool dacScanBadCorrCoeff() const
Definition
ChanCalibErrorCode.h:125
ChanCalibErrorCode::noData
bool noData() const
Definition
ChanCalibErrorCode.h:110
ChanCalibErrorCode::badData
void badData(bool bad)
Definition
ChanCalibErrorCode.h:114
ChanCalibErrorCode::dacScanBadAdcDistrib
bool dacScanBadAdcDistrib() const
Definition
ChanCalibErrorCode.h:128
ChanCalibErrorCode::phos4ScanBadSignal
void phos4ScanBadSignal(bool bad)
Definition
ChanCalibErrorCode.h:144
ChanCalibErrorCode::pedRunBadSigma
bool pedRunBadSigma() const
Definition
ChanCalibErrorCode.h:134
ChanCalibErrorCode::phos4ScanBadSignalShape
bool phos4ScanBadSignalShape() const
Definition
ChanCalibErrorCode.h:155
ChanCalibErrorCode::exceededDelayAfterCorr
void exceededDelayAfterCorr(bool exceeded)
Definition
ChanCalibErrorCode.h:171
ChanCalibErrorCode::setBad
void setBad()
Definition
ChanCalibErrorCode.h:176
ChanCalibErrorCode::ChanErrorSet
ChanErrorSet
Definition
ChanCalibErrorCode.h:88
ChanCalibErrorCode::JEM
@ JEM
Definition
ChanCalibErrorCode.h:91
ChanCalibErrorCode::CMM
@ CMM
Definition
ChanCalibErrorCode.h:92
ChanCalibErrorCode::PPM
@ PPM
Definition
ChanCalibErrorCode.h:89
ChanCalibErrorCode::CPM
@ CPM
Definition
ChanCalibErrorCode.h:90
ChanCalibErrorCode::badResult
bool badResult() const
Definition
ChanCalibErrorCode.h:116
ChanCalibErrorCode::dacScanBadAdcDistrib
void dacScanBadAdcDistrib(bool bad)
Definition
ChanCalibErrorCode.h:129
ChanCalibErrorCode::exceededDelay
bool exceededDelay() const
Definition
ChanCalibErrorCode.h:167
ChanCalibErrorCode::operator<<
friend std::ostream & operator<<(std::ostream &output, const ChanCalibErrorCode &r)
Definition
ChanCalibErrorCode.cxx:96
ChanCalibErrorCode::distToErrorRegionUndercut
void distToErrorRegionUndercut(bool undercut)
Definition
ChanCalibErrorCode.h:165
ChanCalibErrorCode::exceededDelay
void exceededDelay(bool exceeded)
Definition
ChanCalibErrorCode.h:168
ChanCalibErrorCode::errorCode
unsigned int errorCode() const
Definition
AbstractErrorCode.h:21
ChanCalibErrorCode::totalWindowSizeUndercut
bool totalWindowSizeUndercut() const
Definition
ChanCalibErrorCode.h:161
ChanCalibErrorCode::dacScanBadOffset
bool dacScanBadOffset() const
Definition
ChanCalibErrorCode.h:122
ChanCalibErrorCode::errorCode
unsigned int errorCode(ChanErrorComponent component) const
Definition
ChanCalibErrorCode.cxx:34
ChanCalibErrorCode::dacScanBadOffset
void dacScanBadOffset(bool bad)
Definition
ChanCalibErrorCode.h:123
ChanCalibErrorCode::noData
void noData(bool nodata)
Definition
ChanCalibErrorCode.h:111
ChanCalibErrorCode::distToErrorRegionUndercut
bool distToErrorRegionUndercut() const
Definition
ChanCalibErrorCode.h:164
ChanCalibErrorCode::totalWindowSizeUndercut
void totalWindowSizeUndercut(bool undercut)
Definition
ChanCalibErrorCode.h:162
ChanCalibErrorCode::pedRunBadAdcDistrib
bool pedRunBadAdcDistrib() const
Definition
ChanCalibErrorCode.h:137
ChanCalibErrorCode::phos4ScanBadRiseTime
void phos4ScanBadRiseTime(bool bad)
Definition
ChanCalibErrorCode.h:150
ChanCalibErrorCode::dacScanBadSlope
void dacScanBadSlope(bool bad)
Definition
ChanCalibErrorCode.h:120
ChanCalibErrorCode::operator=
ChanCalibErrorCode & operator=(const ChanCalibErrorCode &e)
Definition
ChanCalibErrorCode.cxx:21
ChanCalibErrorCode::phos4ScanBadAdcDistrib
void phos4ScanBadAdcDistrib(bool bad)
Definition
ChanCalibErrorCode.h:153
ChanCalibErrorCode::phos4ScanBadRiseTime
bool phos4ScanBadRiseTime() const
Definition
ChanCalibErrorCode.h:149
ChanCalibErrorCode::exceededDelayAfterCorr
bool exceededDelayAfterCorr() const
Definition
ChanCalibErrorCode.h:170
ChanCalibErrorCode::operator=
ChanCalibErrorCode & operator=(ChanCalibErrorCode &&) noexcept=default
ChanCalibErrorCode::pedRunBadAdcDistrib
void pedRunBadAdcDistrib(bool bad)
Definition
ChanCalibErrorCode.h:138
ChanCalibErrorCode::phos4ScanSignalSaturated
bool phos4ScanSignalSaturated() const
Definition
ChanCalibErrorCode.h:158
ChanCalibErrorCode::dacScanBadCorrCoeff
void dacScanBadCorrCoeff(bool bad)
Definition
ChanCalibErrorCode.h:126
ChanCalibErrorCode::phos4ScanNoSignal
bool phos4ScanNoSignal() const
Definition
ChanCalibErrorCode.h:140
ChanCalibErrorCode::phos4ScanBadAdcDistrib
bool phos4ScanBadAdcDistrib() const
Definition
ChanCalibErrorCode.h:152
ChanCalibErrorCode::ChanErrorCodeBits
ChanErrorCodeBits
Definition
ChanCalibErrorCode.h:27
ChanCalibErrorCode::ExceededDelayAfterCorrBit
@ ExceededDelayAfterCorrBit
Definition
ChanCalibErrorCode.h:63
ChanCalibErrorCode::DacScanBadOffsetBit
@ DacScanBadOffsetBit
Definition
ChanCalibErrorCode.h:37
ChanCalibErrorCode::DacScanBadSlopeBit
@ DacScanBadSlopeBit
Definition
ChanCalibErrorCode.h:36
ChanCalibErrorCode::Phos4ScanBadAdcDistribBit
@ Phos4ScanBadAdcDistribBit
Definition
ChanCalibErrorCode.h:51
ChanCalibErrorCode::Phos4ScanBadSignalShapeBit
@ Phos4ScanBadSignalShapeBit
Definition
ChanCalibErrorCode.h:52
ChanCalibErrorCode::BadDataBit
@ BadDataBit
Definition
ChanCalibErrorCode.h:30
ChanCalibErrorCode::Phos4ScanBadWidthBit
@ Phos4ScanBadWidthBit
Definition
ChanCalibErrorCode.h:49
ChanCalibErrorCode::Phos4ScanNoSignalBit
@ Phos4ScanNoSignalBit
Definition
ChanCalibErrorCode.h:47
ChanCalibErrorCode::DacScanBadAdcDistribBit
@ DacScanBadAdcDistribBit
Definition
ChanCalibErrorCode.h:39
ChanCalibErrorCode::BadResultBit
@ BadResultBit
Definition
ChanCalibErrorCode.h:31
ChanCalibErrorCode::PedRunBadSigmaBit
@ PedRunBadSigmaBit
Definition
ChanCalibErrorCode.h:43
ChanCalibErrorCode::DistToErrorRegionUndercutBit
@ DistToErrorRegionUndercutBit
Definition
ChanCalibErrorCode.h:61
ChanCalibErrorCode::DacScanBadCorrCoeffBit
@ DacScanBadCorrCoeffBit
Definition
ChanCalibErrorCode.h:38
ChanCalibErrorCode::PedRunBadAdcDistribBit
@ PedRunBadAdcDistribBit
Definition
ChanCalibErrorCode.h:44
ChanCalibErrorCode::Phos4ScanBadRiseTimeBit
@ Phos4ScanBadRiseTimeBit
Definition
ChanCalibErrorCode.h:50
ChanCalibErrorCode::Phos4ScanBadSignalBit
@ Phos4ScanBadSignalBit
Definition
ChanCalibErrorCode.h:48
ChanCalibErrorCode::TotalWindowSizeUndercutBit
@ TotalWindowSizeUndercutBit
Definition
ChanCalibErrorCode.h:60
ChanCalibErrorCode::NoDataBit
@ NoDataBit
Definition
ChanCalibErrorCode.h:29
ChanCalibErrorCode::ExceededDelayBit
@ ExceededDelayBit
Definition
ChanCalibErrorCode.h:62
ChanCalibErrorCode::Phos4ScanSignalSaturatedBit
@ Phos4ScanSignalSaturatedBit
Definition
ChanCalibErrorCode.h:53
ChanCalibErrorCode::PedRunBadMeanBit
@ PedRunBadMeanBit
Definition
ChanCalibErrorCode.h:42
ChanCalibErrorCode::phos4ScanBadSignalShape
void phos4ScanBadSignalShape(bool bad)
Definition
ChanCalibErrorCode.h:156
ChanCalibErrorCode::phos4ScanBadWidth
void phos4ScanBadWidth(bool bad)
Definition
ChanCalibErrorCode.h:147
ChanCalibErrorCode::badResult
void badResult(bool bad)
Definition
ChanCalibErrorCode.h:117
ChanCalibErrorCode::phos4ScanNoSignal
void phos4ScanNoSignal(bool bad)
Definition
ChanCalibErrorCode.h:141
ChanCalibErrorCode::ChanErrorComponent
ChanErrorComponent
Definition
ChanCalibErrorCode.h:73
ChanCalibErrorCode::DacScan
@ DacScan
Definition
ChanCalibErrorCode.h:76
ChanCalibErrorCode::LutValues
@ LutValues
Definition
ChanCalibErrorCode.h:82
ChanCalibErrorCode::PedestalRun
@ PedestalRun
Definition
ChanCalibErrorCode.h:77
ChanCalibErrorCode::SatBcidValues
@ SatBcidValues
Definition
ChanCalibErrorCode.h:80
ChanCalibErrorCode::Phos4Scan
@ Phos4Scan
Definition
ChanCalibErrorCode.h:79
ChanCalibErrorCode::CoarseTiming
@ CoarseTiming
Definition
ChanCalibErrorCode.h:78
ChanCalibErrorCode::FirFilterValues
@ FirFilterValues
Definition
ChanCalibErrorCode.h:81
ChanCalibErrorCode::~ChanCalibErrorCode
virtual ~ChanCalibErrorCode()
Definition
ChanCalibErrorCode.h:97
r
int r
Definition
globals.cxx:22
const
Generated on
for ATLAS Offline Software by
1.17.0