| OpenMS 2.5.0

Public Member Functions | Private Attributes | List of all members
MSDataStoringConsumer Class Reference

Consumer class that simply stores the data. More...

`#include <OpenMS/FORMAT/DATAACCESS/MSDataStoringConsumer.h>`

Inheritance diagram for MSDataStoringConsumer:

## Public Member Functions

| MSDataStoringConsumer ()
void | setExperimentalSettings (const ExperimentalSettings &settings) override
| Set experimental settings (meta-data) of the data to be consumed. More...
void | setExpectedSize (Size s_size, Size c_size) override
| Set expected size of spectra and chromatograms to be consumed. More...
void | consumeSpectrum (SpectrumType &s) override
| Consume a spectrum. More...
void | consumeChromatogram (ChromatogramType &c) override
| Consume a chromatogram. More...
const PeakMap & | getData () const
Public Member Functions inherited from IMSDataConsumer
virtual | ~IMSDataConsumer ()

## Private Attributes

PeakMap | exp_

## Additional Inherited Members

Public Types inherited from IMSDataConsumer
typedef MSSpectrum | SpectrumType
typedef MSChromatogram | ChromatogramType

## Detailed Description

Consumer class that simply stores the data.

This class is able to keep spectra and chromatograms passed to it in memory and the data can be accessed through getData()

## Constructor & Destructor Documentation

## ◆ MSDataStoringConsumer()

MSDataStoringConsumer | ( |  | ) |

## Member Function Documentation

## ◆ consumeChromatogram()

void consumeChromatogram | ( | ChromatogramType & |  | ) |

override virtual

Consume a chromatogram.

The chromatogram will be consumed by the implementation and possibly modified.

Note
  The implementation might not allow to consume spectra and chromatograms in any order

Parameters

  s | The chromatogram to be consumed

Implements IMSDataConsumer.

## ◆ consumeSpectrum()

void consumeSpectrum | ( | SpectrumType & | s | ) |

override virtual

Consume a spectrum.

The spectrum will be consumed by the implementation and possibly modified.

Note
  The implementation might not allow to consume spectra and chromatograms in any order

Parameters

  s | The spectrum to be consumed

Implements IMSDataConsumer.

## ◆ getData()

const PeakMap& getData | ( |  | ) | const

## ◆ setExpectedSize()

void setExpectedSize | ( | Size | expectedSpectra,
|  | Size | expectedChromatograms
| ) |  |

override virtual

Set expected size of spectra and chromatograms to be consumed.

Some implementations might care about the number of spectra and chromatograms to be consumed and need to be informed about this (usually before consuming starts).

Note
  Calling this method is optional but good practice.

Parameters

  expectedSpectra | Number of spectra expected
  expectedChromatograms | Number of chromatograms expected

Implements IMSDataConsumer.

## ◆ setExperimentalSettings()

void setExperimentalSettings | ( | const ExperimentalSettings & | exp | ) |

override virtual

Set experimental settings (meta-data) of the data to be consumed.

Some implementations might need to know about the meta-data (or the context) of the spectra and chromatograms to be consumed. This method allows them learn this.

Note
  Calling this method is optional but good practice.

Parameters

  exp | Experimental settings meta data for the data to be consumed

Implements IMSDataConsumer.

## Member Data Documentation

## ◆ exp_

PeakMap exp_

private