CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
FebConnectorSpec Class Reference

#include <FebConnectorSpec.h>

Public Member Functions

void addStrips (int algo)
 add strip info More...
 
const int cablePinNum (int istrip) const
 
const ChamberLocationSpecchamber () const
 
const int chamberStripNum (int istrip) const
 
const int cmsStripNum (int istrip) 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 More...
 
const int nstrips () const
 
std::string print (int depth=0) const
 debug More...
 
const uint32_t & rawId () const
 DetUnit to which data belongs. More...
 
const ChamberStripSpec strip (int pinNumber) const
 strip info for input pin More...
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

int theAlgo
 
ChamberLocationSpec theChamber
 
FebLocationSpec theFeb
 
int theLinkBoardInputNum
 
uint32_t theRawId
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

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 23 of file FebConnectorSpec.h.

Constructor & Destructor Documentation

◆ FebConnectorSpec() [1/2]

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

Definition at line 25 of file FebConnectorSpec.h.

◆ FebConnectorSpec() [2/2]

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

Definition at line 6 of file FebConnectorSpec.cc.

Member Function Documentation

◆ addStrips()

void FebConnectorSpec::addStrips ( int  algo)
inline

add strip info

Definition at line 32 of file FebConnectorSpec.h.

32 { theAlgo = algo; }

References theAlgo.

Referenced by RPCEMap::convert().

◆ cablePinNum()

const int FebConnectorSpec::cablePinNum ( int  istrip) const

Definition at line 52 of file FebConnectorSpec.cc.

52  {
53  int nStrips = theAlgo / 10000;
54  if (istrip < 0 || istrip > nStrips - 1)
55  return 0;
56  int pinAlgo = theAlgo % 100;
57  if (pinAlgo > 3)
58  pinAlgo = pinAlgo - 4;
59  bool holeatpin9 = (pinAlgo == 0 && istrip > 6);
60  int thePin = istrip + pinAlgo + holeatpin9 + 2 * (pinAlgo == 0);
61  return thePin;
62 }

References me0TriggerPseudoDigis_cff::nStrips, and theAlgo.

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

◆ chamber()

const ChamberLocationSpec& FebConnectorSpec::chamber ( ) const
inline

Definition at line 40 of file FebConnectorSpec.h.

40 { return theChamber; }

References theChamber.

Referenced by RPCReadOutMapping::getLBforChamber(), and geometryXMLparser.CSCAlignable::index().

◆ chamberStripNum()

const int FebConnectorSpec::chamberStripNum ( int  istrip) const

Definition at line 40 of file FebConnectorSpec.cc.

40  {
41  int nStrips = theAlgo / 10000;
42  if (istrip < 0 || istrip > nStrips - 1)
43  return 0;
44  int firstChamberStrip = (theAlgo - 10000 * nStrips) / 100;
45  int pinAlgo = theAlgo - 10000 * nStrips - 100 * firstChamberStrip;
46  int theStrip = firstChamberStrip + istrip;
47  if (pinAlgo > 3)
48  theStrip = firstChamberStrip - istrip;
49  return theStrip;
50 }

References me0TriggerPseudoDigis_cff::nStrips, and theAlgo.

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

◆ cmsStripNum()

const int FebConnectorSpec::cmsStripNum ( int  istrip) const
inline

Definition at line 47 of file FebConnectorSpec.h.

47 { return 0; }

Referenced by print().

◆ feb()

const FebLocationSpec& FebConnectorSpec::feb ( ) const
inline

Definition at line 41 of file FebConnectorSpec.h.

41 { return theFeb; }

References theFeb.

◆ linkBoardInputNum()

int FebConnectorSpec::linkBoardInputNum ( ) const
inline

this FEB channel in LinkBoard

Definition at line 29 of file FebConnectorSpec.h.

29 { return theLinkBoardInputNum; }

References theLinkBoardInputNum.

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

◆ nstrips()

const int FebConnectorSpec::nstrips ( ) const
inline

Definition at line 43 of file FebConnectorSpec.h.

43 { return theAlgo / 10000; }

References theAlgo.

Referenced by RPCReadOutMapping::rawDataFrame().

◆ print()

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

debug

Definition at line 71 of file FebConnectorSpec.cc.

71  {
72  std::ostringstream str;
73  str << "FebConnectorSpec in LinkBoardNum =" << linkBoardInputNum() << " rawId: " << rawId() << std::endl;
74  RPCDetId aDet(rawId());
75  str << aDet << std::endl;
76  str << theChamber.print(depth) << std::endl << theFeb.print(depth);
77  depth--;
78  if (depth >= 0) {
79  int nStrips = theAlgo / 10000;
80  for (int istrip = 0; istrip < nStrips; istrip++) {
81  ChamberStripSpec aStrip = {cablePinNum(istrip), chamberStripNum(istrip), cmsStripNum(istrip)};
82  str << aStrip.print(depth);
83  }
84  }
85  return str.str();
86 }

References cablePinNum(), chamberStripNum(), cmsStripNum(), LEDCalibrationChannels::depth, linkBoardInputNum(), me0TriggerPseudoDigis_cff::nStrips, ChamberStripSpec::print(), FebLocationSpec::print(), ChamberLocationSpec::print(), rawId(), str, theAlgo, theChamber, and theFeb.

◆ rawId()

const uint32_t & FebConnectorSpec::rawId ( ) const

DetUnit to which data belongs.

Definition at line 64 of file FebConnectorSpec.cc.

64  {
65  DBSpecToDetUnit toDU;
66  if (!theRawId)
67  theRawId = toDU(theChamber, theFeb);
68  return theRawId;
69 }

References theChamber, theFeb, and theRawId.

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

◆ serialize()

template<class Archive >
void FebConnectorSpec::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ strip()

const ChamberStripSpec FebConnectorSpec::strip ( int  pinNumber) const

strip info for input pin

Definition at line 9 of file FebConnectorSpec.cc.

9  {
10  int nStrips = theAlgo / 10000;
11  int firstChamberStrip = (theAlgo - 10000 * nStrips) / 100;
12  int pinAlgo = theAlgo - 10000 * nStrips - 100 * firstChamberStrip;
13  int slope = 1;
14  if (pinAlgo > 3) {
15  pinAlgo = pinAlgo - 4;
16  slope = -1;
17  }
18  bool valid = true;
19  if (pinNumber < pinAlgo)
20  valid = false;
21  if (!pinAlgo && (pinNumber < 2))
22  valid = false;
23  if (pinAlgo && (pinNumber > pinAlgo + nStrips - 1))
24  valid = false;
25  if (!pinAlgo && (pinNumber > nStrips + 2 || pinNumber == 9))
26  valid = false;
27  int chamberStripNumber = -1;
28  if (valid) {
29  if (pinAlgo != 0)
30  chamberStripNumber = firstChamberStrip + slope * (pinNumber - pinAlgo);
31  else if (pinNumber < 9)
32  chamberStripNumber = firstChamberStrip + slope * (pinNumber - 2);
33  else
34  chamberStripNumber = firstChamberStrip + slope * (pinNumber - 3);
35  }
36  ChamberStripSpec aStrip = {pinNumber, chamberStripNumber, 0};
37  return aStrip;
38 }

References me0TriggerPseudoDigis_cff::nStrips, slope, theAlgo, and RunInfoPI::valid.

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 63 of file FebConnectorSpec.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 63 of file FebConnectorSpec.h.

Member Data Documentation

◆ theAlgo

int FebConnectorSpec::theAlgo
private

Definition at line 60 of file FebConnectorSpec.h.

Referenced by addStrips(), cablePinNum(), chamberStripNum(), nstrips(), print(), and strip().

◆ theChamber

ChamberLocationSpec FebConnectorSpec::theChamber
private

Definition at line 57 of file FebConnectorSpec.h.

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

◆ theFeb

FebLocationSpec FebConnectorSpec::theFeb
private

Definition at line 58 of file FebConnectorSpec.h.

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

◆ theLinkBoardInputNum

int FebConnectorSpec::theLinkBoardInputNum
private

Definition at line 55 of file FebConnectorSpec.h.

Referenced by linkBoardInputNum().

◆ theRawId

uint32_t FebConnectorSpec::theRawId
mutableprivate

Definition at line 61 of file FebConnectorSpec.h.

Referenced by rawId().

FebLocationSpec::print
std::string print(int depth=0) const
Definition: FebLocationSpec.cc:11
DBSpecToDetUnit
Definition: DBSpecToDetUnit.h:8
FebConnectorSpec::theFeb
FebLocationSpec theFeb
Definition: FebConnectorSpec.h:58
RPCDetId
Definition: RPCDetId.h:16
ChamberStripSpec
Definition: ChamberStripSpec.h:11
ChamberLocationSpec::print
std::string print(int depth=0) const
debug printout
Definition: ChamberLocationSpec.cc:4
FebConnectorSpec::theChamber
ChamberLocationSpec theChamber
Definition: FebConnectorSpec.h:57
FebConnectorSpec::cablePinNum
const int cablePinNum(int istrip) const
Definition: FebConnectorSpec.cc:52
FebConnectorSpec::chamberStripNum
const int chamberStripNum(int istrip) const
Definition: FebConnectorSpec.cc:40
cmsdt::algo
algo
Definition: constants.h:164
FebConnectorSpec::theLinkBoardInputNum
int theLinkBoardInputNum
Definition: FebConnectorSpec.h:55
str
#define str(s)
Definition: TestProcessor.cc:51
FebConnectorSpec::theAlgo
int theAlgo
Definition: FebConnectorSpec.h:60
FebConnectorSpec::rawId
const uint32_t & rawId() const
DetUnit to which data belongs.
Definition: FebConnectorSpec.cc:64
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
FebConnectorSpec::feb
const FebLocationSpec & feb() const
Definition: FebConnectorSpec.h:41
FebConnectorSpec::theRawId
uint32_t theRawId
Definition: FebConnectorSpec.h:61
ChamberStripSpec::print
std::string print(int depth=0) const
debug printout
Definition: ChamberStripSpec.cc:4
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
me0TriggerPseudoDigis_cff.nStrips
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
Definition: me0TriggerPseudoDigis_cff.py:26
FebConnectorSpec::linkBoardInputNum
int linkBoardInputNum() const
this FEB channel in LinkBoard
Definition: FebConnectorSpec.h:29
FebConnectorSpec::chamber
const ChamberLocationSpec & chamber() const
Definition: FebConnectorSpec.h:40
RunInfoPI::valid
Definition: RunInfoPayloadInspectoHelper.h:16
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6
FebConnectorSpec::cmsStripNum
const int cmsStripNum(int istrip) const
Definition: FebConnectorSpec.h:47