CMS 3D CMS Logo

Public Member Functions | Private Attributes

TriggerBoardSpec Class Reference

#include <TriggerBoardSpec.h>

List of all members.

Public Member Functions

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

Private Attributes

std::vector< LinkConnSpectheLinks
uint32_t theMaskedLinks
int theNum

Detailed Description

RPC Trigger Board specification for readout decoding

Definition at line 12 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.

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

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

{
  theLinks.push_back(lc);
}
int TriggerBoardSpec::dccInputChannelNum ( ) const [inline]

input channel number to DCC

Definition at line 18 of file TriggerBoardSpec.h.

References theNum.

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

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

{
  std::vector<const LinkConnSpec* > result;
  for (IT it=theLinks.begin(); it != theLinks.end(); it++) {
    //
    // check that link is not masked!
    // std::cout <<"masked links:"<<theMaskedLinks<<std::endl;  
    //
    result.push_back( &(*it) ); 
  }
  return result;
}
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().

{
  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
  for (IT it=theLinks.begin(); it != theLinks.end(); it++) {
    if(tbInputNumber==it->triggerBoardInputNumber()) return &(*it);
  }
  return 0;
}
const std::vector<LinkConnSpec> TriggerBoardSpec::linkConns ( ) const [inline]

all links kept by this TB

Definition at line 27 of file TriggerBoardSpec.h.

References theLinks.

{ return 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.

{
  std::ostringstream str;
  str << "TriggerBoardSpec: num=" << dccInputChannelNum() << std::endl;
  depth--;
  if (depth >= 0) {
    for (IT ic = theLinks.begin(); ic != theLinks.end(); ic++) str << (*ic).print(depth);
  }
  return str.str();
}
void TriggerBoardSpec::setMaskedLinks ( uint32_t  aMask) [inline]

set mask links

Definition at line 33 of file TriggerBoardSpec.h.

References theMaskedLinks.

{ theMaskedLinks = aMask; }

Member Data Documentation

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

Definition at line 41 of file TriggerBoardSpec.h.

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

Definition at line 40 of file TriggerBoardSpec.h.

Referenced by setMaskedLinks().

int TriggerBoardSpec::theNum [private]

Definition at line 39 of file TriggerBoardSpec.h.

Referenced by dccInputChannelNum().