CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/EcalDigi/interface/ESDataFrame.h

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