| OpenMS 2.5.0

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MzMLSwathFileConsumer Class Reference

On-disk mzML implementation of FullSwathFileConsumer. More...

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

Inheritance diagram for MzMLSwathFileConsumer:

## Public Types

typedef PeakMap | MapType
typedef MapType::SpectrumType | SpectrumType
typedef MapType::ChromatogramType | ChromatogramType
Public Types inherited from FullSwathFileConsumer
typedef PeakMap | MapType
typedef MapType::SpectrumType | SpectrumType
typedef MapType::ChromatogramType | ChromatogramType
Public Types inherited from IMSDataConsumer
typedef MSSpectrum | SpectrumType
typedef MSChromatogram | ChromatogramType

## Public Member Functions

| MzMLSwathFileConsumer (const String &cachedir, const String &basename, Size nr_ms1_spectra, const std::vector< int > &nr_ms2_spectra)
| MzMLSwathFileConsumer (std::vector< OpenSwath::SwathMap > known_window_boundaries, const String &cachedir, const String &basename, Size nr_ms1_spectra, const std::vector< int > &nr_ms2_spectra)
| ~MzMLSwathFileConsumer () override
Public Member Functions inherited from FullSwathFileConsumer
| FullSwathFileConsumer ()
| FullSwathFileConsumer (std::vector< OpenSwath::SwathMap > swath_boundaries)
| Constructor. More...
| ~FullSwathFileConsumer () override
void | setExpectedSize (Size, Size) override
| Set expected size of spectra and chromatograms to be consumed. More...
void | setExperimentalSettings (const ExperimentalSettings &exp) override
| Set experimental settings (meta-data) of the data to be consumed. More...
void | retrieveSwathMaps (std::vector< OpenSwath::SwathMap > &maps)
| Populate the vector of swath maps after consuming all spectra. More...
void | consumeChromatogram (MapType::ChromatogramType &) override
| Consume a chromatogram -> should not happen when dealing with SWATH maps. More...
void | consumeSpectrum (MapType::SpectrumType &s) override
| * Consume a spectrum which may belong either to an MS1 scan or one of n MS2 (SWATH) scans More...
Public Member Functions inherited from IMSDataConsumer
virtual | ~IMSDataConsumer ()

## Protected Member Functions

void | deleteSetNull_ ()
void | addNewSwathMap_ ()
void | consumeSwathSpectrum_ (MapType::SpectrumType &s, size_t swath_nr) override
| Consume an MS2 spectrum belonging to SWATH "swath_nr". More...
void | addMS1Map_ ()
void | consumeMS1Spectrum_ (MapType::SpectrumType &s) override
| Consume an MS1 spectrum. More...
void | ensureMapsAreFilled_ () override
| Callback function after the reading is complete. More...

## Protected Attributes

PlainMSDataWritingConsumer * | ms1_consumer_
std::vector< PlainMSDataWritingConsumer * > | swath_consumers_
String | cachedir_
String | basename_
int | nr_ms1_spectra_
std::vector< int > | nr_ms2_spectra_
Protected Attributes inherited from FullSwathFileConsumer
std::vector< OpenSwath::SwathMap > | swath_map_boundaries_
| A list of Swath map identifiers (lower/upper boundary and center) More...
std::vector< boost::shared_ptr< PeakMap > > | swath_maps_
| A list of SWATH maps and the MS1 map. More...
boost::shared_ptr< PeakMap > | ms1_map_
PeakMap | settings_
| The Experimental settings. More...
bool | consuming_possible_
| Whether further spectra can still be consumed. More...
bool | use_external_boundaries_
| Whether to use external input for SWATH boundaries. More...
size_t | correct_window_counter_
| How many windows were correctly annotated (non-zero window limits) More...

## Detailed Description

On-disk mzML implementation of FullSwathFileConsumer.

Writes all spectra immediately to disk to an mzML file location using the PlainMSDataWritingConsumer. Internally, it handles n+1 (n SWATH + 1 MS1 map) objects of MSDataCachedConsumer which can consume the spectra and write them to disk immediately.

Warning: no swathmaps (MS1 nor MS2) will be available when calling retrieveSwathMaps() for downstream use.

## Member Typedef Documentation

## ◆ ChromatogramType

typedef MapType::ChromatogramType ChromatogramType

## ◆ MapType

typedef PeakMap MapType

## ◆ SpectrumType

typedef MapType::SpectrumType SpectrumType

## Constructor & Destructor Documentation

## ◆ MzMLSwathFileConsumer() [1/2]

MzMLSwathFileConsumer | ( | const String & | cachedir,
|  | const String & | basename,
|  | Size | nr_ms1_spectra,
|  | const std::vector< int > & | nr_ms2_spectra
| ) |  |

inline

## ◆ MzMLSwathFileConsumer() [2/2]

MzMLSwathFileConsumer | ( | std::vector< OpenSwath::SwathMap > | known_window_boundaries,
|  | const String & | cachedir,
|  | const String & | basename,
|  | Size | nr_ms1_spectra,
|  | const std::vector< int > & | nr_ms2_spectra
| ) |  |

inline

## ◆ ~MzMLSwathFileConsumer()

~MzMLSwathFileConsumer | ( |  | ) |

inline override

## Member Function Documentation

## ◆ addMS1Map_()

void addMS1Map_ | ( |  | ) |

inline protected

## ◆ addNewSwathMap_()

void addNewSwathMap_ | ( |  | ) |

inline protected

## ◆ consumeMS1Spectrum_()

void consumeMS1Spectrum_ | ( | MapType::SpectrumType & | s | ) |

inline override protected virtual

Consume an MS1 spectrum.

This function should handle an MS1 spectrum.

Implements FullSwathFileConsumer.

## ◆ consumeSwathSpectrum_()

void consumeSwathSpectrum_ | ( | MapType::SpectrumType & | s,
|  | size_t | swath_nr
| ) |  |

inline override protected virtual

Consume an MS2 spectrum belonging to SWATH "swath_nr".

This function should handle a spectrum belonging to a specific SWATH (indicated by swath_nr).

Implements FullSwathFileConsumer.

References MSSpectrum::clear().

## ◆ deleteSetNull_()

void deleteSetNull_ | ( |  | ) |

inline protected

## ◆ ensureMapsAreFilled_()

void ensureMapsAreFilled_ | ( |  | ) |

inline override protected virtual

Callback function after the reading is complete.

Has to ensure that swath_maps_ and ms1_map_ are correctly populated.

Implements FullSwathFileConsumer.

## Member Data Documentation

## ◆ basename_

String basename_

protected

## ◆ cachedir_

String cachedir_

protected

## ◆ ms1_consumer_

PlainMSDataWritingConsumer* ms1_consumer_

protected

## ◆ nr_ms1_spectra_

int nr_ms1_spectra_

protected

## ◆ nr_ms2_spectra_

std::vector<int> nr_ms2_spectra_

protected

## ◆ swath_consumers_

std::vector<PlainMSDataWritingConsumer*> swath_consumers_

protected