Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:01

0001 #ifndef TPC_LASEREVENTINFOV1_H
0002 #define TPC_LASEREVENTINFOV1_H
0003 
0004 #include "LaserEventInfo.h"
0005 
0006 #include <iostream>
0007 
0008 class LaserEventInfov1 : public LaserEventInfo
0009 {
0010  public:
0011   LaserEventInfov1() = default;
0012   ~LaserEventInfov1();
0013 
0014   void identify(std::ostream &os = std::cout) const override;
0015   void Reset() override;
0016 
0017   PHObject* CloneMe() const override { return new LaserEventInfov1(*this); }
0018   void CopyTo(LaserEventInfo *info) override;
0019 
0020   bool isLaserEvent() const override { return m_isLaserEvent; }
0021   void setIsLaserEvent(const bool isLaserEvent) override { m_isLaserEvent = isLaserEvent; }
0022 
0023   int getPeakSample(const bool side) const override { return m_peakSample[side]; }
0024   void setPeakSample(const bool side, const int sample) override { m_peakSample[side] = sample; }
0025 
0026   float getPeakWidth(const bool side) const override { return m_peakWidth[side]; }
0027   void setPeakWidth(const bool side, const float width) override { m_peakWidth[side] = width; }
0028 
0029  protected:
0030 
0031   bool m_isLaserEvent{false};
0032   int m_peakSample[2] = {std::numeric_limits<int>::max(), std::numeric_limits<int>::max()};
0033   float m_peakWidth[2] = {std::numeric_limits<float>::quiet_NaN(), std::numeric_limits<float>::quiet_NaN()};
0034 
0035   ClassDefOverride(LaserEventInfov1, 1);
0036 };
0037 
0038 #endif