ATLAS Offline Software
ChanDeadErrorCode.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_CHANDEADERRORCODE_H
6 #define TRIGT1CALOCALIBCONDITIONS_CHANDEADERRORCODE_H
7 
9 
10 #include <string>
11 
21 
22  friend std::ostream& operator<<(std::ostream& output, const ChanDeadErrorCode& r);
23 
24 public:
25 
26  enum ChanDeadBits {
27  // Bits used for CPM/JEM dead channel folders.
29 
30  // Bits used for PPM dead (or problem) channel folder.
31  // Bits 0-15 will zero the LUT if they are set.
32  // Bits 16-31 are flagging problems that do not need
33  // the LUT to be zeroed.
34 
35  // Internal L1Calo problems:
36  BadAdcBit = 0,
37  BadMcmBit = 1,
38 
39  // Calorimeter problems:
45 
46  // Calorimeter flags:
47  // (for Tile, can use A=Front, B/C=Middle, D=Back)
52  };
53 
55  ChanDeadErrorCode(unsigned int errorCode);
56  virtual ~ChanDeadErrorCode() {}
57 
61 
62  bool chanValid() const {return (( this->errorCode() & 0xffff) == 0);}
63 
64  bool badLvds() const { return bitIsSet(BadLvdsBit); }
65  void badLvds(bool bad) { setBit(BadLvdsBit,bad); }
66 
67  bool badAdc() const { return bitIsSet(BadAdcBit); }
68  void badAdc(bool bad) { setBit(BadAdcBit,bad); }
69 
70  bool badMcm() const { return bitIsSet(BadMcmBit); }
71  void badMcm(bool bad) { setBit(BadMcmBit,bad); }
72 
73  bool frontEndDead() const { return bitIsSet(FrontEndDeadBit); }
75 
76  bool receiverDead() const { return bitIsSet(ReceiverDeadBit); }
78 
79  bool highVoltsOff() const { return bitIsSet(HighVoltsOffBit); }
81 
82  bool lowVoltsOff() const { return bitIsSet(LowVoltsOffBit); }
84 
85  bool noisyTower() const { return bitIsSet(NoisyTowerBit); }
87 
88  bool psCellsMasked() const { return bitIsSet(PSCellsMaskedBit); }
90 
91  bool frontCellsMasked() const { return bitIsSet(FrontCellsMaskedBit); }
93 
96 
97  bool backCellsMasked() const { return bitIsSet(BackCellsMaskedBit); }
99 
100  std::string printStatus() const;
101 };
102 
103 #endif
104 
105 
bad
@ bad
Definition: SUSYToolsTester.cxx:95
ChanDeadErrorCode::frontEndDead
void frontEndDead(bool bad)
Definition: ChanDeadErrorCode.h:74
beamspotman.r
def r
Definition: beamspotman.py:676
ChanDeadErrorCode::badLvds
void badLvds(bool bad)
Definition: ChanDeadErrorCode.h:65
ChanDeadErrorCode::highVoltsOff
void highVoltsOff(bool bad)
Definition: ChanDeadErrorCode.h:80
AbstractErrorCode::setBit
void setBit(unsigned int number, bool value)
Definition: AbstractErrorCode.cxx:15
ChanDeadErrorCode::lowVoltsOff
void lowVoltsOff(bool bad)
Definition: ChanDeadErrorCode.h:83
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::badLvds
bool badLvds() const
Definition: ChanDeadErrorCode.h:64
ChanDeadErrorCode::frontCellsMasked
void frontCellsMasked(bool bad)
Definition: ChanDeadErrorCode.h:92
ChanDeadErrorCode::BadLvdsBit
@ BadLvdsBit
Definition: ChanDeadErrorCode.h:28
ChanDeadErrorCode::middleCellsMasked
void middleCellsMasked(bool bad)
Definition: ChanDeadErrorCode.h:95
ChanDeadErrorCode::backCellsMasked
bool backCellsMasked() const
Definition: ChanDeadErrorCode.h:97
ChanDeadErrorCode::lowVoltsOff
bool lowVoltsOff() const
Definition: ChanDeadErrorCode.h:82
ChanDeadErrorCode::operator=
ChanDeadErrorCode & operator=(const ChanDeadErrorCode &e)
Definition: ChanDeadErrorCode.cxx:21
ChanDeadErrorCode::highVoltsOff
bool highVoltsOff() const
Definition: ChanDeadErrorCode.h:79
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::~ChanDeadErrorCode
virtual ~ChanDeadErrorCode()
Definition: ChanDeadErrorCode.h:56
ChanDeadErrorCode::psCellsMasked
void psCellsMasked(bool bad)
Definition: ChanDeadErrorCode.h:89
ChanDeadErrorCode::ChanDeadBits
ChanDeadBits
Definition: ChanDeadErrorCode.h:26
ChanDeadErrorCode::PSCellsMaskedBit
@ PSCellsMaskedBit
Definition: ChanDeadErrorCode.h:48
ChanDeadErrorCode::badAdc
bool badAdc() const
Definition: ChanDeadErrorCode.h:67
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
ChanDeadErrorCode::psCellsMasked
bool psCellsMasked() const
Definition: ChanDeadErrorCode.h:88
ChanDeadErrorCode::chanValid
bool chanValid() const
Definition: ChanDeadErrorCode.h:62
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::FrontEndDeadBit
@ FrontEndDeadBit
Definition: ChanDeadErrorCode.h:40
ChanDeadErrorCode::HighVoltsOffBit
@ HighVoltsOffBit
Definition: ChanDeadErrorCode.h:42
ChanDeadErrorCode::noisyTower
bool noisyTower() const
Definition: ChanDeadErrorCode.h:85
ChanDeadErrorCode::badMcm
void badMcm(bool bad)
Definition: ChanDeadErrorCode.h:71
ChanDeadErrorCode::NoisyTowerBit
@ NoisyTowerBit
Definition: ChanDeadErrorCode.h:44
ChanDeadErrorCode::FrontCellsMaskedBit
@ FrontCellsMaskedBit
Definition: ChanDeadErrorCode.h:49
ChanDeadErrorCode::noisyTower
void noisyTower(bool bad)
Definition: ChanDeadErrorCode.h:86
ChanDeadErrorCode::middleCellsMasked
bool middleCellsMasked() const
Definition: ChanDeadErrorCode.h:94
ChanDeadErrorCode::LowVoltsOffBit
@ LowVoltsOffBit
Definition: ChanDeadErrorCode.h:43
ChanDeadErrorCode::badMcm
bool badMcm() const
Definition: ChanDeadErrorCode.h:70
ChanDeadErrorCode::frontCellsMasked
bool frontCellsMasked() const
Definition: ChanDeadErrorCode.h:91
ChanDeadErrorCode::printStatus
std::string printStatus() const
Definition: ChanDeadErrorCode.cxx:33
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
ChanDeadErrorCode::receiverDead
bool receiverDead() const
Definition: ChanDeadErrorCode.h:76
ChanDeadErrorCode::receiverDead
void receiverDead(bool bad)
Definition: ChanDeadErrorCode.h:77
AbstractErrorCode
AbstractErrorCode abstract base class for L1Calo error codes.
Definition: AbstractErrorCode.h:16
ChanDeadErrorCode::ReceiverDeadBit
@ ReceiverDeadBit
Definition: ChanDeadErrorCode.h:41
ChanDeadErrorCode::operator<<
friend std::ostream & operator<<(std::ostream &output, const ChanDeadErrorCode &r)
Definition: ChanDeadErrorCode.cxx:87
ChanDeadErrorCode::frontEndDead
bool frontEndDead() const
Definition: ChanDeadErrorCode.h:73
AbstractErrorCode.h
ChanDeadErrorCode::backCellsMasked
void backCellsMasked(bool bad)
Definition: ChanDeadErrorCode.h:98
ChanDeadErrorCode::badAdc
void badAdc(bool bad)
Definition: ChanDeadErrorCode.h:68