CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 15 of file HcalMappingEntry.h.

Constructor & Destructor Documentation

HBHEHFLogicalMapEntry::HBHEHFLogicalMapEntry ( )
inline

Definition at line 24 of file HcalMappingEntry.h.

24 {}
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 19 of file HcalMappingEntry.cc.

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

26 {
27  int mytopbot;
28  (in_s_fpga=="bot") ? mytopbot = 0 : mytopbot = 1;
29 
30  mydphi_ = in_dph;
31  mywedge_ = in_wed;
32  myslb_ = in_slb;
33  myrctcra_ = in_rctcra;
34  myrctcar_ = in_rctcar;
35  myrctcon_ = in_rctcon;
36 
37  // string data members
38  myslbin_ = in_s_slb;
39  myslbin2_ = in_s_slb2;
40  myslnam_ = in_s_slnam;
41  myrctnam_ = in_s_rctnam;
42 
43  // create the hcal electronics id
44  HcalElectronicsId heid( in_fi_ch, in_htr_fi, in_spig, in_fed - 700 );
45  heid.setHTR( in_cr, in_htr, mytopbot );
46  // create the hcal detector id
47  HcalSubdetector mysubdet = HcalEmpty;
48  if (in_s_det=="HB") mysubdet = HcalBarrel;
49  else if (in_s_det=="HE") mysubdet = HcalEndcap;
50  else if (in_s_det=="HF") mysubdet = HcalForward;
51 
52  HcalDetId hdid( mysubdet, in_sid*in_et, in_ph, in_dep );
53 
54  HcalFrontEndId hrbx( in_s_rbx, in_rm, in_pix, in_rm_fi, in_fi_ch, in_qie, in_adc );
55 
56  // store the different ids
57  hcalEID_ = heid.rawId();
58  hcalDetID_ = hdid.rawId();
59  hcalFrontEndID_ = hrbx.rawId();
60 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.
HBHEHFLogicalMapEntry::~HBHEHFLogicalMapEntry ( )
inline

Definition at line 33 of file HcalMappingEntry.h.

33 {}

Member Function Documentation

const DetId HBHEHFLogicalMapEntry::getDetId ( ) const
inline

Definition at line 38 of file HcalMappingEntry.h.

References hcalDetID_.

Referenced by HcalLogicalMapGenerator::buildHBEFTMap().

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

Definition at line 37 of file HcalMappingEntry.h.

References hcalEID_.

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

Definition at line 39 of file HcalMappingEntry.h.

References hcalFrontEndID_.

uint32_t HBHEHFLogicalMapEntry::getLinearIndex ( ) const
inline

Definition at line 36 of file HcalMappingEntry.h.

References hcalEID_, and HcalElectronicsId::linearIndex().

Referenced by HcalLogicalMapGenerator::buildHBEFTMap().

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

Definition at line 62 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().

62  {
63 
64  static char myline[512];
65 
66  HcalElectronicsId hcaleid(hcalEID_);
67  HcalDetId hcaldid(hcalDetID_);
68  HcalGenericDetId hcalgenid(hcalDetID_);
70 
71  int mydcc_sl = 0;
72  int mydcc = 0;
73  if ((hcaleid.dccid()%2)==1) {
74  mydcc_sl = 20;
75  mydcc = 2;
76  }
77  else {
78  mydcc_sl = 10;
79  mydcc = 1;
80  }
81 
82  string myfpga = "";
83  string mydet = "";
84  HcalSubdetector mysubdet = hcaldid.subdet();
85  (mysubdet==1) ? mydet = "HB" :
86  ((mysubdet==2) ? mydet = "HE" :
87  ((mysubdet==3) ? mydet = "HO" :
88  ((mysubdet==4) ? mydet = "HF" :
89  mydet = "invalid")));
90 
91  ( hcaleid.htrTopBottom()==0 ) ? myfpga = "bot" : myfpga = "top";
92 
93  sprintf(myline,"%1d %6d %6d %6d %6d %6d %6s %7s %6d %6d %6d",0,hcaldid.zside(),hcaldid.ietaAbs(),hcaldid.iphi(),mydphi_,hcaldid.depth(),mydet.c_str(),rbxid.rbx().c_str(),mywedge_,rbxid.rm(),rbxid.pixel());
94  sprintf(myline+strlen(myline),"%6d %6d %6d %6d %6d %6d %6s",rbxid.qieCard(),rbxid.adc(),rbxid.rmFiber(),hcaleid.fiberChanId(),hcaleid.readoutVMECrateId(),hcaleid.htrSlot(),myfpga.c_str());
95  sprintf(myline+strlen(myline),"%8d %7d %6d %6d %6d %6s",hcaleid.fiberIndex(),mydcc_sl,hcaleid.spigot(),mydcc,myslb_,myslbin_.c_str());
96  sprintf(myline+strlen(myline),"%8s %15s %6d %6d %6d %20s %6d\n",myslbin2_.c_str(),myslnam_.c_str(),myrctcra_,myrctcar_,myrctcon_,myrctnam_.c_str(),hcaleid.dccid()+700);
97 
98  return myline;
99 }
HcalSubdetector
Definition: HcalAssistant.h:31
Readout chain identification for Hcal.

Member Data Documentation

uint32_t HBHEHFLogicalMapEntry::hcalDetID_
private

Definition at line 44 of file HcalMappingEntry.h.

Referenced by getDetId().

uint32_t HBHEHFLogicalMapEntry::hcalEID_
private

Definition at line 43 of file HcalMappingEntry.h.

Referenced by getHcalElectronicsId(), and getLinearIndex().

uint32_t HBHEHFLogicalMapEntry::hcalFrontEndID_
private

Definition at line 45 of file HcalMappingEntry.h.

Referenced by getHcalFrontEndId().

int HBHEHFLogicalMapEntry::mydphi_
private

Definition at line 48 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myrctcar_
private

Definition at line 48 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myrctcon_
private

Definition at line 48 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myrctcra_
private

Definition at line 48 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myrctnam_
private

Definition at line 50 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::myslb_
private

Definition at line 48 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myslbin2_
private

Definition at line 50 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myslbin_
private

Definition at line 50 of file HcalMappingEntry.h.

std::string HBHEHFLogicalMapEntry::myslnam_
private

Definition at line 50 of file HcalMappingEntry.h.

int HBHEHFLogicalMapEntry::mywedge_
private

Definition at line 48 of file HcalMappingEntry.h.