00001 #ifndef DIGIECAL_ECALTBTDCSAMPLE_H 00002 #define DIGIECAL_ECALTBTDCSAMPLE_H 1 00003 00004 00005 #include <ostream> 00006 #include <boost/cstdint.hpp> 00007 00015 class EcalTBTDCSample { 00016 public: 00017 EcalTBTDCSample() { theSample=0; } 00018 EcalTBTDCSample(uint32_t data) { theSample=data; } 00019 EcalTBTDCSample(unsigned int tdcChan, unsigned int tdcVal); 00020 00022 uint32_t raw() const { return theSample; } 00024 unsigned int tdcValue() const { return theSample&0xFFFFFF; } 00026 unsigned int tdcChannel() const { return (theSample>>24)&0xFF; } 00028 uint32_t operator()() { return theSample; } 00029 00030 private: 00031 uint32_t theSample; 00032 }; 00033 00034 std::ostream& operator<<(std::ostream&, const EcalTBTDCSample&); 00035 00036 #endif