CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
EcalPnDiodeDigi Class Reference

#include <EcalPnDiodeDigi.h>

Public Types

typedef EcalPnDiodeDetId key_type
 For the sorted collection. More...
 

Public Member Functions

 EcalPnDiodeDigi ()
 
 EcalPnDiodeDigi (const EcalPnDiodeDetId &id)
 
const EcalPnDiodeDetIdid () const
 
const EcalFEMSampleoperator[] (int i) const
 
const EcalFEMSamplesample (int i) const
 
void setSample (int i, const EcalFEMSample &sam)
 
void setSize (int size)
 
int size () const
 

Static Public Attributes

static const int MAXSAMPLES = 50
 

Private Attributes

std::vector< EcalFEMSampledata_
 
EcalPnDiodeDetId id_
 
int size_
 

Detailed Description

Definition at line 13 of file EcalPnDiodeDigi.h.

Member Typedef Documentation

◆ key_type

For the sorted collection.

Definition at line 15 of file EcalPnDiodeDigi.h.

Constructor & Destructor Documentation

◆ EcalPnDiodeDigi() [1/2]

EcalPnDiodeDigi::EcalPnDiodeDigi ( )

Definition at line 3 of file EcalPnDiodeDigi.cc.

3 : size_(0), data_(MAXSAMPLES) {}
std::vector< EcalFEMSample > data_
static const int MAXSAMPLES

◆ EcalPnDiodeDigi() [2/2]

EcalPnDiodeDigi::EcalPnDiodeDigi ( const EcalPnDiodeDetId id)
explicit

Definition at line 4 of file EcalPnDiodeDigi.cc.

4 : id_(id), size_(0), data_(MAXSAMPLES) {}
EcalPnDiodeDetId id_
std::vector< EcalFEMSample > data_
static const int MAXSAMPLES

Member Function Documentation

◆ id()

const EcalPnDiodeDetId& EcalPnDiodeDigi::id ( ) const
inline

Definition at line 20 of file EcalPnDiodeDigi.h.

References id_.

Referenced by operator<<().

20 { return id_; }
EcalPnDiodeDetId id_

◆ operator[]()

const EcalFEMSample& EcalPnDiodeDigi::operator[] ( int  i) const
inline

Definition at line 23 of file EcalPnDiodeDigi.h.

References data_, and mps_fire::i.

23 { return data_[i]; }
std::vector< EcalFEMSample > data_

◆ sample()

const EcalFEMSample& EcalPnDiodeDigi::sample ( int  i) const
inline

Definition at line 24 of file EcalPnDiodeDigi.h.

References data_, and mps_fire::i.

Referenced by operator<<().

24 { return data_[i]; }
std::vector< EcalFEMSample > data_

◆ setSample()

void EcalPnDiodeDigi::setSample ( int  i,
const EcalFEMSample sam 
)
inline

Definition at line 27 of file EcalPnDiodeDigi.h.

References data_, and mps_fire::i.

Referenced by EcalTBDaqFormatter::DecodeMEM(), EcalTB07DaqFormatter::DecodeMEM(), and DCCMemBlock::fillPnDiodeDigisCollection().

27 { data_[i] = sam; }
std::vector< EcalFEMSample > data_

◆ setSize()

void EcalPnDiodeDigi::setSize ( int  size)

Definition at line 6 of file EcalPnDiodeDigi.cc.

References MAXSAMPLES, size(), and size_.

Referenced by EcalTBDaqFormatter::DecodeMEM(), EcalTB07DaqFormatter::DecodeMEM(), and DCCMemBlock::fillPnDiodeDigisCollection().

6  {
7  if (size < 0)
8  size_ = 0;
9  else if (size > MAXSAMPLES)
10  size_ = MAXSAMPLES;
11  else
12  size_ = size;
13 }
int size() const
static const int MAXSAMPLES

◆ size()

int EcalPnDiodeDigi::size ( void  ) const
inline

Member Data Documentation

◆ data_

std::vector<EcalFEMSample> EcalPnDiodeDigi::data_
private

Definition at line 34 of file EcalPnDiodeDigi.h.

Referenced by operator[](), sample(), and setSample().

◆ id_

EcalPnDiodeDetId EcalPnDiodeDigi::id_
private

Definition at line 32 of file EcalPnDiodeDigi.h.

Referenced by id().

◆ MAXSAMPLES

const int EcalPnDiodeDigi::MAXSAMPLES = 50
static

Definition at line 29 of file EcalPnDiodeDigi.h.

Referenced by setSize().

◆ size_

int EcalPnDiodeDigi::size_
private

Definition at line 33 of file EcalPnDiodeDigi.h.

Referenced by setSize(), and size().