/** * @file SEvent.cpp * @author Dan Saunders, on behalf of the SoLid collaboration. * @date 31 Oct 2016 */ #include "SEvent.h" //============================================================================== //! Constructor setting passed values. /*! Passed values are taken from the seed peak (so the channel, the peak itself, * its timestamp). */ SEvent::SEvent(SPeak * seedPeak) : m_NID_nPeaks(0), m_NID_tot(0), m_NID_IonA(0) { m_htime = seedPeak->htime(); addPeak(seedPeak); } //============================================================================== //! Adds a peak to the event. /*! Takes a given peak, marks it as event associated, keeps a reference to the * peak, and its channel. */ void SEvent::addPeak(SPeak * p) { m_peaks.push_back(p); m_channels.push_back(p->channel()); p->setEventAssociated(true); } //==============================================================================