#include <HcalDcsDetId.h>
Public Types | |
enum | DcsType { HV = 1, BV = 2, CATH = 3, DYN7 = 4, DYN8 = 5, RM_TEMP = 6, CCM_TEMP = 7, CALIB_TEMP = 8, LVTTM_TEMP = 9, TEMP = 10, QPLL_LOCK = 11, STATUS = 12, DCSUNKNOWN = 15, DCS_MAX = 16 } |
Public Member Functions | |
HcalDcsDetId () | |
HcalDcsDetId (uint32_t rawid) | |
HcalDcsDetId (HcalOtherSubdetector subd, int side_or_ring, unsigned int slc, DcsType ty, unsigned int subchan) | |
HcalDcsDetId (const DetId &id) | |
int | ring () const |
int | slice () const |
int | subchannel () const |
DcsType | type () const |
int | zside () const |
Static Public Member Functions | |
static DcsType | DcsTypeFromString (const std::string &str) |
static std::string | typeString (DcsType typ) |
Static Public Attributes | |
static const int | maxLinearIndex = 0x16800 |
Static Protected Attributes | |
static unsigned int const | kRingOffset = 17 |
static unsigned int const | kSideOffset = 19 |
static unsigned int const | kSliceOffset = 12 |
static unsigned int const | kSubChannelOffset = 4 |
static unsigned int const | kTypeOffset = 8 |
for use to identify HcalDcsChannels
bit packing [31:28] from DetId to identify detector (Hcal) [27:25] from DetId to identify subdetector (HcalOther) [24:20] other subdet id [19:19] zside +/- [18:17] HO ring (not important in other subdets) [16:12] Slice (phi slice for HB HE, Sector for HO, Quadrant for HF) [11:8] Type from the DCSType list [7:4] sub-channel a number to identify the channel can be from 0 to 15 [3:0] still open
Definition at line 27 of file HcalDcsDetId.h.
HV | |
BV | |
CATH | |
DYN7 | |
DYN8 | |
RM_TEMP | |
CCM_TEMP | |
CALIB_TEMP | |
LVTTM_TEMP | |
TEMP | |
QPLL_LOCK | |
STATUS | |
DCSUNKNOWN | |
DCS_MAX |
Definition at line 30 of file HcalDcsDetId.h.
{ HV = 1, BV = 2, CATH = 3, DYN7 = 4, DYN8 = 5, RM_TEMP = 6, CCM_TEMP = 7, CALIB_TEMP = 8, LVTTM_TEMP = 9, TEMP = 10, QPLL_LOCK = 11, STATUS = 12, DCSUNKNOWN = 15, DCS_MAX = 16 };
HcalDcsDetId::HcalDcsDetId | ( | ) |
Definition at line 5 of file HcalDcsDetId.cc.
: HcalOtherDetId() { }
HcalDcsDetId::HcalDcsDetId | ( | uint32_t | rawid | ) |
Definition at line 8 of file HcalDcsDetId.cc.
: HcalOtherDetId(rawid) { }
HcalDcsDetId::HcalDcsDetId | ( | const DetId & | id | ) |
Definition at line 11 of file HcalDcsDetId.cc.
References Exception, HcalDcsBarrel, HcalDcsEndcap, HcalDcsForward, HcalDcsOuter, DetId::id_, and HcalOtherDetId::subdet().
: HcalOtherDetId(id) { if ((subdet()!=HcalDcsBarrel) || (subdet()!=HcalDcsEndcap) || (subdet()!=HcalDcsOuter) || (subdet()!=HcalDcsForward)) { throw cms::Exception("Invalid DetId") << "Cannot intialize HcalDcsDetId from " << std::hex << id_ << std::dec; } }
HcalDcsDetId::HcalDcsDetId | ( | HcalOtherSubdetector | subd, |
int | side_or_ring, | ||
unsigned int | slc, | ||
DcsType | ty, | ||
unsigned int | subchan | ||
) |
Definition at line 21 of file HcalDcsDetId.cc.
References DetId::id_, kRingOffset, kSideOffset, kSliceOffset, kSubChannelOffset, and kTypeOffset.
: HcalOtherDetId(subd) { id_ |= ((side_or_ring > 0) ? ((1<<kSideOffset)|(side_or_ring<<kRingOffset)) : ((-side_or_ring)<<kRingOffset)); id_ |= (slc & 0x1F)<<kSliceOffset; id_ |= (ty & 0xF)<<kTypeOffset; id_ |= (subchan & 0xF)<<kSubChannelOffset; }
HcalDcsDetId::DcsType HcalDcsDetId::DcsTypeFromString | ( | const std::string & | str | ) | [static] |
Definition at line 31 of file HcalDcsDetId.cc.
References DCS_MAX, DCSUNKNOWN, HV, and typeString().
{ int ty(HV); do { if (typeString(HcalDcsDetId::DcsType(ty))==str) return HcalDcsDetId::DcsType(ty); } while (++ty != DCS_MAX); return DCSUNKNOWN; }
int HcalDcsDetId::ring | ( | ) | const [inline] |
Definition at line 46 of file HcalDcsDetId.h.
References DetId::id_, kRingOffset, and zside().
Referenced by HcalDcsValues::exists(), HcalDcsValues::getValues(), HcalDcsMap::lookup(), and HcalDcsMap::mapGeomId2DcsId().
{ return zside()*((id_>>kRingOffset)&0x3); }
int HcalDcsDetId::slice | ( | ) | const [inline] |
Definition at line 47 of file HcalDcsDetId.h.
References DetId::id_, and kSliceOffset.
Referenced by HcalDcsMap::lookup(), and HcalDcsMap::mapGeomId2DcsId().
{ return ((id_>>kSliceOffset)&0x1F); }
int HcalDcsDetId::subchannel | ( | ) | const [inline] |
Definition at line 49 of file HcalDcsDetId.h.
References DetId::id_, and kSubChannelOffset.
Referenced by HcalDcsMap::lookup(), and HcalDcsMap::mapGeomId2DcsId().
{ return ((id_>>kSubChannelOffset)&0xF); }
DcsType HcalDcsDetId::type | ( | ) | const [inline] |
Definition at line 48 of file HcalDcsDetId.h.
References DetId::id_, and kTypeOffset.
{ return DcsType((id_>>kTypeOffset)&0xF); }
std::string HcalDcsDetId::typeString | ( | DcsType | typ | ) | [static] |
Definition at line 40 of file HcalDcsDetId.cc.
References BV, CALIB_TEMP, CATH, CCM_TEMP, DYN7, DYN8, HV, LVTTM_TEMP, QPLL_LOCK, RM_TEMP, STATUS, and TEMP.
Referenced by DcsTypeFromString().
{ switch(typ) { case HV : return "HV"; case BV : return "BV"; case CATH : return "CATH"; case DYN7 : return "DYN7"; case DYN8 : return "DYN8"; case RM_TEMP : return "RM_TEMP"; case CCM_TEMP : return "CCM_TEMP"; case CALIB_TEMP : return "CALIB_TEMP"; case LVTTM_TEMP : return "LVTTM_TEMP"; case TEMP : return "TEMP"; case QPLL_LOCK : return "QPLL_LOCK"; case STATUS : return "STATUS"; default: return "DCSUNKNOWN"; } return "Invalid"; }
int HcalDcsDetId::zside | ( | ) | const [inline] |
Definition at line 45 of file HcalDcsDetId.h.
References DetId::id_, and kSideOffset.
Referenced by HcalDcsMap::lookup(), and ring().
{ return (((id_>>kSideOffset)&0x1)? 1 : -1); }
unsigned int const HcalDcsDetId::kRingOffset = 17 [static, protected] |
Definition at line 55 of file HcalDcsDetId.h.
Referenced by HcalDcsDetId(), and ring().
unsigned int const HcalDcsDetId::kSideOffset = 19 [static, protected] |
Definition at line 54 of file HcalDcsDetId.h.
Referenced by HcalDcsDetId(), and zside().
unsigned int const HcalDcsDetId::kSliceOffset = 12 [static, protected] |
Definition at line 56 of file HcalDcsDetId.h.
Referenced by HcalDcsDetId(), and slice().
unsigned int const HcalDcsDetId::kSubChannelOffset = 4 [static, protected] |
Definition at line 58 of file HcalDcsDetId.h.
Referenced by HcalDcsDetId(), and subchannel().
unsigned int const HcalDcsDetId::kTypeOffset = 8 [static, protected] |
Definition at line 57 of file HcalDcsDetId.h.
Referenced by HcalDcsDetId(), and type().
const int HcalDcsDetId::maxLinearIndex = 0x16800 [static] |
Definition at line 51 of file HcalDcsDetId.h.