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) {}

◆ EcalPnDiodeDigi() [2/2]

EcalPnDiodeDigi::EcalPnDiodeDigi ( const EcalPnDiodeDetId id)
explicit

Definition at line 4 of file EcalPnDiodeDigi.cc.

4 : id_(id), size_(0), data_(MAXSAMPLES) {}

Member Function Documentation

◆ id()

const EcalPnDiodeDetId& EcalPnDiodeDigi::id ( ) const
inline

Definition at line 20 of file EcalPnDiodeDigi.h.

20 { return id_; }

References id_.

Referenced by operator<<().

◆ operator[]()

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

Definition at line 23 of file EcalPnDiodeDigi.h.

23 { return data_[i]; }

References data_, and mps_fire::i.

◆ sample()

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

Definition at line 24 of file EcalPnDiodeDigi.h.

24 { return data_[i]; }

References data_, and mps_fire::i.

Referenced by operator<<().

◆ setSample()

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

Definition at line 27 of file EcalPnDiodeDigi.h.

27 { data_[i] = sam; }

References data_, and mps_fire::i.

Referenced by DCCMemBlock::fillPnDiodeDigisCollection().

◆ setSize()

void EcalPnDiodeDigi::setSize ( int  size)

Definition at line 6 of file EcalPnDiodeDigi.cc.

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

References MAXSAMPLES, size(), and size_.

Referenced by DCCMemBlock::fillPnDiodeDigisCollection().

◆ size()

int EcalPnDiodeDigi::size ( void  ) const
inline

Definition at line 21 of file EcalPnDiodeDigi.h.

21 { return size_; }

References size_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), operator<<(), and setSize().

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

mps_fire.i
i
Definition: mps_fire.py:355
EcalPnDiodeDigi::size
int size() const
Definition: EcalPnDiodeDigi.h:21
EcalPnDiodeDigi::MAXSAMPLES
static const int MAXSAMPLES
Definition: EcalPnDiodeDigi.h:29
EcalPnDiodeDigi::data_
std::vector< EcalFEMSample > data_
Definition: EcalPnDiodeDigi.h:34
EcalPnDiodeDigi::id_
EcalPnDiodeDetId id_
Definition: EcalPnDiodeDigi.h:32
EcalPnDiodeDigi::size_
int size_
Definition: EcalPnDiodeDigi.h:33