CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HcalDcsDetId.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef DataFormats_HcalDetId_HcalDcsDetId_h
3 #define DataFormats_HcalDetId_HcalDcsDetId_h
4 
5 #include <iosfwd>
6 //#include <string>
9 
27 class HcalDcsDetId : public HcalOtherDetId {
28 public:
29  enum DcsType {
30  HV = 1,
31  BV = 2,
32  CATH = 3,
33  DYN7 = 4,
34  DYN8 = 5,
35  RM_TEMP = 6,
36  CCM_TEMP = 7,
39  TEMP = 10,
40  QPLL_LOCK = 11,
41  STATUS = 12,
42  DCSUNKNOWN = 15,
43  DCS_MAX = 16
44  };
45 
46  HcalDcsDetId();
47  HcalDcsDetId(uint32_t rawid);
48  HcalDcsDetId(const DetId& id);
49  HcalDcsDetId(HcalOtherSubdetector subd, int side_or_ring, unsigned int slc, DcsType ty, unsigned int subchan);
50 
52  static std::string typeString(DcsType typ);
53 
54  int zside() const { return (((id_ >> kSideOffset) & 0x1) ? 1 : -1); }
55  int ring() const { return zside() * ((id_ >> kRingOffset) & 0x3); }
56  int slice() const { return ((id_ >> kSliceOffset) & 0x1F); }
57  DcsType type() const { return DcsType((id_ >> kTypeOffset) & 0xF); }
58  int subchannel() const { return ((id_ >> kSubChannelOffset) & 0xF); }
59 
60  static const int maxLinearIndex = 0x16800;
61 
62 protected:
63  static unsigned int const kSideOffset = 19;
64  static unsigned int const kRingOffset = 17;
65  static unsigned int const kSliceOffset = 12;
66  static unsigned int const kTypeOffset = 8;
67  static unsigned int const kSubChannelOffset = 4;
68 };
69 
70 std::ostream& operator<<(std::ostream&, const HcalDcsDetId& id);
71 
72 #endif
int subchannel() const
Definition: HcalDcsDetId.h:58
static const int maxLinearIndex
Definition: HcalDcsDetId.h:60
static unsigned int const kSideOffset
Definition: HcalDcsDetId.h:63
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
HcalOtherSubdetector
Definition: HcalAssistant.h:40
static unsigned int const kTypeOffset
Definition: HcalDcsDetId.h:66
static unsigned int const kSliceOffset
Definition: HcalDcsDetId.h:65
static unsigned int const kSubChannelOffset
Definition: HcalDcsDetId.h:67
int zside() const
Definition: HcalDcsDetId.h:54
static DcsType DcsTypeFromString(const std::string &str)
Definition: HcalDcsDetId.cc:25
Definition: DetId.h:17
static unsigned int const kRingOffset
Definition: HcalDcsDetId.h:64
uint32_t id_
Definition: DetId.h:69
int slice() const
Definition: HcalDcsDetId.h:56
static std::string typeString(DcsType typ)
Definition: HcalDcsDetId.cc:34
#define str(s)
int ring() const
Definition: HcalDcsDetId.h:55
DcsType type() const
Definition: HcalDcsDetId.h:57