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.

Member Function Documentation

◆ add()

void TriggerBoardSpec::add ( const LinkConnSpec lc)

attach connection to TB

Definition at line 41 of file TriggerBoardSpec.cc.

References theLinks.

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

41 { theLinks.push_back(lc); }
std::vector< LinkConnSpec > theLinks

◆ dccInputChannelNum()

int TriggerBoardSpec::dccInputChannelNum ( ) const
inline

input channel number to DCC

Definition at line 20 of file TriggerBoardSpec.h.

References theNum.

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

20 { return theNum; }

◆ enabledLinkConns()

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

not masked links belonging to this TB

Definition at line 18 of file TriggerBoardSpec.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, mps_fire::result, and theLinks.

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

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 }
std::vector< LinkConnSpec >::const_iterator IT
std::vector< LinkConnSpec > theLinks

◆ 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.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and theLinks.

Referenced by RPCReadOutMapping::location().

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 }
std::vector< LinkConnSpec >::const_iterator IT
std::vector< LinkConnSpec > theLinks

◆ linkConns()

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

all links kept by this TB

Definition at line 29 of file TriggerBoardSpec.h.

References theLinks.

29 { return theLinks; }
std::vector< LinkConnSpec > 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.

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

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 }
int dccInputChannelNum() const
input channel number to DCC
std::vector< LinkConnSpec >::const_iterator IT
#define str(s)
std::vector< LinkConnSpec > 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.

References theMaskedLinks.

35 { theMaskedLinks = aMask; }

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