CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( int  num = -1,
uint32_t  aMask = 0 
)

ctor with ID only

Definition at line 7 of file TriggerBoardSpec.cc.

Member Function Documentation

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.Task::remove(), and SequenceTypes.Task::replace().

41 { theLinks.push_back(lc); }
std::vector< LinkConnSpec > theLinks
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; }
std::vector< const LinkConnSpec * > TriggerBoardSpec::enabledLinkConns ( ) const

not masked links belonging to this TB

Definition at line 18 of file TriggerBoardSpec.cc.

References 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 }
tuple result
Definition: mps_fire.py:311
std::vector< LinkConnSpec >::const_iterator IT
std::vector< LinkConnSpec > theLinks
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 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
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
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(), 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 }
std::vector< LinkConnSpec >::const_iterator IT
int dccInputChannelNum() const
input channel number to DCC
#define str(s)
std::vector< LinkConnSpec > theLinks
template<class Archive >
void TriggerBoardSpec::serialize ( Archive &  ar,
const unsigned int  version 
)
private
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

friend class boost::serialization::access
friend

Definition at line 45 of file TriggerBoardSpec.h.

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

Definition at line 45 of file TriggerBoardSpec.h.

Member Data Documentation

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

Definition at line 43 of file TriggerBoardSpec.h.

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

uint32_t TriggerBoardSpec::theMaskedLinks
private

Definition at line 42 of file TriggerBoardSpec.h.

Referenced by setMaskedLinks().

int TriggerBoardSpec::theNum
private

Definition at line 41 of file TriggerBoardSpec.h.

Referenced by dccInputChannelNum().