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:

## 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 55 of file spectrumcollectionhandlerinterface.h.

## Member Function Documentation

## isReadAhead()

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

virtual

tells if we want to read ahead spectrum

Definition at line 58 of file spectrumcollectionhandlerinterface.cpp.

{
return m_isReadAhead;
}
pappso::SpectrumCollectionHandlerInterface::m_isReadAhead
bool m_isReadAhead
Definition spectrumcollectionhandlerinterface.h:90

References m_isReadAhead.

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

## loadingEnded()

void pappso::SpectrumCollectionHandlerInterface::loadingEnded | ( |  | ) |

virtual

Reimplemented in pappso::MsRunSimpleStatistics, and pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints.

Definition at line 43 of file spectrumcollectionhandlerinterface.cpp.

{
}

Referenced by pappso::TimsData::ms2ReaderSpectrumCollectionByMsLevel(), pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection(), pappso::XyMsRunReader::readSpectrumCollection(), pappso::PwizMsRunReader::readSpectrumCollectionByMsLevel(), pappso::TimsMsRunReader::readSpectrumCollectionByMsLevel(), pappso::TimsMsRunReaderMs2::readSpectrumCollectionByMsLevel(), pappso::XyMsRunReader::readSpectrumCollectionByMsLevel(), and pappso::PwizMsRunReader::readSpectrumCollectionWithMsrunReadConfig().

## needMsLevelPeakList()

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

final virtual

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

Definition at line 64 of file spectrumcollectionhandlerinterface.cpp.

{
if(needPeakList() == true)
{
if(ms_level < m_needPeakListByMsLevel.size())
{
return m_needPeakListByMsLevel[ms_level];
}
else
return true;
}
else
{
return false;
}
}
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 spectrumcollectionhandlerinterface.h:92

References m_needPeakListByMsLevel, and needPeakList().

Referenced by pappso::TimsData::ms2ReaderGenerateMS1MS2Spectrum(), pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), and pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection().

## needPeakList()

virtual bool pappso::SpectrumCollectionHandlerInterface::needPeakList | ( |  | ) | const

pure virtual

tells if we need the peak list (if we want the binary data) for each spectrum

Implemented in pappso::MzxmlOutput::Translater, pappso::MsRunSimpleStatistics, pappso::MsRunReaderScanNumberMultiMap, pappso::MsRunReaderRetentionTimeLine, pappso::MsRunReaderTicChromatogram, pappso::MsRunReaderQualifiedSpectrumList, and pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints.

Referenced by needMsLevelPeakList(), pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection(), and pappso::PwizMsRunReader::readSpectrumCollectionByMsLevel().

## setNeedMsLevelPeakList()

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

final virtual

tells if we need the peak list given

Definition at line 82 of file spectrumcollectionhandlerinterface.cpp.

{
if(ms_level < m_needPeakListByMsLevel.size())
{
m_needPeakListByMsLevel[ms_level] = want_peak_list;
}
}

References m_needPeakListByMsLevel.

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

## setQualifiedMassSpectrum()

virtual void pappso::SpectrumCollectionHandlerInterface::setQualifiedMassSpectrum | ( | const QualifiedMassSpectrum & | spectrum | ) |

pure virtual

Implemented in pappso::MsRunReaderTicChromatogram, pappso::MsRunReaderQualifiedSpectrumList, pappso::MzxmlOutput::Translater, pappso::MsRunSimpleStatistics, pappso::MsRunReaderScanNumberMultiMap, pappso::MsRunReaderRetentionTimeLine, and pappso::MsRunXicExtractor::MsRunXicExtractorReadPoints.

Referenced by pappso::TimsData::ms2ReaderSpectrumCollectionByMsLevel(), pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection(), pappso::XyMsRunReader::readSpectrumCollection(), pappso::TimsFramesMsRunReader::readSpectrumCollection2(), pappso::PwizMsRunReader::readSpectrumCollectionByMsLevel(), pappso::XyMsRunReader::readSpectrumCollectionByMsLevel(), and pappso::PwizMsRunReader::readSpectrumCollectionWithMsrunReadConfig().

## setReadAhead()

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

final virtual

use threads to read a spectrum by batch of batch_size

Parameters

  is_read_ahead | boolean to use threads or not

Definition at line 52 of file spectrumcollectionhandlerinterface.cpp.

{
m_isReadAhead = is_read_ahead;
}

References m_isReadAhead.

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

## shouldStop()

bool pappso::SpectrumCollectionHandlerInterface::shouldStop | ( |  | ) |

virtual

Definition at line 38 of file spectrumcollectionhandlerinterface.cpp.

{
return false;
}

Referenced by pappso::TimsData::ms2ReaderSpectrumCollectionByMsLevel(), pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection(), pappso::PwizMsRunReader::readSpectrumCollectionByMsLevel(), and pappso::PwizMsRunReader::readSpectrumCollectionWithMsrunReadConfig().

## spectrumListHasSize()

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

virtual

Reimplemented in pappso::MsRunReaderQualifiedSpectrumList.

Definition at line 47 of file spectrumcollectionhandlerinterface.cpp.

{
}

Referenced by pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), pappso::TimsMsRunReaderMs2Selected::readSpectrumCollection(), pappso::TimsFramesMsRunReader::readSpectrumCollection2(), pappso::PwizMsRunReader::readSpectrumCollectionByMsLevel(), pappso::TimsMsRunReaderMs2::readSpectrumCollectionByMsLevel(), and pappso::PwizMsRunReader::readSpectrumCollectionWithMsrunReadConfig().

## Member Data Documentation

## m_isReadAhead

bool pappso::SpectrumCollectionHandlerInterface::m_isReadAhead = false

private

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

{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:

- pappsomspp/msrun/spectrumcollectionhandlerinterface.h
- pappsomspp/msrun/spectrumcollectionhandlerinterface.cpp