CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_2_9_HLT1_bphpatch4/src/DataFormats/EcalDigi/interface/EcalFEMSample.h

Go to the documentation of this file.
00001 #ifndef DIGIECAL_ECALFEMSAMPLE_H
00002 #define DIGIECAL_ECALFEMSAMPLE_H
00003 
00004 #include <ostream>
00005 #include <boost/cstdint.hpp>
00006 
00014 class EcalFEMSample {
00015  public:
00016   EcalFEMSample() { theSample=0; }
00017   EcalFEMSample(uint16_t data) { theSample=data; }
00018   EcalFEMSample(int adc, int gainId);
00019     
00021   uint16_t raw() const { return theSample; }
00023   int adc() const { return theSample&0xFFF; }
00025   int gainId() const { return (theSample>>12)&0x3; }
00027   uint16_t operator()() { return theSample; }
00028 
00029  private:
00030   uint16_t theSample;
00031 };
00032 
00033 std::ostream& operator<<(std::ostream&, const EcalFEMSample&);
00034   
00035 
00036 
00037 #endif