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) {}
int theId
Definition: DccSpec.h:35

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.

References theTBs.

Referenced by counter.Counter::register(), SequenceTypes._TaskBase::remove(), and SequenceTypes._TaskBase::replace().

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 }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:36

◆ id()

int DccSpec::id ( ) const
inline

id of FED

Definition at line 22 of file DccSpec.h.

References theId.

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

22 { return theId; }
int theId
Definition: DccSpec.h:35

◆ 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.

References hcalRecHitTable_cff::depth, id(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, str, and theTBs.

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 }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:36
#define str(s)
int id() const
id of FED
Definition: DccSpec.h:22

◆ 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.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and theTBs.

Referenced by RPCReadOutMapping::location().

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 }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:36
std::vector< LinkConnSpec >::const_iterator IT

◆ triggerBoards()

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

Definition at line 26 of file DccSpec.h.

References theTBs.

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

26 { return theTBs; }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:36

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