CMS 3D CMS Logo

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

#include <EcalTimeDigi.h>

Public Types

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

Public Member Functions

 EcalTimeDigi ()
 
 EcalTimeDigi (const DetId &id)
 
const DetIdid () const
 
const float & operator[] (unsigned int i) const
 
const float & sample (unsigned int i) const
 
int sampleOfInterest () const
 Gets the BX==0 sample. If =-1 then it means that only OOT hits are present. More...
 
void setSample (unsigned int i, const float sam)
 
void setSampleOfInterest (int i)
 
void setSize (unsigned int size)
 
int size () const
 
void swap (EcalTimeDigi &rh)
 

Private Attributes

std::vector< float > data_
 
DetId id_
 
int sampleOfInterest_
 
unsigned int size_
 

Detailed Description

Definition at line 8 of file EcalTimeDigi.h.

Member Typedef Documentation

◆ key_type

For the sorted collection.

Definition at line 10 of file EcalTimeDigi.h.

Constructor & Destructor Documentation

◆ EcalTimeDigi() [1/2]

EcalTimeDigi::EcalTimeDigi ( )

Definition at line 7 of file EcalTimeDigi.cc.

7 : id_(0), size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) {}

◆ EcalTimeDigi() [2/2]

EcalTimeDigi::EcalTimeDigi ( const DetId id)
explicit

Definition at line 9 of file EcalTimeDigi.cc.

9 : id_(id), size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) {}

Member Function Documentation

◆ id()

const DetId& EcalTimeDigi::id ( ) const
inline

Definition at line 21 of file EcalTimeDigi.h.

21 { return id_; }

References id_.

◆ operator[]()

const float& EcalTimeDigi::operator[] ( unsigned int  i) const
inline

Definition at line 24 of file EcalTimeDigi.h.

24 { return data_[i]; }

References data_, and mps_fire::i.

◆ sample()

const float& EcalTimeDigi::sample ( unsigned int  i) const
inline

Definition at line 25 of file EcalTimeDigi.h.

25 { return data_[i]; }

References data_, and mps_fire::i.

◆ sampleOfInterest()

int EcalTimeDigi::sampleOfInterest ( ) const
inline

Gets the BX==0 sample. If =-1 then it means that only OOT hits are present.

Definition at line 32 of file EcalTimeDigi.h.

32 { return sampleOfInterest_; }

References sampleOfInterest_.

◆ setSample()

void EcalTimeDigi::setSample ( unsigned int  i,
const float  sam 
)
inline

Definition at line 28 of file EcalTimeDigi.h.

28 { data_[i] = sam; }

References data_, and mps_fire::i.

◆ setSampleOfInterest()

void EcalTimeDigi::setSampleOfInterest ( int  i)
inline

Definition at line 29 of file EcalTimeDigi.h.

29 { sampleOfInterest_ = i; }

References mps_fire::i, and sampleOfInterest_.

◆ setSize()

void EcalTimeDigi::setSize ( unsigned int  size)

Definition at line 11 of file EcalTimeDigi.cc.

11  {
12  if (size > MAXSAMPLES)
13  size_ = MAXSAMPLES;
14  else
15  size_ = size;
16  data_.resize(size_);
17 }

References data_, size(), and size_.

◆ size()

int EcalTimeDigi::size ( void  ) const
inline

Definition at line 22 of file EcalTimeDigi.h.

22 { return size_; }

References size_.

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

◆ swap()

void EcalTimeDigi::swap ( EcalTimeDigi rh)
inline

Definition at line 15 of file EcalTimeDigi.h.

15  {
16  std::swap(id_, rh.id_);
17  std::swap(size_, rh.size_);
18  std::swap(data_, rh.data_);
19  }

References data_, id_, size_, and std::swap().

Member Data Documentation

◆ data_

std::vector<float> EcalTimeDigi::data_
private

Definition at line 38 of file EcalTimeDigi.h.

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

◆ id_

DetId EcalTimeDigi::id_
private

Definition at line 35 of file EcalTimeDigi.h.

Referenced by id(), and swap().

◆ sampleOfInterest_

int EcalTimeDigi::sampleOfInterest_
private

Definition at line 37 of file EcalTimeDigi.h.

Referenced by sampleOfInterest(), and setSampleOfInterest().

◆ size_

unsigned int EcalTimeDigi::size_
private

Definition at line 36 of file EcalTimeDigi.h.

Referenced by setSize(), size(), and swap().

mps_fire.i
i
Definition: mps_fire.py:428
EcalTimeDigi::sampleOfInterest_
int sampleOfInterest_
Definition: EcalTimeDigi.h:37
EcalTimeDigi::size_
unsigned int size_
Definition: EcalTimeDigi.h:36
EcalTimeDigi::data_
std::vector< float > data_
Definition: EcalTimeDigi.h:38
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
EcalTimeDigi::id_
DetId id_
Definition: EcalTimeDigi.h:35
EcalTimeDigi::size
int size() const
Definition: EcalTimeDigi.h:22