ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1CaloCalibConditions
src
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
5
#include "
TrigT1CaloCalibConditions/ChanCalibErrorCode.h
"
6
7
#include <iomanip>
8
#include <iostream>
9
#include <sstream>
10
11
12
ChanCalibErrorCode::ChanCalibErrorCode
() :
AbstractErrorCode
(0) {
13
}
14
15
ChanCalibErrorCode::ChanCalibErrorCode
(
unsigned
int
errorCode
):
AbstractErrorCode
(
errorCode
) {
16
}
17
18
ChanCalibErrorCode::ChanCalibErrorCode
(
const
ChanCalibErrorCode
& e) :
AbstractErrorCode
(e.
errorCode
()) {
19
}
20
21
ChanCalibErrorCode
&
ChanCalibErrorCode::operator=
(
const
ChanCalibErrorCode
& e)
22
{
23
this->
errorCode
(e.
errorCode
());
24
return
*
this
;
25
}
26
27
ChanCalibErrorCode
&
ChanCalibErrorCode::operator|=
(
const
ChanCalibErrorCode
& e)
28
{
29
this->
errorCode
( this->
errorCode
() | e.
errorCode
() );
30
return
*
this
;
31
}
32
33
34
unsigned
int
ChanCalibErrorCode::errorCode
(
ChanErrorComponent
component)
const
{
35
return
(this->
errorCode
() >> (16 + 4 * component)) & 0xf;
36
}
37
38
39
//********************************************************************
40
// getChanValid
41
//********************************************************************
45
46
bool
ChanCalibErrorCode::chanValid
()
const
{
47
return
( (this->
errorCode
() & 0xf) == 0);
48
}
49
50
//********************************************************************
51
// getChanValid
52
//********************************************************************
56
57
bool
ChanCalibErrorCode::chanValid
(
ChanErrorComponent
component)
const
{
58
return
( this->
errorCode
(component) == 0);
59
}
60
61
62
std::string
ChanCalibErrorCode::printStatus
(
ChanErrorSet
spec)
const
{
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
96
std::ostream&
operator<<
(std::ostream& output,
const
ChanCalibErrorCode
&
r
) {
97
output <<
r
.errorCode();
98
return
output;
99
}
operator<<
std::ostream & operator<<(std::ostream &output, const ChanCalibErrorCode &r)
Definition
ChanCalibErrorCode.cxx:96
ChanCalibErrorCode.h
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition
AbstractErrorCode.cxx:7
AbstractErrorCode::AbstractErrorCode
AbstractErrorCode(unsigned int errorCode)
Definition
AbstractErrorCode.h:24
ChanCalibErrorCode::chanValid
bool chanValid() const
Checks if channel is valid, ie.
Definition
ChanCalibErrorCode.cxx:46
ChanCalibErrorCode::dacScanBadSlope
bool dacScanBadSlope() const
Definition
ChanCalibErrorCode.h:119
ChanCalibErrorCode::printStatus
std::string printStatus(ChanErrorSet spec) const
Definition
ChanCalibErrorCode.cxx:62
ChanCalibErrorCode::pedRunBadMean
bool pedRunBadMean() const
Definition
ChanCalibErrorCode.h:131
ChanCalibErrorCode::badData
bool badData() const
Definition
ChanCalibErrorCode.h:113
ChanCalibErrorCode::ChanCalibErrorCode
ChanCalibErrorCode()
Definition
ChanCalibErrorCode.cxx:12
ChanCalibErrorCode::dacScanBadCorrCoeff
bool dacScanBadCorrCoeff() const
Definition
ChanCalibErrorCode.h:125
ChanCalibErrorCode::noData
bool noData() const
Definition
ChanCalibErrorCode.h:110
ChanCalibErrorCode::dacScanBadAdcDistrib
bool dacScanBadAdcDistrib() const
Definition
ChanCalibErrorCode.h:128
ChanCalibErrorCode::pedRunBadSigma
bool pedRunBadSigma() const
Definition
ChanCalibErrorCode.h:134
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::exceededDelay
bool exceededDelay() const
Definition
ChanCalibErrorCode.h:167
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::distToErrorRegionUndercut
bool distToErrorRegionUndercut() const
Definition
ChanCalibErrorCode.h:164
ChanCalibErrorCode::pedRunBadAdcDistrib
bool pedRunBadAdcDistrib() const
Definition
ChanCalibErrorCode.h:137
ChanCalibErrorCode::operator=
ChanCalibErrorCode & operator=(const ChanCalibErrorCode &e)
Definition
ChanCalibErrorCode.cxx:21
ChanCalibErrorCode::exceededDelayAfterCorr
bool exceededDelayAfterCorr() const
Definition
ChanCalibErrorCode.h:170
ChanCalibErrorCode::ChanErrorComponent
ChanErrorComponent
Definition
ChanCalibErrorCode.h:73
ChanCalibErrorCode::operator|=
ChanCalibErrorCode & operator|=(const ChanCalibErrorCode &e)
Definition
ChanCalibErrorCode.cxx:27
r
int r
Definition
globals.cxx:22
Generated on
for ATLAS Offline Software by
1.17.0