libpappsomspp
Library for mass spectrometry
pappso::SpectrumCollectionHandlerInterface Class Referenceabstract

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

#include <msrunreader.h>

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

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 More...
 
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 More...
 
virtual void setNeedMsLevelPeakList (unsigned int ms_level, bool want_peak_list) final
 tells if we need the peak list given More...
 
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 More...
 
virtual bool isReadAhead () const
 tells if we want to read ahead spectrum More...
 

Private Attributes

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

Detailed Description

interface to collect spectrums from the MsRunReader class

Definition at line 55 of file msrunreader.h.

Member Function Documentation

◆ isReadAhead()

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

tells if we want to read ahead spectrum

Definition at line 63 of file msrunreader.cpp.

References m_isReadAhead.

Referenced by pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection().

◆ 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 69 of file msrunreader.cpp.

71{
72 if(needPeakList() == true)
73 {
74 if(ms_level < m_needPeakListByMsLevel.size())
75 {
76 return m_needPeakListByMsLevel[ms_level];
77 }
78 else
79 return true;
80 }
81 else
82 {
83 return false;
84 }
85}
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::TimsData::ms2ReaderGenerateMS1MS2Spectrum(), pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), 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 87 of file msrunreader.cpp.

89{
90 if(ms_level < m_needPeakListByMsLevel.size())
91 {
92 m_needPeakListByMsLevel[ms_level] = want_peak_list;
93 }
94}

References m_needPeakListByMsLevel.

Referenced by 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 57 of file msrunreader.cpp.

58{
59 m_isReadAhead = is_read_ahead;
60}

References m_isReadAhead.

Referenced by pappso::MzxmlOutput::write().

◆ shouldStop()

◆ spectrumListHasSize()

Member Data Documentation

◆ m_isReadAhead

bool pappso::SpectrumCollectionHandlerInterface::m_isReadAhead = false
private

Definition at line 90 of file msrunreader.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 91 of file msrunreader.h.

Referenced by needMsLevelPeakList(), and setNeedMsLevelPeakList().


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