00001 #ifndef DATAFORMATS_HCALDIGI_HCALLASERDIGI_H 00002 #define DATAFORMATS_HCALDIGI_HCALLASERDIGI_H 1 00003 00004 #include <boost/cstdint.hpp> 00005 #include <vector> 00006 00007 class HcalLaserDigi { 00008 public: 00009 HcalLaserDigi(); 00010 void setQADC(const std::vector<uint16_t>& values); 00011 uint16_t qadc(int i) const { return ((i>=0 && i<32)?(qadcraw_[i]):(0)); } 00012 void addTDCHit(int channel, int hittime); 00013 size_t tdcHits() const { return tdcraw_.size(); } 00014 int hitChannel(size_t ihit) const; 00015 int hitRaw(size_t ihit) const; 00016 double hitNS(size_t ihit) const; 00017 void setLaserControl(int att1, int att2, int select); 00018 int attenuator1() const { return attenuator1_; } 00019 int attenuator2() const { return attenuator2_; } 00020 int selector() const { return selector_; } 00021 00022 private: 00023 uint16_t qadcraw_[32]; 00024 std::vector<uint32_t> tdcraw_; 00025 int32_t attenuator1_,attenuator2_; 00026 int32_t selector_; 00027 }; 00028 00029 #endif // DATAFORMATS_HCALDIGI_HCALLASERDIGI_H