#ifndef _fevt_ChannelSimData_h_ #define _fevt_ChannelSimData_h_ #include #include #include #include #include namespace fevt { /** \brief Fluorescence Detector Channel Simulated Data Event * * \author Stefano Argiro' * \date Jan 29, 2003 * \version $Id$ **/ class ChannelSimData { public: /** Simulated FADC trace after electronics, before trigger * for possibly different source.Throw utl::NonExistentComponentException*/ utl::TraceI& GetFADCTrace(const FdConstants::LightSource source = FdConstants::eTotal) { return fFADCTrace->GetTrace(source); } const utl::TraceI& GetFADCTrace(const FdConstants::LightSource source = FdConstants::eTotal) const { return fFADCTrace->GetTrace(source); } /** Add a source of Type Telescope::LightSource * /example AddSource(Telescope::eDirect); */ void MakeFADCTrace(unsigned int size, double binning, const FdConstants::LightSource source = FdConstants::eTotal); void MakeFADCTrace(const utl::TraceI& t, const FdConstants::LightSource source = FdConstants::eTotal); /// Check that source /par source is present bool HasFADCTrace(const FdConstants::LightSource source) const { return fFADCTrace->HasLabel(source); } /** An iterator over the available FADC trace sources. Returns a pair when dereferenced */ typedef utl::MultiTraceI::Iterator FADCTraceIterator; typedef utl::MultiTraceI::ConstIterator ConstFADCTraceIterator; /// First std::pair FADCTraceIterator FADCTracesBegin() { return fFADCTrace->Begin(); } ConstFADCTraceIterator FADCTracesBegin() const { return fFADCTrace->Begin(); } /// Last std::pair FADCTraceIterator FADCTracesEnd() { return fFADCTrace->End(); } ConstFADCTraceIterator FADCTracesEnd() const { return fFADCTrace->End(); } private: ChannelSimData() { } ~ChannelSimData() { } utl::InitializedShadowPtr fFADCTrace; friend class Channel; friend class utl::ShadowPtr; }; } #endif