CMS 3D CMS Logo

FebConnectorSpec Class Reference

Specifies the input for LinkBoard. More...

#include <CondFormats/RPCObjects/interface/FebConnectorSpec.h>

List of all members.

Public Member Functions

void add (const ChamberStripSpec &strip)
 add strip
const ChamberLocationSpecchamber () const
const FebLocationSpecfeb () const
 FebConnectorSpec (int num, const ChamberLocationSpec &chamber, const FebLocationSpec &feb)
 FebConnectorSpec (int num=-1)
int linkBoardInputNum () const
 this FEB channel in LinkBoard
std::string print (int depth=0) const
 debug
const uint32_t & rawId () const
 DetUnit to which data belongs.
const ChamberStripSpecstrip (int pinNumber) const
 strip info for input pin
const std::vector
< ChamberStripSpec > & 
strips () const

Private Attributes

ChamberLocationSpec theChamber
FebLocationSpec theFeb
int theLinkBoardInputNum
uint32_t theRawId
std::vector< ChamberStripSpectheStrips


Detailed Description

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.


Constructor & Destructor Documentation

FebConnectorSpec::FebConnectorSpec ( int  num = -1  )  [inline]

Definition at line 23 of file FebConnectorSpec.h.

FebConnectorSpec::FebConnectorSpec ( int  num,
const ChamberLocationSpec chamber,
const FebLocationSpec feb 
)

Definition at line 6 of file FebConnectorSpec.cc.

00008   : theLinkBoardInputNum(num),
00009     theChamber(chamber),
00010     theFeb(feb),
00011     theRawId(0)
00012 { }


Member Function Documentation

void FebConnectorSpec::add ( const ChamberStripSpec strip  ) 

add strip

Definition at line 14 of file FebConnectorSpec.cc.

References theStrips.

Referenced by RPCEMap::convert(), and popcon::RPCReadOutMappingSourceHandler::readCablingMap().

00015 {
00016   theStrips.push_back(strip);
00017 }

const ChamberLocationSpec& FebConnectorSpec::chamber (  )  const [inline]

Definition at line 39 of file FebConnectorSpec.h.

References theChamber.

Referenced by RPCReadOutMapping::getLBforChamber().

00039 { return theChamber; }

const FebLocationSpec& FebConnectorSpec::feb (  )  const [inline]

Definition at line 40 of file FebConnectorSpec.h.

References theFeb.

00040 { return theFeb; }

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().

00027 { return theLinkBoardInputNum; }

std::string FebConnectorSpec::print ( int  depth = 0  )  const

debug

Definition at line 37 of file FebConnectorSpec.cc.

References lat::endl(), it, linkBoardInputNum(), FebLocationSpec::print(), ChamberLocationSpec::print(), rawId(), theChamber, theFeb, and theStrips.

00038 {
00039   std::ostringstream str;
00040   str << "FebConnectorSpec in LinkBoardNum ="<<linkBoardInputNum()
00041       <<" rawId: " << rawId() <<std::endl;
00042   RPCDetId aDet(rawId());
00043   str<<aDet<<std::endl;
00044   str << theChamber.print(depth)<< std::endl << theFeb.print(depth) ;
00045   depth--;
00046   if (depth >=0) {
00047     typedef std::vector<ChamberStripSpec>::const_iterator IT;
00048     for (IT it=theStrips.begin(); it != theStrips.end(); it++) str << (*it).print(depth); 
00049   }
00050   return str.str();
00051 }

const uint32_t & FebConnectorSpec::rawId (  )  const

DetUnit to which data belongs.

Definition at line 29 of file FebConnectorSpec.cc.

References theChamber, theFeb, and theRawId.

Referenced by RPCReadOutMapping::detUnitFrame(), RPCReadOutMapping::getRAWSpecForCMSChamberSrip(), print(), and RPCReadOutMapping::rawDataFrame().

00030 {
00031   DBSpecToDetUnit toDU;
00032   if (!theRawId)  theRawId = toDU(theChamber, theFeb);
00033   return theRawId;
00034 }

const ChamberStripSpec * FebConnectorSpec::strip ( int  pinNumber  )  const

strip info for input pin

Definition at line 19 of file FebConnectorSpec.cc.

References it, and theStrips.

Referenced by RPCReadOutMapping::detUnitFrame(), and RPCReadOutMapping::getRAWSpecForCMSChamberSrip().

00020 {
00021   //FIXME - temporary implementaion, to be replace by LUT (in preparation)
00022   typedef std::vector<ChamberStripSpec>::const_iterator IT;
00023   for (IT it=theStrips.begin(); it != theStrips.end(); it++) {
00024     if(pinNumber==it->cablePinNumber) return &(*it);
00025   }
00026   return 0;
00027 }

const std::vector<ChamberStripSpec>& FebConnectorSpec::strips (  )  const [inline]

Definition at line 34 of file FebConnectorSpec.h.

References theStrips.

Referenced by RPCReadOutMapping::rawDataFrame().

00034 { return theStrips; }


Member Data Documentation

ChamberLocationSpec FebConnectorSpec::theChamber [private]

Definition at line 48 of file FebConnectorSpec.h.

Referenced by chamber(), print(), and rawId().

FebLocationSpec FebConnectorSpec::theFeb [private]

Definition at line 49 of file FebConnectorSpec.h.

Referenced by feb(), print(), and rawId().

int FebConnectorSpec::theLinkBoardInputNum [private]

Definition at line 46 of file FebConnectorSpec.h.

Referenced by linkBoardInputNum().

uint32_t FebConnectorSpec::theRawId [mutable, private]

Definition at line 52 of file FebConnectorSpec.h.

Referenced by rawId().

std::vector<ChamberStripSpec> FebConnectorSpec::theStrips [private]

Definition at line 51 of file FebConnectorSpec.h.

Referenced by add(), print(), strip(), and strips().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:44 2009 for CMSSW by  doxygen 1.5.4