Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include "LaserEventInfov1.h"
0002 
0003 LaserEventInfov1::~LaserEventInfov1() = default;
0004 
0005 void LaserEventInfov1::identify(std::ostream& os) const
0006 {
0007   os << "LaserEventInfov1: " << std::endl;
0008   os << "   isLaserEvent? " << isLaserEvent() << std::endl;
0009   if (isLaserEvent())
0010   {
0011     os << "      South peak sample: " << getPeakSample(false) << "   width: " << getPeakWidth(false) << std::endl;
0012     os << "      North peak sample: " << getPeakSample(true) << "   width: " << getPeakWidth(true) << std::endl;
0013   }
0014   return;
0015 }
0016 
0017 void LaserEventInfov1::Reset()
0018 {
0019   m_isLaserEvent = false;
0020   for (int i = 0; i < 2; i++)
0021   {
0022     m_peakSample[i] = std::numeric_limits<int>::max();
0023     m_peakWidth[i] = std::numeric_limits<float>::quiet_NaN();
0024   }
0025 
0026   return;
0027 }
0028 
0029 void LaserEventInfov1::CopyTo(LaserEventInfo* info)
0030 {
0031   info->setIsLaserEvent(isLaserEvent());
0032 
0033   for (int side = 0; side <= 1; side++)
0034   {
0035     info->setPeakSample(side, getPeakSample(side));
0036     info->setPeakWidth(side, getPeakWidth(side));
0037   }
0038 
0039   return;
0040 }