CMS 3D CMS Logo

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

#include <LinkConnSpec.h>

Public Member Functions

void add (const LinkBoardSpec &lb)
 attach LinkBoard to this link More...
 
const LinkBoardSpeclinkBoard (int linkBoardNumInLink) const
 LB served by this link, identified by its position in link. More...
 
const std::vector< LinkBoardSpec > & linkBoards () const
 
 LinkConnSpec (int num=-1)
 ctor with ID only More...
 
std::string print (int depth=0) const
 debud printaout, call its components with depth dectreased by one More...
 
int triggerBoardInputNumber () const
 this link input number in TriggerBoard More...
 

Private Member Functions

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

Private Attributes

std::vector< LinkBoardSpectheLBs
 
int theTriggerBoardInputNumber
 

Friends

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

Detailed Description

RPC LinkConnection Specification for readout decoding

Definition at line 14 of file LinkConnSpec.h.

Constructor & Destructor Documentation

◆ LinkConnSpec()

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

ctor with ID only

Definition at line 17 of file LinkConnSpec.h.

Member Function Documentation

◆ add()

void LinkConnSpec::add ( const LinkBoardSpec lb)

attach LinkBoard to this link

Definition at line 16 of file LinkConnSpec.cc.

References theLBs.

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

16 { theLBs.push_back(lb); }
std::vector< LinkBoardSpec > theLBs
Definition: LinkConnSpec.h:35

◆ linkBoard()

const LinkBoardSpec * LinkConnSpec::linkBoard ( int  linkBoardNumInLink) const

LB served by this link, identified by its position in link.

Definition at line 18 of file LinkConnSpec.cc.

References theLBs.

Referenced by RPCReadOutMapping::location().

18  {
19  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
20  typedef std::vector<LinkBoardSpec>::const_iterator IT;
21  for (IT it = theLBs.begin(); it != theLBs.end(); it++) {
22  if (linkBoardNumInLink == it->linkBoardNumInLink())
23  return &(*it);
24  }
25  return nullptr;
26 }
std::vector< LinkConnSpec >::const_iterator IT
std::vector< LinkBoardSpec > theLBs
Definition: LinkConnSpec.h:35

◆ linkBoards()

const std::vector<LinkBoardSpec>& LinkConnSpec::linkBoards ( ) const
inline

Definition at line 25 of file LinkConnSpec.h.

References theLBs.

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

25 { return theLBs; }
std::vector< LinkBoardSpec > theLBs
Definition: LinkConnSpec.h:35

◆ print()

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

debud printaout, call its components with depth dectreased by one

Definition at line 4 of file LinkConnSpec.cc.

References LEDCalibrationChannels::depth, str, theLBs, and theTriggerBoardInputNumber.

4  {
5  std::ostringstream str;
6  str << "LinkConnSpec number=" << theTriggerBoardInputNumber << std::endl;
7  depth--;
8  if (depth >= 0) {
9  typedef std::vector<LinkBoardSpec>::const_iterator ILB;
10  for (ILB it = theLBs.begin(); it != theLBs.end(); it++)
11  str << (*it).print(depth);
12  }
13  return str.str();
14 }
int theTriggerBoardInputNumber
Definition: LinkConnSpec.h:34
#define str(s)
std::vector< LinkBoardSpec > theLBs
Definition: LinkConnSpec.h:35

◆ serialize()

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

◆ triggerBoardInputNumber()

int LinkConnSpec::triggerBoardInputNumber ( ) const
inline

this link input number in TriggerBoard

Definition at line 20 of file LinkConnSpec.h.

References theTriggerBoardInputNumber.

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

int theTriggerBoardInputNumber
Definition: LinkConnSpec.h:34

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 37 of file LinkConnSpec.h.

◆ cond::serialization::access

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

Definition at line 37 of file LinkConnSpec.h.

Member Data Documentation

◆ theLBs

std::vector<LinkBoardSpec> LinkConnSpec::theLBs
private

Definition at line 35 of file LinkConnSpec.h.

Referenced by add(), linkBoard(), linkBoards(), and print().

◆ theTriggerBoardInputNumber

int LinkConnSpec::theTriggerBoardInputNumber
private

Definition at line 34 of file LinkConnSpec.h.

Referenced by print(), and triggerBoardInputNumber().