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::MsRunReaderScanNumberMultiMap pappso::MsRunSimpleStatistics pappso::MsRunXicExtractorInterface::MsRunXicExtractorReadPoints pappso::MzxmlOutput::Translater RetentionTimeReader

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

67 {
68  return m_isReadAhead;
69 }

References m_isReadAhead.

Referenced by pappso::TimsMsRunReaderMs2::readSpectrumCollection(), and 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 72 of file msrunreader.cpp.

74 {
75  if(needPeakList() == true)
76  {
77  if(ms_level < m_needPeakListByMsLevel.size())
78  {
79  return m_needPeakListByMsLevel[ms_level];
80  }
81  else
82  return true;
83  }
84  else
85  {
86  return false;
87  }
88 }

References m_needPeakListByMsLevel, and needPeakList().

Referenced by pappso::TimsMsRunReader::readSpectrumCollection(), pappso::TimsMsRunReaderMs2::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 90 of file msrunreader.cpp.

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

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

61 {
62  m_isReadAhead = is_read_ahead;
63 }

References m_isReadAhead.

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

◆ shouldStop()

bool pappso::SpectrumCollectionHandlerInterface::shouldStop ( )
virtual

◆ spectrumListHasSize()

void pappso::SpectrumCollectionHandlerInterface::spectrumListHasSize ( std::size_t  size)
virtual

Member Data Documentation

◆ m_isReadAhead

bool pappso::SpectrumCollectionHandlerInterface::m_isReadAhead = false
private

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

Referenced by needMsLevelPeakList(), and setNeedMsLevelPeakList().


The documentation for this class was generated from the following files:
pappso::SpectrumCollectionHandlerInterface::needPeakList
virtual bool needPeakList() const =0
tells if we need the peak list (if we want the binary data) for each spectrum
pappso::SpectrumCollectionHandlerInterface::m_needPeakListByMsLevel
std::vector< bool > m_needPeakListByMsLevel
Definition: msrunreader.h:94
pappso::SpectrumCollectionHandlerInterface::m_isReadAhead
bool m_isReadAhead
Definition: msrunreader.h:93