libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::SpectrumCollectionHandlerInterface Class Referenceabstract

interface to collect spectrums from the MsRunReader class More...

#include <spectrumcollectionhandlerinterface.h>

Inheritance diagram for pappso::SpectrumCollectionHandlerInterface:
pappso::MsRunQualifiedSpectrumLoader pappso::MsRunReaderRetentionTimeLine pappso::MsRunReaderScanNumberMultiMap pappso::MsRunReaderTicChromatogram pappso::MsRunSimpleStatistics pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints pappso::MzxmlOutput::Translater pappso::masschroq::PrecursorParser

Public Member Functions

virtual void setQualifiedMassSpectrum (const QualifiedMassSpectrum &spectrum)=0
virtual bool needPeakList () const =0
 tells if we need the peak list (if we want the binary data) for each spectrum
virtual bool needMsLevelPeakList (unsigned int ms_level) const final
 tells if we need the peak list (if we want the binary data) for each spectrum, given an MS level
virtual void setNeedMsLevelPeakList (unsigned int ms_level, bool want_peak_list) final
 tells if we need the peak list given
virtual bool shouldStop ()
virtual void loadingEnded ()
virtual void spectrumListHasSize (std::size_t size)
virtual void setReadAhead (bool is_read_ahead) final
 use threads to read a spectrum by batch of batch_size
virtual bool isReadAhead () const
 tells if we want to read ahead spectrum

Private Attributes

bool m_isReadAhead = false
std::vector< bool > m_needPeakListByMsLevel

Detailed Description

interface to collect spectrums from the MsRunReader class

Definition at line 51 of file spectrumcollectionhandlerinterface.h.

Member Function Documentation

◆ isReadAhead()

bool pappso::SpectrumCollectionHandlerInterface::isReadAhead ( ) const
virtual

◆ loadingEnded()

◆ needMsLevelPeakList()

bool pappso::SpectrumCollectionHandlerInterface::needMsLevelPeakList ( unsigned int ms_level) const
finalvirtual

tells if we need the peak list (if we want the binary data) for each spectrum, given an MS level

Definition at line 63 of file spectrumcollectionhandlerinterface.cpp.

64{
65 if(needPeakList() == true)
66 {
67 if(ms_level < m_needPeakListByMsLevel.size())
68 {
69 return m_needPeakListByMsLevel[ms_level];
70 }
71 else
72 return true;
73 }
74 else
75 {
76 return false;
77 }
78}
virtual bool needPeakList() const =0
tells if we need the peak list (if we want the binary data) for each spectrum

References m_needPeakListByMsLevel, and needPeakList().

Referenced by pappso::TimsDdaPrecursors::ms2ReaderGenerateMS1MS2Spectrum(), needPeakList(), pappso::TimsDdaPrecursors::rawReaderSpectrumCollectionByMsLevel(), pappso::MzcborMsRunReader::readSpectrumCollection(), and pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection().

◆ needPeakList()

◆ setNeedMsLevelPeakList()

void pappso::SpectrumCollectionHandlerInterface::setNeedMsLevelPeakList ( unsigned int ms_level,
bool want_peak_list )
finalvirtual

tells if we need the peak list given

Definition at line 80 of file spectrumcollectionhandlerinterface.cpp.

82{
83 if(ms_level < m_needPeakListByMsLevel.size())
84 {
85 m_needPeakListByMsLevel[ms_level] = want_peak_list;
86 }
87}

References m_needPeakListByMsLevel.

Referenced by needPeakList(), pappso::MzxmlOutput::write(), and pappso::MzxmlOutput::write().

◆ setQualifiedMassSpectrum()

◆ setReadAhead()

void pappso::SpectrumCollectionHandlerInterface::setReadAhead ( bool is_read_ahead)
finalvirtual

use threads to read a spectrum by batch of batch_size

Parameters
is_read_aheadboolean to use threads or not

Definition at line 51 of file spectrumcollectionhandlerinterface.cpp.

52{
53 m_isReadAhead = is_read_ahead;
54}

References m_isReadAhead.

Referenced by needPeakList(), pappso::MzxmlOutput::write(), and pappso::MzxmlOutput::write().

◆ shouldStop()

◆ spectrumListHasSize()

Member Data Documentation

◆ m_isReadAhead

bool pappso::SpectrumCollectionHandlerInterface::m_isReadAhead = false
private

Definition at line 84 of file spectrumcollectionhandlerinterface.h.

Referenced by isReadAhead(), and setReadAhead().

◆ m_needPeakListByMsLevel

std::vector<bool> pappso::SpectrumCollectionHandlerInterface::m_needPeakListByMsLevel
private
Initial value:
= {
true, true, true, true, true, true, true, true, true, true, true, true, true, true, true}

Definition at line 86 of file spectrumcollectionhandlerinterface.h.

86 {
87 true, true, true, true, true, true, true, true, true, true, true, true, true, true, true};

Referenced by needMsLevelPeakList(), and setNeedMsLevelPeakList().


The documentation for this class was generated from the following files: