File indexing completed on 2024-04-06 12:31:12
0001 #ifndef DIGIECAL_ECALTBTDCSAMPLE_H
0002 #define DIGIECAL_ECALTBTDCSAMPLE_H 1
0003
0004 #include <ostream>
0005 #include <cstdint>
0006
0007
0008
0009
0010
0011
0012
0013
0014 class EcalTBTDCSample {
0015 public:
0016 EcalTBTDCSample() { theSample = 0; }
0017 EcalTBTDCSample(uint32_t data) { theSample = data; }
0018 EcalTBTDCSample(unsigned int tdcChan, unsigned int tdcVal);
0019
0020
0021 uint32_t raw() const { return theSample; }
0022
0023 unsigned int tdcValue() const { return theSample & 0xFFFFFF; }
0024
0025 unsigned int tdcChannel() const { return (theSample >> 24) & 0xFF; }
0026
0027 uint32_t operator()() { return theSample; }
0028
0029 private:
0030 uint32_t theSample;
0031 };
0032
0033 std::ostream& operator<<(std::ostream&, const EcalTBTDCSample&);
0034
0035 #endif