This class implements.. More...
#include <interface/PixelModuleName.h>
Public Member Functions | |
int | blade () const |
char | detsub () const |
int | disk () const |
char | HF () const |
char | IO () const |
int | ladder () const |
int | layer () const |
int | module () const |
std::string | modulename () const |
char | mp () const |
const bool | operator< (const PixelModuleName &aROC) const |
const PixelModuleName & | operator= (const PixelModuleName &aROC) |
const bool | operator== (const PixelModuleName &aModule) const |
int | panel () const |
PixelModuleName (PixelROCName roc) | |
PixelModuleName (std::ifstream &s) | |
PixelModuleName (std::string rocname) | |
PixelModuleName () | |
int | sec () const |
Private Member Functions | |
void | check (bool check, const std::string &name) |
void | parsename (std::string name) |
void | setIdBPix (char np, char LR, int sec, int layer, int ladder, char HF, int module) |
void | setIdFPix (char np, char LR, int disk, int blade, int panel) |
Private Attributes | |
unsigned int | id_ |
Friends | |
std::ostream & | operator<< (std::ostream &s, const PixelModuleName &pixelroc) |
This class implements..
A longer explanation will be placed here later
Definition at line 26 of file PixelModuleName.h.
PixelModuleName::PixelModuleName | ( | ) |
Definition at line 19 of file PixelModuleName.cc.
: id_(0) {}
pos::PixelModuleName::PixelModuleName | ( | std::string | rocname | ) | [explicit] |
PixelModuleName::PixelModuleName | ( | PixelROCName | roc | ) | [explicit] |
Definition at line 24 of file PixelModuleName.cc.
References pos::PixelROCName::id(), and id_.
pos::PixelModuleName::PixelModuleName | ( | std::ifstream & | s | ) | [explicit] |
int pos::PixelModuleName::blade | ( | ) | const [inline] |
void pos::PixelModuleName::check | ( | bool | check, |
const std::string & | name | ||
) | [private] |
Referenced by pos::PixelROCName::parsename().
char pos::PixelModuleName::detsub | ( | ) | const [inline] |
Definition at line 41 of file PixelModuleName.h.
References id_.
Referenced by modulename().
{return (id_&0x80000000)?'B':'F';}
int pos::PixelModuleName::disk | ( | ) | const [inline] |
Definition at line 46 of file PixelModuleName.h.
References id_.
Referenced by modulename(), and pos::PixelROCName::parsename().
char pos::PixelModuleName::HF | ( | ) | const [inline] |
Definition at line 54 of file PixelModuleName.h.
References id_.
Referenced by modulename(), and pos::PixelROCName::parsename().
char pos::PixelModuleName::IO | ( | ) | const [inline] |
Definition at line 43 of file PixelModuleName.h.
References id_.
Referenced by modulename().
{return id_&0x20000000?'I':'O';}
int pos::PixelModuleName::ladder | ( | ) | const [inline] |
Definition at line 53 of file PixelModuleName.h.
References id_.
Referenced by modulename(), and pos::PixelROCName::parsename().
int pos::PixelModuleName::layer | ( | ) | const [inline] |
Definition at line 52 of file PixelModuleName.h.
References id_.
Referenced by modulename(), and pos::PixelROCName::parsename().
int pos::PixelModuleName::module | ( | ) | const [inline] |
string PixelModuleName::modulename | ( | ) | const |
Definition at line 228 of file PixelModuleName.cc.
References blade(), detsub(), disk(), HF(), IO(), ladder(), layer(), module(), mp(), panel(), alignCSCRings::s, and sec().
Referenced by pos::PixelCalibConfiguration::buildROCAndModuleLists(), pos::PixelChannel::modulename(), pos::PixelPortcardMap::PixelPortcardMap(), pos::PixelPortcardMap::PortCardAndAOHs(), pos::PixelDACSettings::writeASCII(), pos::PixelTrimAllPixels::writeASCII(), and pos::PixelMaskAllPixels::writeASCII().
{ string s; std::ostringstream s1; if (detsub()=='F') { s1<<"FPix"; s1<<"_B"; s1<<mp(); s1<<IO(); s1<<"_D"; s1<<disk(); s1<<"_BLD"; s1<<blade(); s1<<"_PNL"; s1<<panel(); } else{ s1<<"BPix"; s1<<"_B"; s1<<mp(); s1<<IO(); s1<<"_SEC"; s1<<sec(); s1<<"_LYR"; s1<<layer(); s1<<"_LDR"; s1<<ladder(); s1<<HF(); s1<<"_MOD"; s1<<module(); } s=s1.str(); return s; }
char pos::PixelModuleName::mp | ( | ) | const [inline] |
Definition at line 42 of file PixelModuleName.h.
References id_.
Referenced by modulename().
{return id_&0x40000000?'p':'m';}
const bool pos::PixelModuleName::operator< | ( | const PixelModuleName & | aROC | ) | const [inline] |
const PixelModuleName & PixelModuleName::operator= | ( | const PixelModuleName & | aROC | ) |
const bool pos::PixelModuleName::operator== | ( | const PixelModuleName & | aModule | ) | const [inline] |
int pos::PixelModuleName::panel | ( | ) | const [inline] |
void pos::PixelModuleName::parsename | ( | std::string | name | ) | [private] |
int pos::PixelModuleName::sec | ( | ) | const [inline] |
Definition at line 51 of file PixelModuleName.h.
References id_.
Referenced by modulename(), and pos::PixelROCName::parsename().
void PixelModuleName::setIdBPix | ( | char | np, |
char | LR, | ||
int | sec, | ||
int | layer, | ||
int | ladder, | ||
char | HF, | ||
int | module | ||
) | [private] |
Definition at line 69 of file PixelModuleName.cc.
References id_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by pos::PixelROCName::parsename().
{ std::string mthn = "[PixelModuleName::setIdBPix()]\t\t\t " ; id_=0; //cout<< __LINE__ << "]\t" << mthn << "BPix ladder: " << ladder << endl; //cout<< __LINE__ << "]\t" << mthn << "np : " << np << endl; //cout<< __LINE__ << "]\t" << mthn << "LR : " << LR << endl; //cout<< __LINE__ << "]\t" << mthn << "disk : " << disk << endl; id_=0x80000000; if (np=='p') id_=(id_|0x40000000); //cout<< __LINE__ << "]\t" << mthn <<"2 id_=" << hex << id_ << dec << endl; if (LR=='I') id_=(id_|0x20000000); //cout<< __LINE__ << "]\t" << mthn <<"3 id_=" << hex << id_ << dec << endl; id_=(id_|((sec-1)<<10)); //cout<< __LINE__ << "]\t" << mthn <<"4 id_=" << hex << id_ << dec << endl; if (HF=='F') id_=(id_|0x00000080); id_=(id_|(layer<<8)); //cout<< __LINE__ << "]\t" << mthn <<"5 id_=" << hex << id_ << dec << endl; id_=(id_|(ladder<<2)); //cout<< __LINE__ << "]\t" << mthn <<"6 id_=" << hex << id_ << dec << endl; id_=(id_|((module-1))); //cout<< __LINE__ << "]\t" << mthn <<"7 id_=" << hex << id_ << dec << endl; }
void PixelModuleName::setIdFPix | ( | char | np, |
char | LR, | ||
int | disk, | ||
int | blade, | ||
int | panel | ||
) | [private] |
Definition at line 43 of file PixelModuleName.cc.
References id_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by pos::PixelROCName::parsename().
{ std::string mthn = "[PixelModuleName::setIdFPix()]\t\t\t " ; id_=0; //cout<< __LINE__ << "]\t" << mthn << "subdet: " << subdet <<endl; //cout<< __LINE__ << "]\t" << mthn << "np : " << np <<endl; //cout<< __LINE__ << "]\t" << mthn << "LR : " << LR <<endl; //cout<< __LINE__ << "]\t" << mthn << "disk : " << disk <<endl; if (np=='p') id_=(id_|0x40000000); //cout<< __LINE__ << "]\t" << mthn <<"2 id_=" << hex << id_ << dec << endl; if (LR=='I') id_=(id_|0x20000000); //cout<< __LINE__ << "]\t" << mthn <<"3 id_=" << hex << id_ << dec << endl; id_=(id_|(disk<<8)); //cout<< __LINE__ << "]\t" << mthn <<"4 id_=" << hex << id_ << dec << endl; id_=(id_|(blade<<3)); //cout<< __LINE__ << "]\t" << mthn <<"5 id_=" << hex << id_ << dec << endl; id_=(id_|((panel-1)<<2)); //cout<< __LINE__ << "]\t" << mthn <<"6 id_=" << hex << id_ << dec << endl; }
std::ostream& operator<< | ( | std::ostream & | s, |
const PixelModuleName & | pixelroc | ||
) | [friend] |
unsigned int pos::PixelModuleName::id_ [private] |
Definition at line 110 of file PixelModuleName.h.
Referenced by blade(), detsub(), disk(), HF(), IO(), ladder(), layer(), module(), mp(), operator<(), operator=(), operator==(), panel(), PixelModuleName(), sec(), setIdBPix(), and setIdFPix().