CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 i.

24 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
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_, and i.

25 { return data_[i]; }
int i
Definition: DBlmapReader.cc:9
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 i.

28 { data_[i]=sam; }
int i
Definition: DBlmapReader.cc:9
std::vector< float > data_
Definition: EcalTimeDigi.h:38
void EcalTimeDigi::setSampleOfInterest ( int  i)
inline

Definition at line 29 of file EcalTimeDigi.h.

References i, and sampleOfInterest_.

int i
Definition: DBlmapReader.cc:9
int sampleOfInterest_
Definition: EcalTimeDigi.h:37
void EcalTimeDigi::setSize ( unsigned int  size)

Definition at line 14 of file EcalTimeDigi.cc.

References data_, size(), and size_.

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 ntuple._Collection::__iter__(), ntuple._Collection::__len__(), 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().