ATLAS Offline Software
Loading...
Searching...
No Matches
ChanCalibErrorCode.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#include <iomanip>
8#include <iostream>
9#include <sstream>
10
11
14
17
20
26
28{
29 this->errorCode( this->errorCode() | e.errorCode() );
30 return *this;
31}
32
33
35 return (this->errorCode() >> (16 + 4 * component)) & 0xf;
36}
37
38
39//********************************************************************
40// getChanValid
41//********************************************************************
45
47 return ( (this->errorCode() & 0xf) == 0);
48}
49
50//********************************************************************
51// getChanValid
52//********************************************************************
56
58 return ( this->errorCode(component) == 0);
59}
60
61
63
64 std::stringstream status;
65
66 status << "ErrorCode: " << this->errorCode() << std::endl
67 << "Bit 0: NoDataBit: " << noData() << std::endl
68 << "Bit 1: BadDataBit: " << badData() << std::endl
69 << "Bit 2: BadResultBit: " << badResult() << std::endl
70 << "Bit 3: Not defined: " << bitIsSet(4) << std::endl;
71 if (spec == PPM) {
72 status << "Bit 4: DacScanBadSlopeBit: " << dacScanBadSlope() << std::endl
73 << "Bit 5: DacScanBadOffsetBit: " << dacScanBadOffset() << std::endl
74 << "Bit 6: DacScanBadCorrCoeffBit: " << dacScanBadCorrCoeff() << std::endl
75 << "Bit 7: DacScanBadAdcDistribBit: " << dacScanBadAdcDistrib() << std::endl
76
77 << "Bit 9: PedRunBadMeanBit: " << pedRunBadMean() << std::endl
78 << "Bit 10: PedRunBadSigmaBit: " << pedRunBadSigma() << std::endl
79 << "Bit 11: PedRunBadAdcDistrib: " << pedRunBadAdcDistrib() << std::endl;
80
81 }
82 else if (spec == CPM) {
83 }
84 else if (spec == JEM) {
85 status << "Bit 5: TotalWindowSizeUndercutBit: " << totalWindowSizeUndercut() << std::endl
86 << "Bit 6: DistToErrorRegionUndercutBit: " << distToErrorRegionUndercut() << std::endl
87 << "Bit 7: ExceededDelayBit: " << exceededDelay() << std::endl
88 << "Bit 8: ExceededDelayAfterCorrBit: " << exceededDelayAfterCorr() << std::endl;
89 }
90 else if (spec == CMM) {
91 }
92
93 return status.str();
94}
95
96std::ostream& operator<<(std::ostream& output, const ChanCalibErrorCode& r) {
97 output << r.errorCode();
98 return output;
99}
std::ostream & operator<<(std::ostream &output, const ChanCalibErrorCode &r)
bool bitIsSet(unsigned int number) const
AbstractErrorCode(unsigned int errorCode)
bool chanValid() const
Checks if channel is valid, ie.
std::string printStatus(ChanErrorSet spec) const
bool dacScanBadCorrCoeff() const
bool dacScanBadAdcDistrib() const
unsigned int errorCode() const
bool totalWindowSizeUndercut() const
bool dacScanBadOffset() const
unsigned int errorCode(ChanErrorComponent component) const
bool distToErrorRegionUndercut() const
bool pedRunBadAdcDistrib() const
ChanCalibErrorCode & operator=(const ChanCalibErrorCode &e)
bool exceededDelayAfterCorr() const
ChanCalibErrorCode & operator|=(const ChanCalibErrorCode &e)
int r
Definition globals.cxx:22