CMS 3D CMS Logo

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

#include <TriggerBoardSpec.h>

Public Member Functions

void add (const LinkConnSpec &lc)
 attach connection to TB More...
 
int dccInputChannelNum () const
 input channel number to DCC More...
 
std::vector< const LinkConnSpec * > enabledLinkConns () const
 not masked links belonging to this TB More...
 
const LinkConnSpeclinkConn (int tbInputNumber) const
 link attached to this TB with given input number More...
 
const std::vector< LinkConnSpeclinkConns () const
 all links kept by this TB More...
 
std::string print (int depth=0) const
 debud printaout, call its components with depth dectreased by one More...
 
void setMaskedLinks (uint32_t aMask)
 set mask links More...
 
 TriggerBoardSpec (int num=-1, uint32_t aMask=0)
 ctor with ID only More...
 

Private Member Functions

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

Private Attributes

std::vector< LinkConnSpectheLinks
 
uint32_t theMaskedLinks
 
int theNum
 

Friends

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

Detailed Description

RPC Trigger Board specification for readout decoding

Definition at line 14 of file TriggerBoardSpec.h.

Constructor & Destructor Documentation

◆ TriggerBoardSpec()

TriggerBoardSpec::TriggerBoardSpec ( int  num = -1,
uint32_t  aMask = 0 
)

ctor with ID only

Definition at line 7 of file TriggerBoardSpec.cc.

7 : theNum(num), theMaskedLinks(aMask) {}

Member Function Documentation

◆ add()

void TriggerBoardSpec::add ( const LinkConnSpec lc)

attach connection to TB

Definition at line 41 of file TriggerBoardSpec.cc.

41 { theLinks.push_back(lc); }

References theLinks.

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

◆ dccInputChannelNum()

int TriggerBoardSpec::dccInputChannelNum ( ) const
inline

input channel number to DCC

Definition at line 20 of file TriggerBoardSpec.h.

20 { return theNum; }

References theNum.

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

◆ enabledLinkConns()

std::vector< const LinkConnSpec * > TriggerBoardSpec::enabledLinkConns ( ) const

not masked links belonging to this TB

Definition at line 18 of file TriggerBoardSpec.cc.

18  {
19  std::vector<const LinkConnSpec*> result;
20  for (IT it = theLinks.begin(); it != theLinks.end(); it++) {
21  //
22  // check that link is not masked!
23  // std::cout <<"masked links:"<<theMaskedLinks<<std::endl;
24  //
25  result.push_back(&(*it));
26  }
27  return result;
28 }

References mps_fire::result, and theLinks.

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

◆ linkConn()

const LinkConnSpec * TriggerBoardSpec::linkConn ( int  tbInputNumber) const

link attached to this TB with given input number

Definition at line 9 of file TriggerBoardSpec.cc.

9  {
10  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
11  for (IT it = theLinks.begin(); it != theLinks.end(); it++) {
12  if (tbInputNumber == it->triggerBoardInputNumber())
13  return &(*it);
14  }
15  return nullptr;
16 }

References theLinks.

Referenced by RPCReadOutMapping::location().

◆ linkConns()

const std::vector<LinkConnSpec> TriggerBoardSpec::linkConns ( ) const
inline

all links kept by this TB

Definition at line 29 of file TriggerBoardSpec.h.

29 { return theLinks; }

References theLinks.

◆ print()

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

debud printaout, call its components with depth dectreased by one

Definition at line 30 of file TriggerBoardSpec.cc.

30  {
31  std::ostringstream str;
32  str << "TriggerBoardSpec: num=" << dccInputChannelNum() << std::endl;
33  depth--;
34  if (depth >= 0) {
35  for (IT ic = theLinks.begin(); ic != theLinks.end(); ic++)
36  str << (*ic).print(depth);
37  }
38  return str.str();
39 }

References dccInputChannelNum(), LEDCalibrationChannels::depth, str, and theLinks.

◆ serialize()

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

◆ setMaskedLinks()

void TriggerBoardSpec::setMaskedLinks ( uint32_t  aMask)
inline

set mask links

Definition at line 35 of file TriggerBoardSpec.h.

35 { theMaskedLinks = aMask; }

References theMaskedLinks.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 45 of file TriggerBoardSpec.h.

◆ cond::serialization::access

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

Definition at line 45 of file TriggerBoardSpec.h.

Member Data Documentation

◆ theLinks

std::vector<LinkConnSpec> TriggerBoardSpec::theLinks
private

Definition at line 43 of file TriggerBoardSpec.h.

Referenced by add(), enabledLinkConns(), linkConn(), linkConns(), and print().

◆ theMaskedLinks

uint32_t TriggerBoardSpec::theMaskedLinks
private

Definition at line 42 of file TriggerBoardSpec.h.

Referenced by setMaskedLinks().

◆ theNum

int TriggerBoardSpec::theNum
private

Definition at line 41 of file TriggerBoardSpec.h.

Referenced by dccInputChannelNum().

TriggerBoardSpec::theMaskedLinks
uint32_t theMaskedLinks
Definition: TriggerBoardSpec.h:42
TriggerBoardSpec::theLinks
std::vector< LinkConnSpec > theLinks
Definition: TriggerBoardSpec.h:43
str
#define str(s)
Definition: TestProcessor.cc:48
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
TriggerBoardSpec::theNum
int theNum
Definition: TriggerBoardSpec.h:41
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
TriggerBoardSpec::dccInputChannelNum
int dccInputChannelNum() const
input channel number to DCC
Definition: TriggerBoardSpec.h:20
mps_fire.result
result
Definition: mps_fire.py:303