CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Attributes
HcalDcsDetId Class Reference

#include <HcalDcsDetId.h>

Inheritance diagram for HcalDcsDetId:
HcalOtherDetId DetId

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 Types inherited from DetId
enum  Detector {
  Tracker =1, Muon =2, Ecal =3, Hcal =4,
  Calo =5, Forward =6, VeryForward =7
}
 

Public Member Functions

 HcalDcsDetId ()
 
 HcalDcsDetId (uint32_t rawid)
 
 HcalDcsDetId (const DetId &id)
 
 HcalDcsDetId (HcalOtherSubdetector subd, int side_or_ring, unsigned int slc, DcsType ty, unsigned int subchan)
 
int ring () const
 
int slice () const
 
int subchannel () const
 
DcsType type () const
 
int zside () const
 
- Public Member Functions inherited from HcalOtherDetId
 HcalOtherDetId (const DetId &id)
 
HcalOtherDetIdoperator= (const DetId &id)
 
HcalOtherSubdetector subdet () const
 get the category More...
 
- Public Member Functions inherited from DetId
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

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 Public Attributes inherited from DetId
static const int kDetOffset = 28
 
static const int kSubdetOffset = 25
 

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
 

Additional Inherited Members

- Protected Member Functions inherited from HcalOtherDetId
 HcalOtherDetId ()
 
 HcalOtherDetId (uint32_t rawid)
 
 HcalOtherDetId (HcalOtherSubdetector subdet)
 Constructor from signed ieta, iphi plus composite type and composite data. More...
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

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.

Member Enumeration Documentation

Enumerator
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.

Constructor & Destructor Documentation

HcalDcsDetId::HcalDcsDetId ( )

Definition at line 5 of file HcalDcsDetId.cc.

5  : HcalOtherDetId() {
6 }
HcalDcsDetId::HcalDcsDetId ( uint32_t  rawid)

Definition at line 8 of file HcalDcsDetId.cc.

8  : HcalOtherDetId(rawid) {
9 }
HcalDcsDetId::HcalDcsDetId ( const DetId id)

Definition at line 11 of file HcalDcsDetId.cc.

References TauDecayModes::dec, Exception, HcalDcsBarrel, HcalDcsEndcap, HcalDcsForward, HcalDcsOuter, DetId::id_, and HcalOtherDetId::subdet().

11  : HcalOtherDetId(id) {
12  if ((subdet()!=HcalDcsBarrel) ||
13  (subdet()!=HcalDcsEndcap) ||
14  (subdet()!=HcalDcsOuter) ||
15  (subdet()!=HcalDcsForward)) {
16  throw cms::Exception("Invalid DetId") << "Cannot intialize HcalDcsDetId from "
17  << std::hex << id_ << std::dec;
18  }
19 }
HcalOtherSubdetector subdet() const
get the category
uint32_t id_
Definition: DetId.h:55
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.

23  : HcalOtherDetId(subd) {
24  id_ |= ((side_or_ring > 0) ? ((1<<kSideOffset)|(side_or_ring<<kRingOffset)) :
25  ((-side_or_ring)<<kRingOffset));
26  id_ |= (slc & 0x1F)<<kSliceOffset;
27  id_ |= (ty & 0xF)<<kTypeOffset;
28  id_ |= (subchan & 0xF)<<kSubChannelOffset;
29 }
static unsigned int const kSideOffset
Definition: HcalDcsDetId.h:54
static unsigned int const kTypeOffset
Definition: HcalDcsDetId.h:57
static unsigned int const kSliceOffset
Definition: HcalDcsDetId.h:56
static unsigned int const kSubChannelOffset
Definition: HcalDcsDetId.h:58
static unsigned int const kRingOffset
Definition: HcalDcsDetId.h:55
uint32_t id_
Definition: DetId.h:55

Member Function Documentation

HcalDcsDetId::DcsType HcalDcsDetId::DcsTypeFromString ( const std::string &  str)
static

Definition at line 31 of file HcalDcsDetId.cc.

References DCS_MAX, DCSUNKNOWN, HV, and typeString().

Referenced by dumpHcalMatrixObject().

31  {
32  int ty(HV);
33  do {
35  return HcalDcsDetId::DcsType(ty);
36  } while (++ty != DCS_MAX);
37  return DCSUNKNOWN;
38 }
static std::string typeString(DcsType typ)
Definition: HcalDcsDetId.cc:40
int HcalDcsDetId::ring ( ) const
inline

Definition at line 46 of file HcalDcsDetId.h.

References DetId::id_, kRingOffset, and zside().

Referenced by dumpHcalMatrixObject(), HcalDcsValues::exists(), HcalDcsValues::getValues(), geometryXMLparser.CSCAlignable::index(), HcalDcsMap::lookup(), and HcalDcsMap::mapGeomId2DcsId().

46 { return zside()*((id_>>kRingOffset)&0x3); }
int zside() const
Definition: HcalDcsDetId.h:45
static unsigned int const kRingOffset
Definition: HcalDcsDetId.h:55
uint32_t id_
Definition: DetId.h:55
int HcalDcsDetId::slice ( ) const
inline

Definition at line 47 of file HcalDcsDetId.h.

References DetId::id_, and kSliceOffset.

Referenced by dumpHcalMatrixObject(), HcalDcsMap::lookup(), and HcalDcsMap::mapGeomId2DcsId().

47 { return ((id_>>kSliceOffset)&0x1F); }
static unsigned int const kSliceOffset
Definition: HcalDcsDetId.h:56
uint32_t id_
Definition: DetId.h:55
int HcalDcsDetId::subchannel ( ) const
inline

Definition at line 49 of file HcalDcsDetId.h.

References DetId::id_, and kSubChannelOffset.

Referenced by dumpHcalMatrixObject(), HcalDcsMap::lookup(), and HcalDcsMap::mapGeomId2DcsId().

49 { return ((id_>>kSubChannelOffset)&0xF); }
static unsigned int const kSubChannelOffset
Definition: HcalDcsDetId.h:58
uint32_t id_
Definition: DetId.h:55
DcsType HcalDcsDetId::type ( ) const
inline
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().

40  {
41  switch(typ) {
42  case HV : return "HV";
43  case BV : return "BV";
44  case CATH : return "CATH";
45  case DYN7 : return "DYN7";
46  case DYN8 : return "DYN8";
47  case RM_TEMP : return "RM_TEMP";
48  case CCM_TEMP : return "CCM_TEMP";
49  case CALIB_TEMP : return "CALIB_TEMP";
50  case LVTTM_TEMP : return "LVTTM_TEMP";
51  case TEMP : return "TEMP";
52  case QPLL_LOCK : return "QPLL_LOCK";
53  case STATUS : return "STATUS";
54  default: return "DCSUNKNOWN";
55  }
56  return "Invalid";
57 }
int HcalDcsDetId::zside ( ) const
inline

Definition at line 45 of file HcalDcsDetId.h.

References DetId::id_, and kSideOffset.

Referenced by HcalDcsMap::lookup(), and ring().

45 { return (((id_>>kSideOffset)&0x1)? 1 : -1); }
static unsigned int const kSideOffset
Definition: HcalDcsDetId.h:54
uint32_t id_
Definition: DetId.h:55

Member Data Documentation

unsigned int const HcalDcsDetId::kRingOffset = 17
staticprotected

Definition at line 55 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and ring().

unsigned int const HcalDcsDetId::kSideOffset = 19
staticprotected

Definition at line 54 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and zside().

unsigned int const HcalDcsDetId::kSliceOffset = 12
staticprotected

Definition at line 56 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and slice().

unsigned int const HcalDcsDetId::kSubChannelOffset = 4
staticprotected

Definition at line 58 of file HcalDcsDetId.h.

Referenced by HcalDcsDetId(), and subchannel().

unsigned int const HcalDcsDetId::kTypeOffset = 8
staticprotected

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.