CMS 3D CMS Logo

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

#include <LinkBoardSpec.h>

Public Member Functions

void add (const FebConnectorSpec &feb)
 attach feb More...
 
const FebConnectorSpecfeb (int febInputNum) const
 get Feb by its connection number to this board More...
 
const std::vector< FebConnectorSpec > & febs () const
 
std::string linkBoardName () const
 LB name as in OMDS. More...
 
int linkBoardNumInLink () const
 this LB number in link More...
 
 LinkBoardSpec ()
 dummy More...
 
 LinkBoardSpec (bool master, int linkBoardNumInLin, int lbCode)
 
bool master ()
 true if master LB (is it of any use?) More...
 
std::string print (int depth=0) const
 debud printout More...
 

Private Member Functions

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

Private Attributes

int theCode
 
std::vector< FebConnectorSpectheFebs
 
int theLinkBoardNumInLink
 
bool theMaster
 

Friends

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

Detailed Description

RPC LinkBoard Specification for readout decoding. Provide chamber location specification (as in DB throught FEBs)

Definition at line 13 of file LinkBoardSpec.h.

Constructor & Destructor Documentation

◆ LinkBoardSpec() [1/2]

LinkBoardSpec::LinkBoardSpec ( )
inline

dummy

Definition at line 16 of file LinkBoardSpec.h.

16 : theMaster(false) {}

◆ LinkBoardSpec() [2/2]

LinkBoardSpec::LinkBoardSpec ( bool  master,
int  linkBoardNumInLin,
int  lbCode 
)

real ctor specifyig LB if this LB is master, its number in link, and which chamber it is serving

Definition at line 5 of file LinkBoardSpec.cc.

Member Function Documentation

◆ add()

void LinkBoardSpec::add ( const FebConnectorSpec feb)

attach feb

Definition at line 7 of file LinkBoardSpec.cc.

7 { theFebs.push_back(feb); }

References feb(), and theFebs.

Referenced by RPCEMap::convert(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ feb()

const FebConnectorSpec * LinkBoardSpec::feb ( int  febInputNum) const

get Feb by its connection number to this board

Definition at line 9 of file LinkBoardSpec.cc.

9  {
10  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
11  typedef std::vector<FebConnectorSpec>::const_iterator IT;
12  for (IT it = theFebs.begin(); it != theFebs.end(); it++) {
13  if (febInputNum == it->linkBoardInputNum())
14  return &(*it);
15  }
16  return nullptr;
17 }

References theFebs.

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

◆ febs()

const std::vector<FebConnectorSpec>& LinkBoardSpec::febs ( ) const
inline

Definition at line 36 of file LinkBoardSpec.h.

36 { return theFebs; }

References theFebs.

Referenced by RPCReadOutMapping::rawDataFrame().

◆ linkBoardName()

std::string LinkBoardSpec::linkBoardName ( ) const

LB name as in OMDS.

Definition at line 19 of file LinkBoardSpec.cc.

19  {
20  std::ostringstream lbName;
21  std::string char1Val[2] = {"B", "E"}; // 1,2
22  std::string char2Val[3] = {"N", "M", "P"}; // 0,1,2
23  std::string char4Val[9] = {"0", "1", "2", "3", "A", "B", "C", "D", "E"}; // 0,...,8
24  int n3 = theCode % 10;
25  int num3 = (theCode % 100) / 10;
26  int n2 = (theCode % 1000) / 100;
27  int n1 = (theCode % 10000) / 1000;
28  int wheel = (theCode % 100000) / 10000;
29  if (n2 == 0)
30  wheel = -wheel;
31  int sector = theCode / 100000;
32  std::string sign = "";
33  if (wheel > 0)
34  sign = "+";
35  lbName << "LB_R" << char1Val[n1 - 1] << sign << wheel << "_S" << sector << "_" << char1Val[n1 - 1] << char2Val[n2]
36  << num3 << char4Val[n3] << "_CH" << theLinkBoardNumInLink;
37  return lbName.str();
38 }

References callgraph::n2, Validation_hcalonly_cfi::sign, AlCaHLTBitMon_QueryRunRegistry::string, theCode, theLinkBoardNumInLink, and makeMuonMisalignmentScenario::wheel.

◆ linkBoardNumInLink()

int LinkBoardSpec::linkBoardNumInLink ( ) const
inline

this LB number in link

Definition at line 26 of file LinkBoardSpec.h.

26 { return theLinkBoardNumInLink; }

References theLinkBoardNumInLink.

Referenced by RPCReadOutMappingWithFastSearch::init(), and RPCReadOutMapping::rawDataFrame().

◆ master()

bool LinkBoardSpec::master ( )
inline

true if master LB (is it of any use?)

Definition at line 23 of file LinkBoardSpec.h.

23 { return theMaster; }

References theMaster.

◆ print()

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

debud printout

Definition at line 40 of file LinkBoardSpec.cc.

40  {
41  std::ostringstream str;
42  std::string type = (theMaster) ? "master" : "slave";
43  str << " LinkBoardSpec: " << std::endl
44  << " --->" << type << " linkBoardNumInLink: " << theLinkBoardNumInLink << std::endl;
45  depth--;
46  if (depth >= 0) {
47  typedef std::vector<FebConnectorSpec>::const_iterator IT;
48  for (IT it = theFebs.begin(); it != theFebs.end(); it++)
49  str << (*it).print(depth);
50  }
51  return str.str();
52 }

References LEDCalibrationChannels::depth, str, AlCaHLTBitMon_QueryRunRegistry::string, theFebs, theLinkBoardNumInLink, and theMaster.

Referenced by RPCReadOutMapping::detUnitFrame().

◆ serialize()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 47 of file LinkBoardSpec.h.

◆ cond::serialization::access

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

Definition at line 47 of file LinkBoardSpec.h.

Member Data Documentation

◆ theCode

int LinkBoardSpec::theCode
private

Definition at line 44 of file LinkBoardSpec.h.

Referenced by linkBoardName().

◆ theFebs

std::vector<FebConnectorSpec> LinkBoardSpec::theFebs
private

Definition at line 45 of file LinkBoardSpec.h.

Referenced by add(), feb(), febs(), and print().

◆ theLinkBoardNumInLink

int LinkBoardSpec::theLinkBoardNumInLink
private

Definition at line 43 of file LinkBoardSpec.h.

Referenced by linkBoardName(), linkBoardNumInLink(), and print().

◆ theMaster

bool LinkBoardSpec::theMaster
private

Definition at line 42 of file LinkBoardSpec.h.

Referenced by master(), and print().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
LinkBoardSpec::theLinkBoardNumInLink
int theLinkBoardNumInLink
Definition: LinkBoardSpec.h:43
LinkBoardSpec::theFebs
std::vector< FebConnectorSpec > theFebs
Definition: LinkBoardSpec.h:45
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
str
#define str(s)
Definition: TestProcessor.cc:53
callgraph.n2
n2
Definition: callgraph.py:50
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
LinkBoardSpec::theMaster
bool theMaster
Definition: LinkBoardSpec.h:42
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
LinkBoardSpec::theCode
int theCode
Definition: LinkBoardSpec.h:44
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
LinkBoardSpec::feb
const FebConnectorSpec * feb(int febInputNum) const
get Feb by its connection number to this board
Definition: LinkBoardSpec.cc:9