CMS 3D CMS Logo

EcalPnDiodeDigi.h
Go to the documentation of this file.
1 #ifndef ECALPNDIODEDIGI_H
2 #define ECALPNDIODEDIGI_H 1
3 
4 #include <ostream>
5 #include <vector>
8 
14 public:
16 
17  EcalPnDiodeDigi(); // for persistence
18  explicit EcalPnDiodeDigi(const EcalPnDiodeDetId& id);
19 
20  const EcalPnDiodeDetId& id() const { return id_; }
21  int size() const { return size_; }
22 
23  const EcalFEMSample& operator[](int i) const { return data_[i]; }
24  const EcalFEMSample& sample(int i) const { return data_[i]; }
25 
26  void setSize(int size);
27  void setSample(int i, const EcalFEMSample& sam) { data_[i] = sam; }
28 
29  static const int MAXSAMPLES = 50;
30 
31 private:
33  int size_;
34  std::vector<EcalFEMSample> data_;
35 };
36 
37 std::ostream& operator<<(std::ostream& s, const EcalPnDiodeDigi& digi);
38 
39 #endif
EcalPnDiodeDetId id_
void setSize(int size)
const EcalPnDiodeDetId & id() const
EcalPnDiodeDetId key_type
For the sorted collection.
const EcalFEMSample & operator[](int i) const
std::vector< EcalFEMSample > data_
int size() const
std::ostream & operator<<(std::ostream &s, const EcalPnDiodeDigi &digi)
static const int MAXSAMPLES
const EcalFEMSample & sample(int i) const
void setSample(int i, const EcalFEMSample &sam)