CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/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 "DataFormats/Common/interface/DataFrame.h"
00007 #include <vector>
00008 #include <ostream>
00009 
00010 class ESDataFrame {
00011 
00012  public:
00013 
00014   typedef ESDetId key_type; 
00015 
00016   ESDataFrame(); 
00017   explicit ESDataFrame(const ESDetId& id);
00018 
00019   ESDataFrame( const edm::DataFrame& df ) ;
00020     
00021   const ESDetId& id() const { return id_; }
00022     
00023   int size() const { return size_; }
00024 
00025   const ESSample& operator[](int i) const { return data_[i]; }
00026   const ESSample& sample(int i) const { return data_[i]; }
00027     
00028   void setSize(int size);
00029 
00030   void setSample(int i, const ESSample& sam) { data_[i] = sam; }
00031 
00032   static const int MAXSAMPLES = 3;
00033 
00034  private:
00035 
00036   ESDetId id_;
00037   int size_;
00038 
00039   ESSample data_[MAXSAMPLES] ;
00040 };
00041   
00042 std::ostream& operator<<(std::ostream&, const ESDataFrame&);
00043 
00044 #endif