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 Attributes
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 Attributes

 COND_SERIALIZABLE
 
std::vector< LinkConnSpectheLinks
 
uint32_t theMaskedLinks
 
int theNum
 

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

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 query::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: query.py:137
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
void TriggerBoardSpec::setMaskedLinks ( uint32_t  aMask)
inline

set mask links

Definition at line 35 of file TriggerBoardSpec.h.

References theMaskedLinks.

35 { theMaskedLinks = aMask; }

Member Data Documentation

TriggerBoardSpec::COND_SERIALIZABLE
private

Definition at line 45 of file TriggerBoardSpec.h.

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