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  if (size > MAXSAMPLES)
14  size_ = MAXSAMPLES;
15  else
16  size_ = size;
17  data_.resize(size_);
18 }
19 
20 void EcalTimeDigi::setWaveform(float* waveform) {
21  waveform_.resize(WAVEFORMSAMPLES);
22  for (uint i(0); i != WAVEFORMSAMPLES; ++i) {
23  waveform_[i] = waveform[i];
24  }
25 }
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:20
std::vector< float > waveform() const
Definition: EcalTimeDigi.h:35
static const unsigned int WAVEFORMSAMPLES
Definition: EcalTimeDigi.h:37
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