Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:17

0001 #ifndef DATAFORMATS_HCALDIGI_HCALLASERDIGI_H
0002 #define DATAFORMATS_HCALDIGI_HCALLASERDIGI_H 1
0003 
0004 #include <cstddef>
0005 #include <cstdint>
0006 #include <vector>
0007 
0008 class HcalLaserDigi {
0009 public:
0010   HcalLaserDigi();
0011   void setQADC(const std::vector<uint16_t>& values);
0012   uint16_t qadc(int i) const { return ((i >= 0 && i < 32) ? (qadcraw_[i]) : (0)); }
0013   void addTDCHit(int channel, int hittime);
0014   size_t tdcHits() const { return tdcraw_.size(); }
0015   int hitChannel(size_t ihit) const;
0016   int hitRaw(size_t ihit) const;
0017   double hitNS(size_t ihit) const;
0018   void setLaserControl(int att1, int att2, int select);
0019   int attenuator1() const { return attenuator1_; }
0020   int attenuator2() const { return attenuator2_; }
0021   int selector() const { return selector_; }
0022 
0023 private:
0024   uint16_t qadcraw_[32];
0025   std::vector<uint32_t> tdcraw_;
0026   int32_t attenuator1_, attenuator2_;
0027   int32_t selector_;
0028 };
0029 
0030 #endif  // DATAFORMATS_HCALDIGI_HCALLASERDIGI_H