ATLAS Offline Software
Loading...
Searching...
No Matches
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
14
17
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
33std::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
87std::ostream& operator<<(std::ostream& output, const ChanDeadErrorCode& r) {
88 output << r.errorCode();
89 return output;
90}
std::ostream & operator<<(std::ostream &output, const ChanDeadErrorCode &r)
bool bitIsSet(unsigned int number) const
unsigned int errorCode() const
AbstractErrorCode(unsigned int errorCode)
ChanDeadErrorCode & operator=(const ChanDeadErrorCode &e)
ChanDeadErrorCode & operator|=(const ChanDeadErrorCode &e)
std::string printStatus() const
int r
Definition globals.cxx:22