CMS 3D CMS Logo

EcalTimeDigi.cc
Go to the documentation of this file.
2 
3 namespace {
4  constexpr unsigned int MAXSAMPLES = 10;
5 } // namespace
6 
7 EcalTimeDigi::EcalTimeDigi() : id_(0), size_(0), sampleOfInterest_(-1), waveform_(WAVEFORMSAMPLES), data_(MAXSAMPLES) {}
8 
10  : id_(id), size_(0), sampleOfInterest_(-1), waveform_(WAVEFORMSAMPLES), data_(MAXSAMPLES) {}
11 
12 void EcalTimeDigi::setSize(unsigned int size) {
13  size_ = size;
14  if (size > MAXSAMPLES)
15  data_.resize(size_);
16 }
17 
18 void EcalTimeDigi::setWaveform(float* waveform) {
19  waveform_.resize(WAVEFORMSAMPLES);
20  for (uint i(0); i != WAVEFORMSAMPLES; ++i) {
21  waveform_[i] = waveform[i];
22  }
23 }
unsigned int size_
Definition: EcalTimeDigi.h:41
size
Write out results.
int size() const
Definition: EcalTimeDigi.h:23
void setWaveform(float *waveform)
Definition: EcalTimeDigi.cc:18
std::vector< float > waveform() const
Definition: EcalTimeDigi.h:35
static const unsigned int WAVEFORMSAMPLES
Definition: EcalTimeDigi.h:37
static constexpr int MAXSAMPLES
void setSize(unsigned int size)
Definition: EcalTimeDigi.cc:12
Definition: DetId.h:17
std::vector< float > data_
Definition: EcalTimeDigi.h:44
std::vector< float > waveform_
Definition: EcalTimeDigi.h:43