File indexing completed on 2024-04-06 12:04:04
0001 #ifndef DIGIECAL_ECALFEMSAMPLE_H
0002 #define DIGIECAL_ECALFEMSAMPLE_H
0003
0004 #include <ostream>
0005 #include <cstdint>
0006
0007
0008
0009
0010
0011
0012
0013
0014 class EcalFEMSample {
0015 public:
0016 EcalFEMSample() { theSample = 0; }
0017 EcalFEMSample(uint16_t data) { theSample = data; }
0018 EcalFEMSample(int adc, int gainId);
0019
0020
0021 uint16_t raw() const { return theSample; }
0022
0023 int adc() const { return theSample & 0xFFF; }
0024
0025 int gainId() const { return (theSample >> 12) & 0x3; }
0026
0027 uint16_t operator()() { return theSample; }
0028
0029 private:
0030 uint16_t theSample;
0031 };
0032
0033 std::ostream& operator<<(std::ostream&, const EcalFEMSample&);
0034
0035 #endif