#include <FebConnectorSpec.h>
Public Member Functions | |
void | addStrips (int algo) |
add strip info | |
const int | cablePinNum (int istrip) const |
const ChamberLocationSpec & | chamber () const |
const int | chamberStripNum (int istrip) const |
const int | cmsStripNum (int istrip) const |
const FebLocationSpec & | feb () const |
FebConnectorSpec (int num=-1) | |
FebConnectorSpec (int num, const ChamberLocationSpec &chamber, const FebLocationSpec &feb) | |
int | linkBoardInputNum () const |
this FEB channel in LinkBoard | |
const int | nstrips () const |
std::string | print (int depth=0) const |
debug | |
const uint32_t & | rawId () const |
DetUnit to which data belongs. | |
const ChamberStripSpec | strip (int pinNumber) const |
strip info for input pin | |
Private Attributes | |
int | theAlgo |
ChamberLocationSpec | theChamber |
FebLocationSpec | theFeb |
int | theLinkBoardInputNum |
uint32_t | theRawId |
Specifies the input for LinkBoard. In hardware the data goes through FEB connector which collects data from input strips. This class provides access to strip on one side and DetUnit location (through ChamberLocationSpec and FebSpec info) on the other side.
FIXME - afer debug fill theRawId in constructor and remove theChamber,theFeb
Definition at line 21 of file FebConnectorSpec.h.
FebConnectorSpec::FebConnectorSpec | ( | int | num = -1 | ) | [inline] |
Definition at line 23 of file FebConnectorSpec.h.
: theLinkBoardInputNum(num), theRawId(0) { }
FebConnectorSpec::FebConnectorSpec | ( | int | num, |
const ChamberLocationSpec & | chamber, | ||
const FebLocationSpec & | feb | ||
) |
Definition at line 6 of file FebConnectorSpec.cc.
: theLinkBoardInputNum(num), theChamber(chamber), theFeb(feb), theAlgo(0), theRawId(0) { }
void FebConnectorSpec::addStrips | ( | int | algo | ) | [inline] |
add strip info
Definition at line 30 of file FebConnectorSpec.h.
References theAlgo.
Referenced by RPCEMap::convert().
{ theAlgo = algo; }
const int FebConnectorSpec::cablePinNum | ( | int | istrip | ) | const |
Definition at line 50 of file FebConnectorSpec.cc.
References theAlgo.
Referenced by print(), and RPCReadOutMapping::rawDataFrame().
const ChamberLocationSpec& FebConnectorSpec::chamber | ( | ) | const [inline] |
Definition at line 40 of file FebConnectorSpec.h.
References theChamber.
Referenced by RPCReadOutMapping::getLBforChamber().
{ return theChamber; }
const int FebConnectorSpec::chamberStripNum | ( | int | istrip | ) | const |
Definition at line 40 of file FebConnectorSpec.cc.
References theAlgo.
Referenced by print(), and RPCReadOutMapping::rawDataFrame().
const int FebConnectorSpec::cmsStripNum | ( | int | istrip | ) | const [inline] |
const FebLocationSpec& FebConnectorSpec::feb | ( | ) | const [inline] |
int FebConnectorSpec::linkBoardInputNum | ( | ) | const [inline] |
this FEB channel in LinkBoard
Definition at line 27 of file FebConnectorSpec.h.
References theLinkBoardInputNum.
Referenced by print(), and RPCReadOutMapping::rawDataFrame().
{ return theLinkBoardInputNum; }
const int FebConnectorSpec::nstrips | ( | ) | const [inline] |
Definition at line 43 of file FebConnectorSpec.h.
References theAlgo.
Referenced by RPCReadOutMapping::rawDataFrame().
{ return theAlgo/10000; }
std::string FebConnectorSpec::print | ( | int | depth = 0 | ) | const |
debug
Definition at line 68 of file FebConnectorSpec.cc.
References cablePinNum(), chamberStripNum(), cmsStripNum(), linkBoardInputNum(), FebLocationSpec::print(), ChamberLocationSpec::print(), ChamberStripSpec::print(), rawId(), theAlgo, theChamber, and theFeb.
{ std::ostringstream str; str << "FebConnectorSpec in LinkBoardNum ="<<linkBoardInputNum() <<" rawId: " << rawId() <<std::endl; RPCDetId aDet(rawId()); str<<aDet<<std::endl; str << theChamber.print(depth)<< std::endl << theFeb.print(depth) ; depth--; if (depth >=0) { int nStrips=theAlgo/10000; for (int istrip=0; istrip<nStrips; istrip++) { ChamberStripSpec aStrip={cablePinNum(istrip),chamberStripNum(istrip),cmsStripNum(istrip)}; str << aStrip.print(depth); } } return str.str(); }
const uint32_t & FebConnectorSpec::rawId | ( | ) | const |
DetUnit to which data belongs.
Definition at line 60 of file FebConnectorSpec.cc.
References theChamber, theFeb, and theRawId.
Referenced by RPCReadOutMapping::detUnitFrame(), RPCReadOutMapping::getRAWSpecForCMSChamberSrip(), print(), and RPCReadOutMapping::rawDataFrame().
{ DBSpecToDetUnit toDU; if (!theRawId) theRawId = toDU(theChamber, theFeb); return theRawId; }
const ChamberStripSpec FebConnectorSpec::strip | ( | int | pinNumber | ) | const |
strip info for input pin
Definition at line 15 of file FebConnectorSpec.cc.
References slope, theAlgo, and TrackValidation_HighPurity_cff::valid.
Referenced by RPCReadOutMapping::detUnitFrame(), and RPCReadOutMapping::getRAWSpecForCMSChamberSrip().
{ int nStrips=theAlgo/10000; int firstChamberStrip=(theAlgo-10000*nStrips)/100; int pinAlgo=theAlgo-10000*nStrips-100*firstChamberStrip; int slope=1; if (pinAlgo > 3) { pinAlgo=pinAlgo-4; slope=-1; } bool valid=true; if (pinNumber < pinAlgo) valid=false; if (!pinAlgo && (pinNumber < 2)) valid=false; if (pinAlgo && (pinNumber > pinAlgo+nStrips-1)) valid=false; if (!pinAlgo && (pinNumber > nStrips+2 || pinNumber == 9)) valid=false; int chamberStripNumber=-1; if (valid) { if (pinAlgo !=0) chamberStripNumber=firstChamberStrip+slope*(pinNumber-pinAlgo); else if (pinNumber < 9) chamberStripNumber=firstChamberStrip+slope*(pinNumber-2); else chamberStripNumber=firstChamberStrip+slope*(pinNumber-3); } ChamberStripSpec aStrip={pinNumber,chamberStripNumber,0}; return aStrip; }
int FebConnectorSpec::theAlgo [private] |
Definition at line 60 of file FebConnectorSpec.h.
Referenced by addStrips(), cablePinNum(), chamberStripNum(), nstrips(), print(), and strip().
Definition at line 57 of file FebConnectorSpec.h.
FebLocationSpec FebConnectorSpec::theFeb [private] |
Definition at line 58 of file FebConnectorSpec.h.
int FebConnectorSpec::theLinkBoardInputNum [private] |
Definition at line 55 of file FebConnectorSpec.h.
Referenced by linkBoardInputNum().
uint32_t FebConnectorSpec::theRawId [mutable, private] |
Definition at line 61 of file FebConnectorSpec.h.
Referenced by rawId().