CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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.

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

Member Function Documentation

void TriggerBoardSpec::add ( const LinkConnSpec lc)

attach connection to TB

Definition at line 43 of file TriggerBoardSpec.cc.

References theLinks.

Referenced by RPCEMap::convert(), and counter.Counter::register().

44 {
45  theLinks.push_back(lc);
46 }
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 19 of file TriggerBoardSpec.cc.

References mps_fire::result, and theLinks.

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

20 {
21  std::vector<const LinkConnSpec* > result;
22  for (IT it=theLinks.begin(); it != theLinks.end(); it++) {
23  //
24  // check that link is not masked!
25  // std::cout <<"masked links:"<<theMaskedLinks<<std::endl;
26  //
27  result.push_back( &(*it) );
28  }
29  return result;
30 }
tuple result
Definition: mps_fire.py:95
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 10 of file TriggerBoardSpec.cc.

References theLinks.

Referenced by RPCReadOutMapping::location().

11 {
12  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
13  for (IT it=theLinks.begin(); it != theLinks.end(); it++) {
14  if(tbInputNumber==it->triggerBoardInputNumber()) return &(*it);
15  }
16  return 0;
17 }
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 32 of file TriggerBoardSpec.cc.

References dccInputChannelNum(), and theLinks.

33 {
34  std::ostringstream str;
35  str << "TriggerBoardSpec: num=" << dccInputChannelNum() << std::endl;
36  depth--;
37  if (depth >= 0) {
38  for (IT ic = theLinks.begin(); ic != theLinks.end(); ic++) str << (*ic).print(depth);
39  }
40  return str.str();
41 }
std::vector< LinkConnSpec >::const_iterator IT
int dccInputChannelNum() const
input channel number to DCC
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().