File indexing completed on 2024-04-06 12:04:04
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
0014 int16_t raw() const { return theSample; }
0015
0016 int adc() const { return theSample; }
0017
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