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