test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 17 of file DccSpec.h.

Constructor & Destructor Documentation

DccSpec::DccSpec ( int  id = -1)

ctor with ID only

Definition at line 5 of file DccSpec.cc.

5  : theId(id)
6 { }
int theId
Definition: DccSpec.h:36

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

35 {
36 // if (theTBs.empty()) theTBs.resize(NUMBER_OF_CHANNELS);
37 // int channel = tb.dccInputChannelNum();
38 // if ( channel >= MIN_CHANNEL_NUMBER
39 // && channel <= NUMBER_OF_CHANNELS+MIN_CHANNEL_NUMBER-1) {
40 // theTBs[channel-MIN_CHANNEL_NUMBER] = tb;
41 // } else {
42 // edm::LogInfo(" incorrect tb, skipp adding.")<<"\t id="<<channel;
43 // }
44  theTBs.push_back(tb);
45 }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:37
int DccSpec::id ( void  ) const
inline

id of FED

Definition at line 23 of file DccSpec.h.

References theId.

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

23 { return theId;}
int theId
Definition: DccSpec.h:36
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.

9 {
10 
11  std::ostringstream str;
12  str << "DccSpec:id=" << id() << std::endl;
13  depth--;
14  if (depth >= 0) {
15  typedef std::vector<TriggerBoardSpec>::const_iterator ITTB;
16  for (ITTB it = theTBs.begin(); it != theTBs.end(); it++) str << it->print(depth);
17  }
18  return str.str();
19 }
int id() const
id of FED
Definition: DccSpec.h:23
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:37
template<class Archive >
void DccSpec::serialize ( Archive &  ar,
const unsigned int  version 
)
private
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().

22 {
23 // return (theId >=0) ? &theTBs[channelNumber-MIN_CHANNEL_NUMBER] : 0;
24 
25  //FIXME - temporary implementaion, to be replace by LUT (in preparation)
26  typedef std::vector<TriggerBoardSpec>::const_iterator IT;
27  for (IT it=theTBs.begin(); it != theTBs.end(); it++) {
28  if(channelNumber ==it->dccInputChannelNum()) return &(*it);
29  }
30  return 0;
31 
32 }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:37
std::vector< LinkConnSpec >::const_iterator IT
const std::vector<TriggerBoardSpec>& DccSpec::triggerBoards ( ) const
inline

Definition at line 27 of file DccSpec.h.

References theTBs.

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

27 { return theTBs; }
std::vector< TriggerBoardSpec > theTBs
Definition: DccSpec.h:37

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 42 of file DccSpec.h.

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

Definition at line 42 of file DccSpec.h.

Member Data Documentation

int DccSpec::theId
private

Definition at line 36 of file DccSpec.h.

Referenced by id().

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

Definition at line 37 of file DccSpec.h.

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