CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HBHEHFLogicalMapEntry Class Reference

#include <HcalMappingEntry.h>

Public Member Functions

const DetId getDetId () const
 
const HcalElectronicsId getHcalElectronicsId () const
 
const HcalFrontEndId getHcalFrontEndId () const
 
uint32_t getLinearIndex () const
 
 HBHEHFLogicalMapEntry ()
 
 HBHEHFLogicalMapEntry (int in_fi_ch, int in_htr_fi, int in_spig, int in_fed, int in_cr, int in_htr, std::string in_s_fpga, std::string in_s_det, int in_sid, int in_et, int in_ph, int in_dep, int in_dph, int in_wed, int in_rm, int in_rm_fi, int in_pix, int in_qie, int in_adc, int in_slb, int in_rctcra, int in_rctcar, int in_rctcon, std::string in_s_rbx, std::string in_s_slb, std::string in_s_slb2, std::string in_s_slnam, std::string in_s_rctnam)
 
char * printLMapLine ()
 
 ~HBHEHFLogicalMapEntry ()
 

Private Attributes

uint32_t hcalDetID_
 
uint32_t hcalEID_
 
uint32_t hcalFrontEndID_
 
int mydphi_
 
int myrctcar_
 
int myrctcon_
 
int myrctcra_
 
std::string myrctnam_
 
int myslb_
 
std::string myslbin2_
 
std::string myslbin_
 
std::string myslnam_
 
int mywedge_
 

Detailed Description

Definition at line 14 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

HBHEHFLogicalMapEntry::HBHEHFLogicalMapEntry ( )
inline

Definition at line 21 of file HcalMappingEntry.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

21 {}
HBHEHFLogicalMapEntry::HBHEHFLogicalMapEntry ( int  in_fi_ch,
int  in_htr_fi,
int  in_spig,
int  in_fed,
int  in_cr,
int  in_htr,
std::string  in_s_fpga,
std::string  in_s_det,
int  in_sid,
int  in_et,
int  in_ph,
int  in_dep,
int  in_dph,
int  in_wed,
int  in_rm,
int  in_rm_fi,
int  in_pix,
int  in_qie,
int  in_adc,
int  in_slb,
int  in_rctcra,
int  in_rctcar,
int  in_rctcon,
std::string  in_s_rbx,
std::string  in_s_slb,
std::string  in_s_slb2,
std::string  in_s_slnam,
std::string  in_s_rctnam 
)

Definition at line 18 of file HcalMappingEntry.cc.

References HcalBarrel, HcalEmpty, HcalEndcap, HcalForward, HcalFrontEndId::rawId(), DetId::rawId(), HcalElectronicsId::rawId(), and HcalElectronicsId::setHTR().

45  {
46  int mytopbot;
47  (in_s_fpga == "bot") ? mytopbot = 0 : mytopbot = 1;
48 
49  mydphi_ = in_dph;
50  mywedge_ = in_wed;
51  myslb_ = in_slb;
52  myrctcra_ = in_rctcra;
53  myrctcar_ = in_rctcar;
54  myrctcon_ = in_rctcon;
55 
56  // string data members
57  myslbin_ = in_s_slb;
58  myslbin2_ = in_s_slb2;
59  myslnam_ = in_s_slnam;
60  myrctnam_ = in_s_rctnam;
61 
62  // create the hcal electronics id
63  HcalElectronicsId heid(in_fi_ch, in_htr_fi, in_spig, in_fed - 700);
64  heid.setHTR(in_cr, in_htr, mytopbot);
65  // create the hcal detector id
66  HcalSubdetector mysubdet = HcalEmpty;
67  if (in_s_det == "HB")
68  mysubdet = HcalBarrel;
69  else if (in_s_det == "HE")
70  mysubdet = HcalEndcap;
71  else if (in_s_det == "HF")
72  mysubdet = HcalForward;
73 
74  HcalDetId hdid(mysubdet, in_sid * in_et, in_ph, in_dep);
75 
76  HcalFrontEndId hrbx(in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc);
77 
78  // store the different ids
79  hcalEID_ = heid.rawId();
80  hcalDetID_ = hdid.rawId();
81  hcalFrontEndID_ = hrbx.rawId();
82 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.
HBHEHFLogicalMapEntry::~HBHEHFLogicalMapEntry ( )
inline

Definition at line 51 of file HcalMappingEntry.h.

References printLMapLine().

51 {}

Member Function Documentation

const DetId HBHEHFLogicalMapEntry::getDetId ( ) const
inline

Definition at line 56 of file HcalMappingEntry.h.

References hcalDetID_.

Referenced by HcalLogicalMapGenerator::buildHBEFTMap().

56 { return DetId(hcalDetID_); }
Definition: DetId.h:17
const HcalElectronicsId HBHEHFLogicalMapEntry::getHcalElectronicsId ( ) const
inline

Definition at line 55 of file HcalMappingEntry.h.

References hcalEID_.

55 { return HcalElectronicsId(hcalEID_); }
Readout chain identification for Hcal.
const HcalFrontEndId HBHEHFLogicalMapEntry::getHcalFrontEndId ( ) const
inline

Definition at line 57 of file HcalMappingEntry.h.

References hcalFrontEndID_.

uint32_t HBHEHFLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 54 of file HcalMappingEntry.h.

References hcalEID_, and HcalElectronicsId::linearIndex().

Referenced by HcalLogicalMapGenerator::buildHBEFTMap().

constexpr int linearIndex() const
get a fast, compact, unique index for linear lookups
Readout chain identification for Hcal.
char * HBHEHFLogicalMapEntry::printLMapLine ( )

Definition at line 84 of file HcalMappingEntry.cc.

References HcalFrontEndId::adc(), HcalElectronicsId::dccid(), HcalDetId::depth(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), HcalElectronicsId::htrSlot(), HcalElectronicsId::htrTopBottom(), HcalDetId::ietaAbs(), HcalDetId::iphi(), HcalFrontEndId::pixel(), HcalFrontEndId::qieCard(), HcalFrontEndId::rbx(), HcalElectronicsId::readoutVMECrateId(), HcalFrontEndId::rm(), HcalFrontEndId::rmFiber(), HcalElectronicsId::spigot(), HcalDetId::subdet(), and HcalDetId::zside().

Referenced by CALIBLogicalMapEntry::~CALIBLogicalMapEntry(), ~HBHEHFLogicalMapEntry(), HOHXLogicalMapEntry::~HOHXLogicalMapEntry(), HTLogicalMapEntry::~HTLogicalMapEntry(), and ZDCLogicalMapEntry::~ZDCLogicalMapEntry().

84  {
85  static char myline[512];
86 
87  HcalElectronicsId hcaleid(hcalEID_);
88  HcalDetId hcaldid(hcalDetID_);
89  HcalGenericDetId hcalgenid(hcalDetID_);
91 
92  int mydcc_sl = 0;
93  int mydcc = 0;
94  if ((hcaleid.dccid() % 2) == 1) {
95  mydcc_sl = 20;
96  mydcc = 2;
97  } else {
98  mydcc_sl = 10;
99  mydcc = 1;
100  }
101 
102  string myfpga = "";
103  string mydet = "";
104  HcalSubdetector mysubdet = hcaldid.subdet();
105  (mysubdet == 1)
106  ? mydet = "HB"
107  : ((mysubdet == 2) ? mydet = "HE"
108  : ((mysubdet == 3) ? mydet = "HO" : ((mysubdet == 4) ? mydet = "HF" : mydet = "invalid")));
109 
110  (hcaleid.htrTopBottom() == 0) ? myfpga = "bot" : myfpga = "top";
111 
112  sprintf(myline,
113  "%1d %6d %6d %6d %6d %6d %6s %7s %6d %6d %6d",
114  0,
115  hcaldid.zside(),
116  hcaldid.ietaAbs(),
117  hcaldid.iphi(),
118  mydphi_,
119  hcaldid.depth(),
120  mydet.c_str(),
121  rbxid.rbx().c_str(),
122  mywedge_,
123  rbxid.rm(),
124  rbxid.pixel());
125  sprintf(myline + strlen(myline),
126  "%6d %6d %6d %6d %6d %6d %6s",
127  rbxid.qieCard(),
128  rbxid.adc(),
129  rbxid.rmFiber(),
130  hcaleid.fiberChanId(),
131  hcaleid.readoutVMECrateId(),
132  hcaleid.htrSlot(),
133  myfpga.c_str());
134  sprintf(myline + strlen(myline),
135  "%8d %7d %6d %6d %6d %6s",
136  hcaleid.fiberIndex(),
137  mydcc_sl,
138  hcaleid.spigot(),
139  mydcc,
140  myslb_,
141  myslbin_.c_str());
142  sprintf(myline + strlen(myline),
143  "%8s %15s %6d %6d %6d %20s %6d\n",
144  myslbin2_.c_str(),
145  myslnam_.c_str(),
146  myrctcra_,
147  myrctcar_,
148  myrctcon_,
149  myrctnam_.c_str(),
150  hcaleid.dccid() + 700);
151 
152  return myline;
153 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.

Member Data Documentation

uint32_t HBHEHFLogicalMapEntry::hcalDetID_
private

Definition at line 61 of file HcalMappingEntry.h.

Referenced by getDetId(), and HOHXLogicalMapEntry::getDetId().

uint32_t HBHEHFLogicalMapEntry::hcalEID_
private
uint32_t HBHEHFLogicalMapEntry::hcalFrontEndID_
private
int HBHEHFLogicalMapEntry::mydphi_
private

Definition at line 65 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myrctcar_
private

Definition at line 65 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myrctcon_
private

Definition at line 65 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myrctcra_
private

Definition at line 65 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myrctnam_
private

Definition at line 67 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myslb_
private

Definition at line 65 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myslbin2_
private

Definition at line 67 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myslbin_
private

Definition at line 67 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myslnam_
private

Definition at line 67 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::mywedge_
private

Definition at line 65 of file HcalMappingEntry.h.