ATLAS Offline Software
Loading...
Searching...
No Matches
ChanCalibErrorCode.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGT1CALOCALIBCONDITIONS_CHANCALIBERRORCODE_H
6#define TRIGT1CALOCALIBCONDITIONS_CHANCALIBERRORCODE_H
7
9
10#include <string>
11
19
21
22 friend std::ostream& operator<<(std::ostream& output, const ChanCalibErrorCode& r);
23
24public:
25
27 // Bits 0-3 common for all calibrations
31
32 // Specific bits (4-15) for PPM calibrations
33
34 // PPM DAC scan
39
40 // PPM pedestal run
44
45 // PPM PHOS4 Scan
53
54
55 // Specific bits (4-15) for CPM calibrations
56 // (none defined yet)
57
58 // Specific bits (4-15) for JEM calibrations
63
64 // Specific bits (4-15) for CMM calibrations
65 // (none defined yet)
66
67 // Bits 16-31 are used as copies of 0-3
68 // for component calibrations when combined
69 // several results into one validated folder.
70 };
71
73 // NB the maximum allowed value here is 7.
74 // Components of PPrChanCalib folder.
82 };
83
84
85 // Identifies the various sets of specific bits
86 // (only used for printing the meaning of the bits).
88 PPM=0,
89 CPM=1,
90 JEM=2,
92 };
93
95 ChanCalibErrorCode(unsigned int errorCode);
97
101
103 unsigned int errorCode(ChanErrorComponent component) const;
104
105 bool chanValid() const;
106 bool chanValid(ChanErrorComponent component) const;
107
108 bool noData() const { return bitIsSet(NoDataBit); }
109 void noData(bool nodata) { setBit(NoDataBit,nodata); }
110
111 bool badData() const { return bitIsSet(BadDataBit); }
112 void badData(bool bad) { setBit(BadDataBit,bad); }
113
114 bool badResult() const { return bitIsSet(BadResultBit); }
116
119
122
125
128
129 bool pedRunBadMean() const { return bitIsSet(PedRunBadMeanBit); }
131
132 bool pedRunBadSigma() const { return bitIsSet(PedRunBadSigmaBit); }
134
137
140
143
146
149
152
155
158
161
164
165 bool exceededDelay() const { return bitIsSet(ExceededDelayBit); }
166 void exceededDelay(bool exceeded ){ setBit(ExceededDelayBit,exceeded); setBad(); }
167
169 void exceededDelayAfterCorr(bool exceeded ) { setBit(ExceededDelayAfterCorrBit,exceeded); setBad(); }
170
171 std::string printStatus(ChanErrorSet spec) const;
172
173protected:
174 void setBad() { setBit(BadDataBit,true); }
175};
176
177#endif
178
179
bool bitIsSet(unsigned int number) const
void setBit(unsigned int number, bool value)
unsigned int errorCode() const
AbstractErrorCode(unsigned int errorCode)
ChanCalibErrorCode class for L1Calo error codes Adapted from /LVL1/l1calo/coolL1Calo/coolL1Calo/ChanE...
bool chanValid() const
Checks if channel is valid, ie.
void pedRunBadSigma(bool bad)
void pedRunBadMean(bool bad)
std::string printStatus(ChanErrorSet spec) const
bool phos4ScanBadWidth() const
void phos4ScanSignalSaturated(bool bad)
bool phos4ScanBadSignal() const
bool dacScanBadCorrCoeff() const
bool dacScanBadAdcDistrib() const
void phos4ScanBadSignal(bool bad)
bool phos4ScanBadSignalShape() const
void exceededDelayAfterCorr(bool exceeded)
void dacScanBadAdcDistrib(bool bad)
friend std::ostream & operator<<(std::ostream &output, const ChanCalibErrorCode &r)
void distToErrorRegionUndercut(bool undercut)
void exceededDelay(bool exceeded)
unsigned int errorCode() const
bool totalWindowSizeUndercut() const
bool dacScanBadOffset() const
void dacScanBadOffset(bool bad)
void noData(bool nodata)
bool distToErrorRegionUndercut() const
void totalWindowSizeUndercut(bool undercut)
bool pedRunBadAdcDistrib() const
void phos4ScanBadRiseTime(bool bad)
void dacScanBadSlope(bool bad)
ChanCalibErrorCode & operator=(const ChanCalibErrorCode &e)
void phos4ScanBadAdcDistrib(bool bad)
bool phos4ScanBadRiseTime() const
bool exceededDelayAfterCorr() const
void pedRunBadAdcDistrib(bool bad)
bool phos4ScanSignalSaturated() const
void dacScanBadCorrCoeff(bool bad)
bool phos4ScanNoSignal() const
bool phos4ScanBadAdcDistrib() const
void phos4ScanBadSignalShape(bool bad)
void phos4ScanBadWidth(bool bad)
void phos4ScanNoSignal(bool bad)
ChanCalibErrorCode & operator|=(const ChanCalibErrorCode &e)
int r
Definition globals.cxx:22