CMS 3D CMS Logo

DccSpec Class Reference

#include <CondFormats/RPCObjects/interface/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.

00005                        : theId(id) 
00006 { }


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(), and popcon::RPCReadOutMappingSourceHandler::readCablingMap().

00035 {
00036 //  if (theTBs.empty()) theTBs.resize(NUMBER_OF_CHANNELS);
00037 //  int channel = tb.dccInputChannelNum();
00038 //  if (    channel >= MIN_CHANNEL_NUMBER  
00039 //       && channel <= NUMBER_OF_CHANNELS+MIN_CHANNEL_NUMBER-1) {
00040 //    theTBs[channel-MIN_CHANNEL_NUMBER] = tb;
00041 //  } else {
00042 //     edm::LogInfo(" incorrect tb, skipp adding.")<<"\t id="<<channel; 
00043 //  }
00044   theTBs.push_back(tb);
00045 }

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

00021 { 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 lat::endl(), id(), it, and theTBs.

00009 {
00010   
00011   std::ostringstream str;
00012   str << "DccSpec:id=" << id() << std::endl;
00013   depth--;
00014   if (depth >= 0) {
00015     typedef std::vector<TriggerBoardSpec>::const_iterator ITTB;
00016     for (ITTB it = theTBs.begin(); it != theTBs.end(); it++) str << it->print(depth);
00017   }
00018   return str.str();
00019 }

const TriggerBoardSpec * DccSpec::triggerBoard ( int  channelNumber  )  const

TB attached to channel.

Definition at line 21 of file DccSpec.cc.

References it, and theTBs.

Referenced by RPCReadOutMapping::location().

00022 {
00023 //  return (theId >=0) ? &theTBs[channelNumber-MIN_CHANNEL_NUMBER] : 0;
00024 
00025   //FIXME - temporary implementaion, to be replace by LUT (in preparation)
00026   typedef std::vector<TriggerBoardSpec>::const_iterator IT;
00027   for (IT it=theTBs.begin(); it != theTBs.end(); it++) {
00028     if(channelNumber ==it->dccInputChannelNum()) return &(*it);
00029   }
00030   return 0;
00031 
00032 }

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

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:41 2009 for CMSSW by  doxygen 1.5.4