ATLAS Offline Software
ChanDeadErrorCode.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 
13 }
14 
15 ChanDeadErrorCode::ChanDeadErrorCode(unsigned int errorCode): AbstractErrorCode(errorCode) {
16 }
17 
19 }
20 
22 {
23  this->errorCode(e.errorCode());
24  return *this;
25 }
26 
28 {
29  this->errorCode( this->errorCode() | e.errorCode() );
30  return *this;
31 }
32 
33 std::string ChanDeadErrorCode::printStatus() const {
34 
35  std::stringstream status;
36 
37  status << "ErrorCode: " << this->errorCode() << std::endl;
38 
39  status << "Bit " << std::setw(2) << BadAdcBit
40  << ": BadAdcBit: "
41  << bitIsSet(BadAdcBit) << std::endl;
42 
43  status << "Bit " << std::setw(2) << BadMcmBit
44  << ": BadMcmBit: "
45  << bitIsSet(BadMcmBit) << std::endl;
46 
47  status << "Bit " << std::setw(2) << FrontEndDeadBit
48  << ": FrontEndDeadBit: "
49  << bitIsSet(FrontEndDeadBit) << std::endl;
50 
51  status << "Bit " << std::setw(2) << ReceiverDeadBit
52  << ": ReceiverDeadBit: "
53  << bitIsSet(ReceiverDeadBit) << std::endl;
54 
55  status << "Bit " << std::setw(2) << HighVoltsOffBit
56  << ": HighVoltsOffBit: "
57  << bitIsSet(HighVoltsOffBit) << std::endl;
58 
59  status << "Bit " << std::setw(2) << LowVoltsOffBit
60  << ": LowVoltsOffBit: "
61  << bitIsSet(LowVoltsOffBit) << std::endl;
62 
63  status << "Bit " << std::setw(2) << NoisyTowerBit
64  << ": NoisyTowerBit: "
65  << bitIsSet(NoisyTowerBit) << std::endl;
66 
67  status << "Bit " << std::setw(2) << PSCellsMaskedBit
68  << ": PSCellsMaskedBit: "
69  << bitIsSet(PSCellsMaskedBit) << std::endl;
70 
71  status << "Bit " << std::setw(2) << FrontCellsMaskedBit
72  << ": FrontCellsMaskedBit: "
73  << bitIsSet(FrontCellsMaskedBit) << std::endl;
74 
75  status << "Bit " << std::setw(2) << MiddleCellsMaskedBit
76  << ": MiddleCellsMaskedBit: "
77  << bitIsSet(MiddleCellsMaskedBit) << std::endl;
78 
79  status << "Bit " << std::setw(2) << BackCellsMaskedBit
80  << ": BackCellsMaskedBit: "
81  << bitIsSet(BackCellsMaskedBit) << std::endl;
82 
83  return status.str();
84 }
85 
86 
87 std::ostream& operator<<(std::ostream& output, const ChanDeadErrorCode& r) {
88  output << r.errorCode();
89  return output;
90 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
AbstractErrorCode::errorCode
unsigned int errorCode() const
Definition: AbstractErrorCode.h:21
ChanDeadErrorCode::BadMcmBit
@ BadMcmBit
Definition: ChanDeadErrorCode.h:37
ChanDeadErrorCode::MiddleCellsMaskedBit
@ MiddleCellsMaskedBit
Definition: ChanDeadErrorCode.h:50
ChanDeadErrorCode::BackCellsMaskedBit
@ BackCellsMaskedBit
Definition: ChanDeadErrorCode.h:51
ChanDeadErrorCode::operator=
ChanDeadErrorCode & operator=(const ChanDeadErrorCode &e)
Definition: ChanDeadErrorCode.cxx:21
ChanDeadErrorCode::ChanDeadErrorCode
ChanDeadErrorCode()
Definition: ChanDeadErrorCode.cxx:12
ChanDeadErrorCode
ChanDeadErrorCode class for L1Calo error codes Adapted from /LVL1/l1calo/coolL1Calo/coolL1Calo/ChanDe...
Definition: ChanDeadErrorCode.h:20
ChanDeadErrorCode::PSCellsMaskedBit
@ PSCellsMaskedBit
Definition: ChanDeadErrorCode.h:48
operator<<
std::ostream & operator<<(std::ostream &output, const ChanDeadErrorCode &r)
Definition: ChanDeadErrorCode.cxx:87
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
ChanDeadErrorCode::operator|=
ChanDeadErrorCode & operator|=(const ChanDeadErrorCode &e)
Definition: ChanDeadErrorCode.cxx:27
ChanDeadErrorCode::BadAdcBit
@ BadAdcBit
Definition: ChanDeadErrorCode.h:36
merge.output
output
Definition: merge.py:17
ChanDeadErrorCode.h
ChanDeadErrorCode::FrontEndDeadBit
@ FrontEndDeadBit
Definition: ChanDeadErrorCode.h:40
ChanDeadErrorCode::HighVoltsOffBit
@ HighVoltsOffBit
Definition: ChanDeadErrorCode.h:42
ChanDeadErrorCode::NoisyTowerBit
@ NoisyTowerBit
Definition: ChanDeadErrorCode.h:44
ChanDeadErrorCode::FrontCellsMaskedBit
@ FrontCellsMaskedBit
Definition: ChanDeadErrorCode.h:49
ChanDeadErrorCode::LowVoltsOffBit
@ LowVoltsOffBit
Definition: ChanDeadErrorCode.h:43
ChanDeadErrorCode::printStatus
std::string printStatus() const
Definition: ChanDeadErrorCode.cxx:33
AbstractErrorCode
AbstractErrorCode abstract base class for L1Calo error codes.
Definition: AbstractErrorCode.h:16
ChanDeadErrorCode::ReceiverDeadBit
@ ReceiverDeadBit
Definition: ChanDeadErrorCode.h:41
merge.status
status
Definition: merge.py:17