CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DataFormats/EcalDigi/interface/EcalPseudoStripInputDigi.h

Go to the documentation of this file.
00001 #ifndef ECALPSEUDOSTRIPINPUTDIGI_H
00002 #define ECALPSEUDOSTRIPINPUTDIGI_H
00003 
00004 #include <ostream>
00005 #include <vector>
00006 #include "DataFormats/EcalDetId/interface/EcalTriggerElectronicsId.h"
00007 #include "DataFormats/EcalDigi/interface/EcalPseudoStripInputSample.h"
00008 
00009 
00010 
00016 class EcalPseudoStripInputDigi {
00017  public:
00018   typedef EcalTriggerElectronicsId key_type; 
00019 
00020   EcalPseudoStripInputDigi(); // for persistence
00021   explicit EcalPseudoStripInputDigi(const EcalTriggerElectronicsId& id);
00022     
00023   const EcalTriggerElectronicsId& id() const { return id_; }
00024   int size() const { return size_; }
00025     
00026   const EcalPseudoStripInputSample& operator[](int i) const { return data_[i]; }
00027   const EcalPseudoStripInputSample& sample(int i) const { return data_[i]; }
00028     
00029   void setSize(int size);
00030   void setSample(int i, const EcalPseudoStripInputSample& sam) { data_[i]=sam; }
00031   void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
00032     
00033   static const int MAXSAMPLES = 20;
00034 
00036   int pseudoStripInput() const; 
00037   
00038   
00040   bool fineGrain() const; 
00041   
00043   bool isDebug() const;
00044 
00046   int sampleOfInterest() const;
00047   
00048  private:
00049   
00050   EcalTriggerElectronicsId id_;
00051   int size_;
00052   std::vector<EcalPseudoStripInputSample> data_;
00053 };
00054 
00055 
00056 std::ostream& operator<<(std::ostream& s, const EcalPseudoStripInputDigi& digi);
00057 
00058 
00059 
00060 #endif