CMS 3D CMS Logo

EcalTBTDCRawInfo.h
Go to the documentation of this file.
1 #ifndef ECALTBTDCRAWINFO_H
2 #define ECALTBTDCRAWINFO_H 1
3 
4 #include <ostream>
5 #include <vector>
7 
14 public:
16 
17  EcalTBTDCRawInfo(unsigned int channels) { data_.reserve(channels); };
18 
20  unsigned int size() const { return data_.size(); }
21  unsigned int channels() const { return data_.size(); }
22  const EcalTBTDCSample& operator[](unsigned int i) const { return data_[i]; }
23  const EcalTBTDCSample& sample(unsigned int i) const { return data_[i]; }
24 
26  void setSize(unsigned int size) {
27  // data_.reserve(size);
28  data_.resize(size);
29  };
30 
31  void setSample(unsigned int i, const EcalTBTDCSample& sam) {
32  if (data_.size() < i + 1)
33  // data_.reserve(i);
34  data_.resize(i + 1);
35  data_[i] = sam;
36  };
37 
38 private:
39  std::vector<EcalTBTDCSample> data_;
40 };
41 
42 std::ostream& operator<<(std::ostream& s, const EcalTBTDCRawInfo& digi);
43 
44 #endif
mps_fire.i
i
Definition: mps_fire.py:428
EcalTBTDCRawInfo::data_
std::vector< EcalTBTDCSample > data_
Definition: EcalTBTDCRawInfo.h:36
EcalTBTDCSample.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
EcalTBTDCSample
Definition: EcalTBTDCSample.h:14
EcalTBTDCRawInfo::sample
const EcalTBTDCSample & sample(unsigned int i) const
Definition: EcalTBTDCRawInfo.h:23
EcalTBTDCRawInfo::setSample
void setSample(unsigned int i, const EcalTBTDCSample &sam)
Definition: EcalTBTDCRawInfo.h:31
EcalTBTDCRawInfo::channels
unsigned int channels() const
Definition: EcalTBTDCRawInfo.h:21
EcalTBTDCRawInfo
Definition: EcalTBTDCRawInfo.h:13
EcalTBTDCRawInfo::EcalTBTDCRawInfo
EcalTBTDCRawInfo()
Definition: EcalTBTDCRawInfo.h:15
EcalTBTDCRawInfo::setSize
void setSize(unsigned int size)
Set methods.
Definition: EcalTBTDCRawInfo.h:26
EcalTBTDCRawInfo::operator[]
const EcalTBTDCSample & operator[](unsigned int i) const
Definition: EcalTBTDCRawInfo.h:22
EcalTBTDCRawInfo::EcalTBTDCRawInfo
EcalTBTDCRawInfo(unsigned int channels)
Definition: EcalTBTDCRawInfo.h:17
EcalTBTDCRawInfo::size
unsigned int size() const
Get methods.
Definition: EcalTBTDCRawInfo.h:20
operator<<
std::ostream & operator<<(std::ostream &s, const EcalTBTDCRawInfo &digi)
Definition: EcalTBTDCRawInfo.cc:3