CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalChannelStatusCode.h
Go to the documentation of this file.
1 #ifndef CondFormats_EcalObjects_EcalChannelStatusCode_H
2 #define CondFormats_EcalObjects_EcalChannelStatusCode_H
3 
10 #include <iostream>
11 #include <boost/cstdint.hpp>
12 
19 
20  public:
22  EcalChannelStatusCode(const EcalChannelStatusCode & codeStatus);
23  EcalChannelStatusCode(const uint16_t& encodedStatus) : status_(encodedStatus) {};
25 
26  //get Methods to be defined according to the final definition
27 
28  void print(std::ostream& s) const { s << "status is: " << status_; }
29 
31  uint16_t getStatusCode() const { return status_; }
32 
34  uint16_t getDecodedStatusCode() const { return status_&chStatusMask; }
35 
36  bool isHVon() const {return status_& HVbitMask;}
37  bool isLVon() const {return status_& LVbitMask;}
38 
39  static const int chStatusMask = 0x1F;
40  static const int HVbitMask = 0x1<<5;
41  static const int LVbitMask = 0x1<<6;
42 
43  private:
44  /* bits 1-5 store a status code:
45  0 channel ok
46  1 DAC settings problem, pedestal not in the design range
47  2 channel with no laser, ok elsewhere
48  3 noisy
49  4 very noisy
50  5-7 reserved for more categories of noisy channels
51  8 channel at fixed gain 6 (or 6 and 1)
52  9 channel at fixed gain 1
53  10 channel at fixed gain 0 (dead of type this)
54  11 non responding isolated channel (dead of type other)
55  12 channel and one or more neigbors not responding
56  (e.g.: in a dead VFE 5x1 channel)
57  13 channel in TT with no data link, TP data ok
58  14 channel in TT with no data link and no TP data
59 
60  bit 6 : HV on/off
61  bit 7 : LV on/off
62  bit 8 : DAQ in/out
63  bit 9 : TP readout on/off
64  bit 10: Trigger in/out
65  bit 11: Temperature ok/not ok
66  bit 12: channel next to a dead channel
67  */
68  uint16_t status_;
69 };
70 #endif
void print(std::ostream &s) const
EcalChannelStatusCode(const uint16_t &encodedStatus)
uint16_t getStatusCode() const
static const int chStatusMask
EcalChannelStatusCode & operator=(const EcalChannelStatusCode &rhs)
uint16_t getDecodedStatusCode() const
Return the decoded status, i.e. the value giving the status code.