CMS 3D CMS Logo

Public Member Functions | Private Attributes

DccSpec Class Reference

#include <DccSpec.h>

List of all members.

Public Member Functions

void add (const TriggerBoardSpec &tb)
 attach TB to DCC. The channel is defined by TB
 DccSpec (int id=-1)
 ctor with ID only
int id () const
 id of FED
std::string print (int depth=0) const
 debud printaout, call its components with depth dectreased by one
const TriggerBoardSpectriggerBoard (int channelNumber) const
 TB attached to channel.
const std::vector
< TriggerBoardSpec > & 
triggerBoards () const

Private Attributes

int theId
std::vector< TriggerBoardSpectheTBs

Detailed Description

Definition at line 15 of file DccSpec.h.


Constructor & Destructor Documentation

DccSpec::DccSpec ( int  id = -1)

ctor with ID only

Definition at line 5 of file DccSpec.cc.

                       : theId(id) 
{ }

Member Function Documentation

void DccSpec::add ( const TriggerBoardSpec tb)

attach TB to DCC. The channel is defined by TB

Definition at line 34 of file DccSpec.cc.

References theTBs.

Referenced by RPCEMap::convert().

{
//  if (theTBs.empty()) theTBs.resize(NUMBER_OF_CHANNELS);
//  int channel = tb.dccInputChannelNum();
//  if (    channel >= MIN_CHANNEL_NUMBER  
//       && channel <= NUMBER_OF_CHANNELS+MIN_CHANNEL_NUMBER-1) {
//    theTBs[channel-MIN_CHANNEL_NUMBER] = tb;
//  } else {
//     edm::LogInfo(" incorrect tb, skipp adding.")<<"\t id="<<channel; 
//  }
  theTBs.push_back(tb);
}
int DccSpec::id ( void  ) const [inline]

id of FED

Definition at line 21 of file DccSpec.h.

References theId.

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

{ return theId;}
std::string DccSpec::print ( int  depth = 0) const

debud printaout, call its components with depth dectreased by one

Definition at line 8 of file DccSpec.cc.

References id(), and theTBs.

{
  
  std::ostringstream str;
  str << "DccSpec:id=" << id() << std::endl;
  depth--;
  if (depth >= 0) {
    typedef std::vector<TriggerBoardSpec>::const_iterator ITTB;
    for (ITTB it = theTBs.begin(); it != theTBs.end(); it++) str << it->print(depth);
  }
  return str.str();
}
const TriggerBoardSpec * DccSpec::triggerBoard ( int  channelNumber) const

TB attached to channel.

Definition at line 21 of file DccSpec.cc.

References theTBs.

Referenced by RPCReadOutMapping::location().

{
//  return (theId >=0) ? &theTBs[channelNumber-MIN_CHANNEL_NUMBER] : 0;

  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
  typedef std::vector<TriggerBoardSpec>::const_iterator IT;
  for (IT it=theTBs.begin(); it != theTBs.end(); it++) {
    if(channelNumber ==it->dccInputChannelNum()) return &(*it);
  }
  return 0;

}
const std::vector<TriggerBoardSpec>& DccSpec::triggerBoards ( ) const [inline]

Definition at line 25 of file DccSpec.h.

References theTBs.

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

{ return theTBs; }

Member Data Documentation

int DccSpec::theId [private]

Definition at line 34 of file DccSpec.h.

Referenced by id().

std::vector<TriggerBoardSpec> DccSpec::theTBs [private]

Definition at line 35 of file DccSpec.h.

Referenced by add(), print(), triggerBoard(), and triggerBoards().