/*! * @file SEvent.h * @author Dan Saunders, on behalf of the SoLid collaboration. * @date 31 Oct 2016 */ #ifndef SEvent_h_ #define SEvent_h_ #include #include #include "SContainers/SPeak.h" class SChannel; //! Event container. class SEvent { private: //! See htime() double m_htime; //! See channels() (one per peak). std::vector m_channels; //! See peaks() (one per channel). std::vector m_peaks; //! See NID_nPeaks(). unsigned int m_NID_nPeaks; //! See NID_tot(). unsigned int m_NID_tot; //! See NID_IonA(). double m_NID_IonA; public: SEvent(SPeak * seedPeak); ~SEvent() {}; void addPeak(SPeak * p); // Setters and getters _______________________________________________________ //! The peaks forming the event. std::vector * peaks() {return &m_peaks;} //! The channels forming the event. std::vector * channels() {return &m_channels;} //! Time of the event in ns (relative to the start of the current cycle). double htime() {return m_htime;} //! Number of peaks forming the event. unsigned int size() {return m_peaks.size();} //! Neutron ID parameteter - number of peaks in a time window. unsigned int NID_nPeaks() {return m_NID_nPeaks;} void setNID_nPeaks(unsigned int n) {m_NID_nPeaks = n;} //! Neutron ID parameteter - number of samples above threshold. unsigned int NID_tot() {return m_NID_tot;} void setNID_tot(unsigned int n) {m_NID_tot = n;} //! Neutron ID parameteter - number of samples above threshold. unsigned int NID_IonA() {return m_NID_IonA;} void setNID_IonA(unsigned int IonA) {m_NID_IonA = IonA;} }; #endif /* SEvent_h_ */