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) {}
unsigned int size_
Definition: EcalTimeDigi.h:36
int sampleOfInterest_
Definition: EcalTimeDigi.h:37
std::vector< float > data_
Definition: EcalTimeDigi.h:38

◆ 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) {}
unsigned int size_
Definition: EcalTimeDigi.h:36
int sampleOfInterest_
Definition: EcalTimeDigi.h:37
std::vector< float > data_
Definition: EcalTimeDigi.h:38

Member Function Documentation

◆ id()

const DetId& EcalTimeDigi::id ( ) const
inline

Definition at line 21 of file EcalTimeDigi.h.

References id_.

21 { return id_; }

◆ operator[]()

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

Definition at line 24 of file EcalTimeDigi.h.

References data_, and mps_fire::i.

24 { return data_[i]; }
std::vector< float > data_
Definition: EcalTimeDigi.h:38

◆ sample()

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

Definition at line 25 of file EcalTimeDigi.h.

References data_, and mps_fire::i.

25 { return data_[i]; }
std::vector< float > data_
Definition: EcalTimeDigi.h:38

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

References sampleOfInterest_.

32 { return sampleOfInterest_; }
int sampleOfInterest_
Definition: EcalTimeDigi.h:37

◆ setSample()

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

Definition at line 28 of file EcalTimeDigi.h.

References data_, and mps_fire::i.

28 { data_[i] = sam; }
std::vector< float > data_
Definition: EcalTimeDigi.h:38

◆ setSampleOfInterest()

void EcalTimeDigi::setSampleOfInterest ( int  i)
inline

Definition at line 29 of file EcalTimeDigi.h.

References mps_fire::i, and sampleOfInterest_.

29 { sampleOfInterest_ = i; }
int sampleOfInterest_
Definition: EcalTimeDigi.h:37

◆ setSize()

void EcalTimeDigi::setSize ( unsigned int  size)

Definition at line 11 of file EcalTimeDigi.cc.

References data_, size(), and size_.

11  {
12  if (size > MAXSAMPLES)
13  size_ = MAXSAMPLES;
14  else
15  size_ = size;
16  data_.resize(size_);
17 }
unsigned int size_
Definition: EcalTimeDigi.h:36
int size() const
Definition: EcalTimeDigi.h:22
std::vector< float > data_
Definition: EcalTimeDigi.h:38

◆ size()

int EcalTimeDigi::size ( void  ) const
inline

Definition at line 22 of file EcalTimeDigi.h.

References size_.

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

22 { return size_; }
unsigned int size_
Definition: EcalTimeDigi.h:36

◆ swap()

void EcalTimeDigi::swap ( EcalTimeDigi rh)
inline

Definition at line 15 of file EcalTimeDigi.h.

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

15  {
16  std::swap(id_, rh.id_);
17  std::swap(size_, rh.size_);
18  std::swap(data_, rh.data_);
19  }
unsigned int size_
Definition: EcalTimeDigi.h:36
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< float > data_
Definition: EcalTimeDigi.h:38

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