#include <HcalFrontEndId.h>
Public Member Functions | |
int | adc () const |
int | fiberChannel () const |
HcalFrontEndId (uint32_t id) | |
HcalFrontEndId (const std::string &rbx, int rm, int pixel, int rmfiber, int fiberchannel, int qiecard, int adc) | |
HcalFrontEndId () | |
bool | null () const |
int | operator!= (const HcalFrontEndId &id) const |
int | operator< (const HcalFrontEndId &id) const |
int | operator== (const HcalFrontEndId &id) const |
int | pixel () const |
int | qieCard () const |
uint32_t | rawId () const |
std::string | rbx () const |
int | rbxIndex () const |
int | rm () const |
int | rmFiber () const |
int | rmIndex () const |
~HcalFrontEndId () | |
Static Public Attributes | |
static const int | maxRbxIndex = 0xFF |
static const int | maxRmIndex = 0x3FF |
Private Attributes | |
uint32_t | hcalFrontEndId_ |
Definition at line 8 of file HcalFrontEndId.h.
HcalFrontEndId::HcalFrontEndId | ( | ) | [inline] |
Definition at line 10 of file HcalFrontEndId.h.
: hcalFrontEndId_(0) {}
HcalFrontEndId::HcalFrontEndId | ( | uint32_t | id | ) | [inline] |
Definition at line 11 of file HcalFrontEndId.h.
References hcalFrontEndId_, and errorMatrix2Lands_multiChannel::id.
{hcalFrontEndId_=id;};
HcalFrontEndId::HcalFrontEndId | ( | const std::string & | rbx, |
int | rm, | ||
int | pixel, | ||
int | rmfiber, | ||
int | fiberchannel, | ||
int | qiecard, | ||
int | adc | ||
) |
Definition at line 8 of file HcalFrontEndId.cc.
References hcalFrontEndId_.
{ hcalFrontEndId_=0; if (rbx.size()<5) return; if (rm<1 || rm>5) return; //changed to 5 to incorporate CALIB channels which define RM = 5 if (pixel<0 || pixel>19) return; if (rmfiber<1 || rmfiber>8) return; if (fiberchannel<0 || fiberchannel>2) return; if (qie<1 || qie>4) return; if (adc<0 || adc>5) return; int num=-1; if (!rbx.compare(0,3,"HBM" )) { num=0 + atoi(rbx.substr(3,2).c_str())-1; } else if (!rbx.compare(0,3,"HBP" )) { num=18 + atoi(rbx.substr(3,2).c_str())-1; } else if (!rbx.compare(0,3,"HEM" )) { num=18*2 + atoi(rbx.substr(3,2).c_str())-1; } else if (!rbx.compare(0,3,"HEP" )) { num=18*3 + atoi(rbx.substr(3,2).c_str())-1; } else if (!rbx.compare(0,4,"HO2M")) { num=18*4 + atoi(rbx.substr(4,2).c_str())-1; } else if (!rbx.compare(0,4,"HO1M")) { num=18*4+12 + atoi(rbx.substr(4,2).c_str())-1; } else if (!rbx.compare(0,3,"HO0" )) { num=18*4+12*2 + atoi(rbx.substr(3,2).c_str())-1; } else if (!rbx.compare(0,4,"HO1P")) { num=18*4+12*3 + atoi(rbx.substr(4,2).c_str())-1; } else if (!rbx.compare(0,4,"HO2P")) { num=18*4+12*4 + atoi(rbx.substr(4,2).c_str())-1; } else if (!rbx.compare(0,3,"HFM" )) { num=18*4+12*5 + atoi(rbx.substr(3,2).c_str())-1; } else if (!rbx.compare(0,3,"HFP" )) { num=18*4+12*6 + atoi(rbx.substr(3,2).c_str())-1; } else return; hcalFrontEndId_|=((adc+1)&0x7); hcalFrontEndId_|=((qie-1)&0x3)<<3; hcalFrontEndId_|=(fiberchannel&0x3)<<5; hcalFrontEndId_|=((rmfiber-1)&0x7)<<7; hcalFrontEndId_|=(pixel&0x1F)<<10; hcalFrontEndId_|=((rm-1)&0x7)<<15; hcalFrontEndId_|=(num&0xFF)<<18; }
HcalFrontEndId::~HcalFrontEndId | ( | ) |
Definition at line 43 of file HcalFrontEndId.cc.
{ }
int HcalFrontEndId::adc | ( | ) | const [inline] |
Definition at line 31 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by HOHXLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), and printTableLine().
{return (hcalFrontEndId_&0x7)-1;}
int HcalFrontEndId::fiberChannel | ( | ) | const [inline] |
Definition at line 29 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by printTableLine().
{return (hcalFrontEndId_>>5)&0x3;}
bool HcalFrontEndId::null | ( | ) | const [inline] |
Definition at line 23 of file HcalFrontEndId.h.
References hcalFrontEndId_.
{ return hcalFrontEndId_==0; }
int HcalFrontEndId::operator!= | ( | const HcalFrontEndId & | id | ) | const [inline] |
Definition at line 34 of file HcalFrontEndId.h.
References hcalFrontEndId_.
{ return id.hcalFrontEndId_!=hcalFrontEndId_; }
int HcalFrontEndId::operator< | ( | const HcalFrontEndId & | id | ) | const [inline] |
Definition at line 35 of file HcalFrontEndId.h.
References hcalFrontEndId_.
{ return hcalFrontEndId_<id.hcalFrontEndId_; }
int HcalFrontEndId::operator== | ( | const HcalFrontEndId & | id | ) | const [inline] |
Definition at line 33 of file HcalFrontEndId.h.
References hcalFrontEndId_.
{ return id.hcalFrontEndId_==hcalFrontEndId_; }
int HcalFrontEndId::pixel | ( | ) | const [inline] |
Definition at line 27 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by HOHXLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), and printTableLine().
{return (hcalFrontEndId_>>10)&0x1F;}
int HcalFrontEndId::qieCard | ( | ) | const [inline] |
Definition at line 30 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by HOHXLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), and printTableLine().
{return ((hcalFrontEndId_>>3)&0x3)+1;}
uint32_t HcalFrontEndId::rawId | ( | ) | const [inline] |
Definition at line 14 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by CALIBLogicalMapEntry::CALIBLogicalMapEntry(), HBHEHFLogicalMapEntry::HBHEHFLogicalMapEntry(), and HOHXLogicalMapEntry::HOHXLogicalMapEntry().
{return hcalFrontEndId_;}
std::string HcalFrontEndId::rbx | ( | ) | const |
Definition at line 47 of file HcalFrontEndId.cc.
References hcalFrontEndId_, and subdets.
Referenced by HcalDetDiagLEDMonitor::fillHistos(), HOHXLogicalMapEntry::printLMapLine(), CALIBLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), and printTableLine().
{ std::string subdets[11]={"HBM","HBP","HEM","HEP","HO2M","HO1M","HO0","HO1P","HO2P","HFM","HFP"}; int box=hcalFrontEndId_>>18; int num=-1; int subdet_index=-1; if (box<18*4) { num=box%18; subdet_index=(box-num)/18; } else { num=(box-18*4)%12; subdet_index=4+(box-18*4-num)/12; } std::stringstream tempss; tempss << std::setw(2) << std::setfill('0') << num+1; return subdets[subdet_index]+tempss.str(); }
int HcalFrontEndId::rbxIndex | ( | ) | const [inline] |
Definition at line 17 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by HcalDeadCellMonitor::fillNevents_recentdigis(), HcalDeadCellMonitor::fillNevents_recentrechits(), and rmIndex().
{return (hcalFrontEndId_>>18);}
int HcalFrontEndId::rm | ( | ) | const [inline] |
Definition at line 26 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by HcalDetDiagLEDMonitor::fillHistos(), HOHXLogicalMapEntry::printLMapLine(), CALIBLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), printTableLine(), and rmIndex().
{return ((hcalFrontEndId_>>15)&0x7)+1;}
int HcalFrontEndId::rmFiber | ( | ) | const [inline] |
Definition at line 28 of file HcalFrontEndId.h.
References hcalFrontEndId_.
Referenced by HOHXLogicalMapEntry::printLMapLine(), CALIBLogicalMapEntry::printLMapLine(), HBHEHFLogicalMapEntry::printLMapLine(), and printTableLine().
{return ((hcalFrontEndId_>>7)&0x7)+1;}
int HcalFrontEndId::rmIndex | ( | ) | const [inline] |
Definition at line 20 of file HcalFrontEndId.h.
References rbxIndex(), and rm().
Referenced by HcalDetDiagNoiseMonitor::analyze().
uint32_t HcalFrontEndId::hcalFrontEndId_ [private] |
Definition at line 38 of file HcalFrontEndId.h.
Referenced by adc(), fiberChannel(), HcalFrontEndId(), null(), operator!=(), operator<(), operator==(), pixel(), qieCard(), rawId(), rbx(), rbxIndex(), rm(), and rmFiber().
const int HcalFrontEndId::maxRbxIndex = 0xFF [static] |
Definition at line 18 of file HcalFrontEndId.h.
const int HcalFrontEndId::maxRmIndex = 0x3FF [static] |
Definition at line 21 of file HcalFrontEndId.h.
Referenced by HcalDetDiagNoiseMonitor::analyze(), HcalDetDiagNoiseMonitor::endLuminosityBlock(), HBHEStatusBitSetter::HBHEStatusBitSetter(), HcalDetDiagNoiseRMSummary::reset(), HcalDetDiagNoiseRMSummary::reset_LS(), HcalDetDiagNoiseMonitor::SaveRates(), and HcalDetDiagNoiseMonitor::UpdateHistos().