ATLAS Offline Software
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 
21 
22  friend std::ostream& operator<<(std::ostream& output, const ChanCalibErrorCode& r);
23 
24 public:
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.
81  LutValues=6
82  };
83 
84 
85  // Identifies the various sets of specific bits
86  // (only used for printing the meaning of the bits).
87  enum ChanErrorSet {
88  PPM=0,
89  CPM=1,
90  JEM=2,
91  CMM=3
92  };
93 
95  ChanCalibErrorCode(unsigned int errorCode);
96  virtual ~ChanCalibErrorCode() {}
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 
117  bool dacScanBadSlope() const { return bitIsSet(DacScanBadSlopeBit); }
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 
160  void totalWindowSizeUndercut(bool undercut) { setBit(TotalWindowSizeUndercutBit,undercut); setBad(); }
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 
173 protected:
174  void setBad() { setBit(BadDataBit,true); }
175 };
176 
177 #endif
178 
179 
ChanCalibErrorCode::phos4ScanBadAdcDistrib
bool phos4ScanBadAdcDistrib() const
Definition: ChanCalibErrorCode.h:150
bad
@ bad
Definition: SUSYToolsTester.cxx:100
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
ChanCalibErrorCode::phos4ScanSignalSaturated
bool phos4ScanSignalSaturated() const
Definition: ChanCalibErrorCode.h:156
ChanCalibErrorCode::Phos4ScanBadWidthBit
@ Phos4ScanBadWidthBit
Definition: ChanCalibErrorCode.h:48
ChanCalibErrorCode::dacScanBadOffset
bool dacScanBadOffset() const
Definition: ChanCalibErrorCode.h:120
ChanCalibErrorCode::setBad
void setBad()
Definition: ChanCalibErrorCode.h:174
AbstractErrorCode::setBit
void setBit(unsigned int number, bool value)
Definition: AbstractErrorCode.cxx:15
ChanCalibErrorCode::phos4ScanBadWidth
void phos4ScanBadWidth(bool bad)
Definition: ChanCalibErrorCode.h:145
ChanCalibErrorCode::phos4ScanNoSignal
bool phos4ScanNoSignal() const
Definition: ChanCalibErrorCode.h:138
AbstractErrorCode::errorCode
unsigned int errorCode() const
Definition: AbstractErrorCode.h:21
ChanCalibErrorCode::DacScanBadSlopeBit
@ DacScanBadSlopeBit
Definition: ChanCalibErrorCode.h:35
ChanCalibErrorCode::operator=
ChanCalibErrorCode & operator=(const ChanCalibErrorCode &e)
Definition: ChanCalibErrorCode.cxx:21
ChanCalibErrorCode::pedRunBadMean
bool pedRunBadMean() const
Definition: ChanCalibErrorCode.h:129
ChanCalibErrorCode::PedRunBadMeanBit
@ PedRunBadMeanBit
Definition: ChanCalibErrorCode.h:41
ChanCalibErrorCode::SatBcidValues
@ SatBcidValues
Definition: ChanCalibErrorCode.h:79
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:47
ChanCalibErrorCode::PedRunBadSigmaBit
@ PedRunBadSigmaBit
Definition: ChanCalibErrorCode.h:42
ChanCalibErrorCode::ChanErrorSet
ChanErrorSet
Definition: ChanCalibErrorCode.h:87
ChanCalibErrorCode::pedRunBadAdcDistrib
void pedRunBadAdcDistrib(bool bad)
Definition: ChanCalibErrorCode.h:136
ChanCalibErrorCode::dacScanBadSlope
void dacScanBadSlope(bool bad)
Definition: ChanCalibErrorCode.h:118
ChanCalibErrorCode::phos4ScanBadSignal
bool phos4ScanBadSignal() const
Definition: ChanCalibErrorCode.h:141
ChanCalibErrorCode::phos4ScanBadAdcDistrib
void phos4ScanBadAdcDistrib(bool bad)
Definition: ChanCalibErrorCode.h:151
ChanCalibErrorCode::totalWindowSizeUndercut
void totalWindowSizeUndercut(bool undercut)
Definition: ChanCalibErrorCode.h:160
ChanCalibErrorCode::phos4ScanBadRiseTime
void phos4ScanBadRiseTime(bool bad)
Definition: ChanCalibErrorCode.h:148
ChanCalibErrorCode::DacScan
@ DacScan
Definition: ChanCalibErrorCode.h:75
ChanCalibErrorCode::chanValid
bool chanValid() const
Checks if channel is valid, ie.
Definition: ChanCalibErrorCode.cxx:46
ChanCalibErrorCode
ChanCalibErrorCode class for L1Calo error codes Adapted from /LVL1/l1calo/coolL1Calo/coolL1Calo/ChanE...
Definition: ChanCalibErrorCode.h:20
ChanCalibErrorCode::distToErrorRegionUndercut
bool distToErrorRegionUndercut() const
Definition: ChanCalibErrorCode.h:162
ChanCalibErrorCode::totalWindowSizeUndercut
bool totalWindowSizeUndercut() const
Definition: ChanCalibErrorCode.h:159
ChanCalibErrorCode::DacScanBadCorrCoeffBit
@ DacScanBadCorrCoeffBit
Definition: ChanCalibErrorCode.h:37
ChanCalibErrorCode::CoarseTiming
@ CoarseTiming
Definition: ChanCalibErrorCode.h:77
ChanCalibErrorCode::badData
void badData(bool bad)
Definition: ChanCalibErrorCode.h:112
ChanCalibErrorCode::phos4ScanBadSignalShape
bool phos4ScanBadSignalShape() const
Definition: ChanCalibErrorCode.h:153
ChanCalibErrorCode::ChanCalibErrorCode
ChanCalibErrorCode()
Definition: ChanCalibErrorCode.cxx:12
ChanCalibErrorCode::phos4ScanBadRiseTime
bool phos4ScanBadRiseTime() const
Definition: ChanCalibErrorCode.h:147
ChanCalibErrorCode::pedRunBadSigma
bool pedRunBadSigma() const
Definition: ChanCalibErrorCode.h:132
ChanCalibErrorCode::~ChanCalibErrorCode
virtual ~ChanCalibErrorCode()
Definition: ChanCalibErrorCode.h:96
ChanCalibErrorCode::badResult
bool badResult() const
Definition: ChanCalibErrorCode.h:114
ChanCalibErrorCode::dacScanBadCorrCoeff
bool dacScanBadCorrCoeff() const
Definition: ChanCalibErrorCode.h:123
ChanCalibErrorCode::Phos4Scan
@ Phos4Scan
Definition: ChanCalibErrorCode.h:78
ChanCalibErrorCode::exceededDelay
bool exceededDelay() const
Definition: ChanCalibErrorCode.h:165
ChanCalibErrorCode::pedRunBadMean
void pedRunBadMean(bool bad)
Definition: ChanCalibErrorCode.h:130
ChanCalibErrorCode::NoDataBit
@ NoDataBit
Definition: ChanCalibErrorCode.h:28
ChanCalibErrorCode::CMM
@ CMM
Definition: ChanCalibErrorCode.h:91
ChanCalibErrorCode::pedRunBadSigma
void pedRunBadSigma(bool bad)
Definition: ChanCalibErrorCode.h:133
ChanCalibErrorCode::BadDataBit
@ BadDataBit
Definition: ChanCalibErrorCode.h:29
ChanCalibErrorCode::Phos4ScanBadSignalShapeBit
@ Phos4ScanBadSignalShapeBit
Definition: ChanCalibErrorCode.h:51
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
ChanCalibErrorCode::DacScanBadAdcDistribBit
@ DacScanBadAdcDistribBit
Definition: ChanCalibErrorCode.h:38
ChanCalibErrorCode::phos4ScanNoSignal
void phos4ScanNoSignal(bool bad)
Definition: ChanCalibErrorCode.h:139
ChanCalibErrorCode::printStatus
std::string printStatus(ChanErrorSet spec) const
Definition: ChanCalibErrorCode.cxx:62
ChanCalibErrorCode::PPM
@ PPM
Definition: ChanCalibErrorCode.h:88
ChanCalibErrorCode::phos4ScanBadSignalShape
void phos4ScanBadSignalShape(bool bad)
Definition: ChanCalibErrorCode.h:154
ChanCalibErrorCode::LutValues
@ LutValues
Definition: ChanCalibErrorCode.h:81
ChanCalibErrorCode::exceededDelayAfterCorr
void exceededDelayAfterCorr(bool exceeded)
Definition: ChanCalibErrorCode.h:169
merge.output
output
Definition: merge.py:17
ChanCalibErrorCode::distToErrorRegionUndercut
void distToErrorRegionUndercut(bool undercut)
Definition: ChanCalibErrorCode.h:163
ChanCalibErrorCode::CPM
@ CPM
Definition: ChanCalibErrorCode.h:89
ChanCalibErrorCode::badResult
void badResult(bool bad)
Definition: ChanCalibErrorCode.h:115
ChanCalibErrorCode::phos4ScanBadWidth
bool phos4ScanBadWidth() const
Definition: ChanCalibErrorCode.h:144
ChanCalibErrorCode::noData
bool noData() const
Definition: ChanCalibErrorCode.h:108
ChanCalibErrorCode::PedRunBadAdcDistribBit
@ PedRunBadAdcDistribBit
Definition: ChanCalibErrorCode.h:43
ChanCalibErrorCode::pedRunBadAdcDistrib
bool pedRunBadAdcDistrib() const
Definition: ChanCalibErrorCode.h:135
ChanCalibErrorCode::DacScanBadOffsetBit
@ DacScanBadOffsetBit
Definition: ChanCalibErrorCode.h:36
ChanCalibErrorCode::PedestalRun
@ PedestalRun
Definition: ChanCalibErrorCode.h:76
ChanCalibErrorCode::ExceededDelayAfterCorrBit
@ ExceededDelayAfterCorrBit
Definition: ChanCalibErrorCode.h:62
ChanCalibErrorCode::operator|=
ChanCalibErrorCode & operator|=(const ChanCalibErrorCode &e)
Definition: ChanCalibErrorCode.cxx:27
ChanCalibErrorCode::dacScanBadCorrCoeff
void dacScanBadCorrCoeff(bool bad)
Definition: ChanCalibErrorCode.h:124
ChanCalibErrorCode::ChanErrorComponent
ChanErrorComponent
Definition: ChanCalibErrorCode.h:72
ChanCalibErrorCode::dacScanBadSlope
bool dacScanBadSlope() const
Definition: ChanCalibErrorCode.h:117
ChanCalibErrorCode::TotalWindowSizeUndercutBit
@ TotalWindowSizeUndercutBit
Definition: ChanCalibErrorCode.h:59
ChanCalibErrorCode::Phos4ScanBadRiseTimeBit
@ Phos4ScanBadRiseTimeBit
Definition: ChanCalibErrorCode.h:49
ChanCalibErrorCode::exceededDelay
void exceededDelay(bool exceeded)
Definition: ChanCalibErrorCode.h:166
ChanCalibErrorCode::ExceededDelayBit
@ ExceededDelayBit
Definition: ChanCalibErrorCode.h:61
ChanCalibErrorCode::phos4ScanBadSignal
void phos4ScanBadSignal(bool bad)
Definition: ChanCalibErrorCode.h:142
AbstractErrorCode
AbstractErrorCode abstract base class for L1Calo error codes.
Definition: AbstractErrorCode.h:16
ChanCalibErrorCode::DistToErrorRegionUndercutBit
@ DistToErrorRegionUndercutBit
Definition: ChanCalibErrorCode.h:60
ChanCalibErrorCode::Phos4ScanSignalSaturatedBit
@ Phos4ScanSignalSaturatedBit
Definition: ChanCalibErrorCode.h:52
ChanCalibErrorCode::Phos4ScanNoSignalBit
@ Phos4ScanNoSignalBit
Definition: ChanCalibErrorCode.h:46
ChanCalibErrorCode::Phos4ScanBadAdcDistribBit
@ Phos4ScanBadAdcDistribBit
Definition: ChanCalibErrorCode.h:50
ChanCalibErrorCode::ChanErrorCodeBits
ChanErrorCodeBits
Definition: ChanCalibErrorCode.h:26
ChanCalibErrorCode::dacScanBadOffset
void dacScanBadOffset(bool bad)
Definition: ChanCalibErrorCode.h:121
ChanCalibErrorCode::phos4ScanSignalSaturated
void phos4ScanSignalSaturated(bool bad)
Definition: ChanCalibErrorCode.h:157
ChanCalibErrorCode::operator<<
friend std::ostream & operator<<(std::ostream &output, const ChanCalibErrorCode &r)
Definition: ChanCalibErrorCode.cxx:96
ChanCalibErrorCode::BadResultBit
@ BadResultBit
Definition: ChanCalibErrorCode.h:30
ChanCalibErrorCode::exceededDelayAfterCorr
bool exceededDelayAfterCorr() const
Definition: ChanCalibErrorCode.h:168
ChanCalibErrorCode::Phos4ScanBadSignalBit
@ Phos4ScanBadSignalBit
Definition: ChanCalibErrorCode.h:47
ChanCalibErrorCode::badData
bool badData() const
Definition: ChanCalibErrorCode.h:111
ChanCalibErrorCode::noData
void noData(bool nodata)
Definition: ChanCalibErrorCode.h:109
AbstractErrorCode.h
ChanCalibErrorCode::FirFilterValues
@ FirFilterValues
Definition: ChanCalibErrorCode.h:80
ChanCalibErrorCode::JEM
@ JEM
Definition: ChanCalibErrorCode.h:90
ChanCalibErrorCode::dacScanBadAdcDistrib
bool dacScanBadAdcDistrib() const
Definition: ChanCalibErrorCode.h:126
ChanCalibErrorCode::dacScanBadAdcDistrib
void dacScanBadAdcDistrib(bool bad)
Definition: ChanCalibErrorCode.h:127