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

65 {
66  return m_isReadAhead;
67 }

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

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

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

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

59 {
60  m_isReadAhead = is_read_ahead;
61 }

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 92 of file msrunreader.h.

Referenced by needMsLevelPeakList(), and setNeedMsLevelPeakList().


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