Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:16

0001 #ifndef DataFormats_EcalDigi_EcalDataFrame_Ph2_h
0002 #define DataFormats_EcalDigi_EcalDataFrame_Ph2_h
0003 #include "DataFormats/EcalDigi/interface/EcalLiteDTUSample.h"
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 #include "DataFormats/Common/interface/DataFrame.h"
0006 #include "DataFormats/EcalDigi/interface/EcalConstants.h"
0007 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0008 
0009 /** \class EcalDataFrame_Ph2
0010       
0011 */
0012 class EcalDataFrame_Ph2 {
0013 public:
0014   EcalDataFrame_Ph2() {}
0015   EcalDataFrame_Ph2(edm::DataFrame const& iframe) : m_data(iframe) {}
0016 
0017   virtual ~EcalDataFrame_Ph2() {}
0018   DetId id() const { return m_data.id(); }
0019 
0020   int size() const { return m_data.size(); }
0021 
0022   EcalLiteDTUSample operator[](int i) const { return m_data[i]; }
0023   EcalLiteDTUSample sample(int i) const { return m_data[i]; }
0024 
0025   typedef EBDetId key_type;  /// For the sorted collection
0026   typedef EcalDataFrame_Ph2 Base;
0027 
0028   void setSize(int) {}
0029   void setSample(int i, EcalLiteDTUSample sam) { m_data[i] = sam; }
0030 
0031   static constexpr int MAXSAMPLES = ecalPh2::sampleSize;
0032 
0033   edm::DataFrame const& frame() const { return m_data; }
0034   edm::DataFrame& frame() { return m_data; }
0035 
0036 private:
0037   edm::DataFrame m_data;
0038 };
0039 
0040 #endif