CMS 3D CMS Logo

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
HcalDcsDetId::DCSUNKNOWN
Definition: HcalDcsDetId.h:42
HcalDcsDetId::CCM_TEMP
Definition: HcalDcsDetId.h:36
HcalDcsDetId::type
DcsType type() const
Definition: HcalDcsDetId.h:57
HcalDcsDetId::RM_TEMP
Definition: HcalDcsDetId.h:35
HcalDcsDetId::CATH
Definition: HcalDcsDetId.h:32
HcalDcsDetId
Definition: HcalDcsDetId.h:27
HcalDcsDetId::kSubChannelOffset
static unsigned const int kSubChannelOffset
Definition: HcalDcsDetId.h:67
HcalDcsDetId::TEMP
Definition: HcalDcsDetId.h:39
HcalDcsDetId::ring
int ring() const
Definition: HcalDcsDetId.h:55
HcalDcsDetId::typeString
static std::string typeString(DcsType typ)
Definition: HcalDcsDetId.cc:34
HcalDcsDetId::DYN8
Definition: HcalDcsDetId.h:34
HcalDcsDetId::kSliceOffset
static unsigned const int kSliceOffset
Definition: HcalDcsDetId.h:65
HcalDcsDetId::DcsType
DcsType
Definition: HcalDcsDetId.h:29
DetId
Definition: DetId.h:17
HcalDcsDetId::QPLL_LOCK
Definition: HcalDcsDetId.h:40
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
HcalDcsDetId::DcsTypeFromString
static DcsType DcsTypeFromString(const std::string &str)
Definition: HcalDcsDetId.cc:25
HcalDcsDetId::kSideOffset
static unsigned const int kSideOffset
Definition: HcalDcsDetId.h:63
str
#define str(s)
Definition: TestProcessor.cc:48
HcalDcsDetId::HV
Definition: HcalDcsDetId.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalOtherSubdetector
HcalOtherSubdetector
Definition: HcalAssistant.h:40
HcalDcsDetId::maxLinearIndex
static const int maxLinearIndex
Definition: HcalDcsDetId.h:60
DetId::id_
uint32_t id_
Definition: DetId.h:69
HcalDcsDetId::HcalDcsDetId
HcalDcsDetId()
Definition: HcalDcsDetId.cc:5
HcalDcsDetId::kRingOffset
static unsigned const int kRingOffset
Definition: HcalDcsDetId.h:64
HcalDcsDetId::DYN7
Definition: HcalDcsDetId.h:33
HcalDcsDetId::zside
int zside() const
Definition: HcalDcsDetId.h:54
HcalOtherDetId.h
HcalDcsDetId::LVTTM_TEMP
Definition: HcalDcsDetId.h:38
HcalSubdetector.h
HcalDcsDetId::kTypeOffset
static unsigned const int kTypeOffset
Definition: HcalDcsDetId.h:66
HcalDcsDetId::subchannel
int subchannel() const
Definition: HcalDcsDetId.h:58
HcalDcsDetId::BV
Definition: HcalDcsDetId.h:31
HcalDcsDetId::DCS_MAX
Definition: HcalDcsDetId.h:43
HcalDcsDetId::slice
int slice() const
Definition: HcalDcsDetId.h:56
HcalDcsDetId::STATUS
Definition: HcalDcsDetId.h:41
HcalOtherDetId
Definition: HcalOtherDetId.h:22
operator<<
std::ostream & operator<<(std::ostream &, const HcalDcsDetId &id)
Definition: HcalDcsDetId.cc:66
HcalDcsDetId::CALIB_TEMP
Definition: HcalDcsDetId.h:37