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

For the sorted collection.

Definition at line 10 of file EcalTimeDigi.h.

Constructor & Destructor Documentation

EcalTimeDigi::EcalTimeDigi ( )

Definition at line 7 of file EcalTimeDigi.cc.

7  : id_(0), size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) {
8 }
unsigned int size_
Definition: EcalTimeDigi.h:36
int sampleOfInterest_
Definition: EcalTimeDigi.h:37
std::vector< float > data_
Definition: EcalTimeDigi.h:38
EcalTimeDigi::EcalTimeDigi ( const DetId id)
explicit

Definition at line 10 of file EcalTimeDigi.cc.

10  : id_(id),
11  size_(0), sampleOfInterest_(-1), data_(MAXSAMPLES) {
12 }
unsigned int size_
Definition: EcalTimeDigi.h:36
int sampleOfInterest_
Definition: EcalTimeDigi.h:37
std::vector< float > data_
Definition: EcalTimeDigi.h:38

Member Function Documentation

const DetId& EcalTimeDigi::id ( ) const
inline

Definition at line 21 of file EcalTimeDigi.h.

References id_.

21 { return id_; }
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
const float& EcalTimeDigi::sample ( unsigned int  i) const
inline

Definition at line 25 of file EcalTimeDigi.h.

References data_, mps_fire::i, setSize(), and size().

25 { return data_[i]; }
std::vector< float > data_
Definition: EcalTimeDigi.h:38
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
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
void EcalTimeDigi::setSampleOfInterest ( int  i)
inline

Definition at line 29 of file EcalTimeDigi.h.

References mps_fire::i, and sampleOfInterest_.

void EcalTimeDigi::setSize ( unsigned int  size)

Definition at line 14 of file EcalTimeDigi.cc.

References data_, size(), and size_.

Referenced by sample().

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

Definition at line 22 of file EcalTimeDigi.h.

References size_.

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

22 { return size_; }
unsigned int size_
Definition: EcalTimeDigi.h:36
void EcalTimeDigi::swap ( EcalTimeDigi rh)
inline

Definition at line 15 of file EcalTimeDigi.h.

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

Referenced by 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

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

Definition at line 38 of file EcalTimeDigi.h.

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

DetId EcalTimeDigi::id_
private

Definition at line 35 of file EcalTimeDigi.h.

Referenced by id(), and swap().

int EcalTimeDigi::sampleOfInterest_
private

Definition at line 37 of file EcalTimeDigi.h.

Referenced by sampleOfInterest(), and setSampleOfInterest().

unsigned int EcalTimeDigi::size_
private

Definition at line 36 of file EcalTimeDigi.h.

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