Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DIGIECAL_ESSAMPLE_H
0002 #define DIGIECAL_ESSAMPLE_H
0003 
0004 #include <ostream>
0005 #include <cstdint>
0006 
0007 class ESSample {
0008 public:
0009   ESSample() { theSample = 0; }
0010   ESSample(int16_t data) { theSample = data; }
0011   ESSample(int adc);
0012 
0013   /// get the raw word
0014   int16_t raw() const { return theSample; }
0015   /// get the ADC sample (singed 16 bits)
0016   int adc() const { return theSample; }
0017   /// for streaming
0018   int16_t operator()() { return theSample; }
0019 
0020 private:
0021   int16_t theSample;
0022 };
0023 
0024 std::ostream& operator<<(std::ostream&, const ESSample&);
0025 
0026 #endif