CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
DccSpec Class Reference

#include <DccSpec.h>

Public Member Functions

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

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

int theId
 
std::vector< TriggerBoardSpectheTBs
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 16 of file DccSpec.h.

Constructor & Destructor Documentation

◆ DccSpec()

DccSpec::DccSpec ( int  id = -1)

ctor with ID only

Definition at line 5 of file DccSpec.cc.

5 : theId(id) {}

Member Function Documentation

◆ add()

void DccSpec::add ( const TriggerBoardSpec tb)

attach TB to DCC. The channel is defined by TB

Definition at line 31 of file DccSpec.cc.

31  {
32  // if (theTBs.empty()) theTBs.resize(NUMBER_OF_CHANNELS);
33  // int channel = tb.dccInputChannelNum();
34  // if ( channel >= MIN_CHANNEL_NUMBER
35  // && channel <= NUMBER_OF_CHANNELS+MIN_CHANNEL_NUMBER-1) {
36  // theTBs[channel-MIN_CHANNEL_NUMBER] = tb;
37  // } else {
38  // edm::LogInfo(" incorrect tb, skipp adding.")<<"\t id="<<channel;
39  // }
40  theTBs.push_back(tb);
41 }

References theTBs.

Referenced by RPCEMap::convert(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ id()

int DccSpec::id ( ) const
inline

id of FED

Definition at line 22 of file DccSpec.h.

22 { return theId; }

References theId.

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

◆ print()

std::string DccSpec::print ( int  depth = 0) const

debud printaout, call its components with depth dectreased by one

Definition at line 7 of file DccSpec.cc.

7  {
8  std::ostringstream str;
9  str << "DccSpec:id=" << id() << std::endl;
10  depth--;
11  if (depth >= 0) {
12  typedef std::vector<TriggerBoardSpec>::const_iterator ITTB;
13  for (ITTB it = theTBs.begin(); it != theTBs.end(); it++)
14  str << it->print(depth);
15  }
16  return str.str();
17 }

References LEDCalibrationChannels::depth, id(), str, and theTBs.

◆ serialize()

template<class Archive >
void DccSpec::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ triggerBoard()

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

TB attached to channel.

Definition at line 19 of file DccSpec.cc.

19  {
20  // return (theId >=0) ? &theTBs[channelNumber-MIN_CHANNEL_NUMBER] : 0;
21 
22  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
23  typedef std::vector<TriggerBoardSpec>::const_iterator IT;
24  for (IT it = theTBs.begin(); it != theTBs.end(); it++) {
25  if (channelNumber == it->dccInputChannelNum())
26  return &(*it);
27  }
28  return nullptr;
29 }

References theTBs.

Referenced by RPCReadOutMapping::location().

◆ triggerBoards()

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

Definition at line 26 of file DccSpec.h.

26 { return theTBs; }

References theTBs.

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 41 of file DccSpec.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 41 of file DccSpec.h.

Member Data Documentation

◆ theId

int DccSpec::theId
private

Definition at line 35 of file DccSpec.h.

Referenced by id().

◆ theTBs

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

Definition at line 36 of file DccSpec.h.

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

str
#define str(s)
Definition: TestProcessor.cc:52
DccSpec::id
int id() const
id of FED
Definition: DccSpec.h:22
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
DccSpec::theTBs
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:36
IT
std::vector< LinkConnSpec >::const_iterator IT
Definition: TriggerBoardSpec.cc:5
DccSpec::theId
int theId
Definition: DccSpec.h:35