CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DataFormats/EcalDigi/interface/EcalPnDiodeDigi.h

Go to the documentation of this file.
00001 #ifndef ECALPNDIODEDIGI_H
00002 #define ECALPNDIODEDIGI_H 1
00003 
00004 #include <ostream>
00005 #include <vector>
00006 #include "DataFormats/EcalDetId/interface/EcalPnDiodeDetId.h"
00007 #include "DataFormats/EcalDigi/interface/EcalFEMSample.h"
00008 
00009 
00010 
00016 class EcalPnDiodeDigi {
00017  public:
00018   typedef EcalPnDiodeDetId key_type; 
00019 
00020   EcalPnDiodeDigi(); // for persistence
00021   explicit EcalPnDiodeDigi(const EcalPnDiodeDetId& id);
00022     
00023   const EcalPnDiodeDetId& id() const { return id_; }
00024   int size() const { return size_; }
00025     
00026   const EcalFEMSample& operator[](int i) const { return data_[i]; }
00027   const EcalFEMSample& sample(int i) const { return data_[i]; }
00028     
00029   void setSize(int size);
00030   void setSample(int i, const EcalFEMSample& sam) { data_[i]=sam; }
00031     
00032   static const int MAXSAMPLES = 50;
00033  private:
00034   EcalPnDiodeDetId id_;
00035   int size_;
00036   std::vector<EcalFEMSample> data_;
00037 };
00038 
00039 
00040 std::ostream& operator<<(std::ostream& s, const EcalPnDiodeDigi& digi);
00041 
00042 
00043 
00044 #endif