Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Private Attributes | List of all members
MSDataAggregatingConsumer Class Reference

Aggregates spectra by retention time. More...

#include <OpenMS/FORMAT/DATAACCESS/MSDataAggregatingConsumer.h>

Inheritance diagram for MSDataAggregatingConsumer:
IMSDataConsumer

Public Member Functions

 MSDataAggregatingConsumer (Interfaces::IMSDataConsumer *next_consumer)
 Constructor. More...
 
virtual ~MSDataAggregatingConsumer ()
 Constructor. More...
 
virtual void setExpectedSize (Size, Size)
 Set expected size of spectra and chromatograms to be consumed. More...
 
virtual void consumeSpectrum (SpectrumType &s)
 Consume a spectrum. More...
 
virtual void consumeChromatogram (ChromatogramType &c)
 Consume a chromatogram. More...
 
virtual void setExperimentalSettings (const OpenMS::ExperimentalSettings &)
 Set experimental settings (meta-data) of the data to be consumed. More...
 
- Public Member Functions inherited from IMSDataConsumer
virtual ~IMSDataConsumer ()
 

Private Attributes

Interfaces::IMSDataConsumernext_consumer_
 
double previous_rt_
 
bool rt_initialized_
 
SpectrumType s_tmp
 
std::vector< SpectrumTypes_list
 

Additional Inherited Members

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

Detailed Description

Aggregates spectra by retention time.

Constructor & Destructor Documentation

◆ MSDataAggregatingConsumer()

Constructor.

Note
This does not transfer ownership of the consumer

◆ ~MSDataAggregatingConsumer()

virtual ~MSDataAggregatingConsumer ( )
virtual

Constructor.

Flushes data to next consumer

Note
It is essential to not delete the underlying next_consumer before deleting this object, otherwise we risk a memory error

Member Function Documentation

◆ consumeChromatogram()

virtual void consumeChromatogram ( ChromatogramType )
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
sThe chromatogram to be consumed

Implements IMSDataConsumer.

◆ consumeSpectrum()

virtual void consumeSpectrum ( SpectrumType s)
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
sThe spectrum to be consumed

Implements IMSDataConsumer.

◆ setExpectedSize()

virtual void setExpectedSize ( Size  expectedSpectra,
Size  expectedChromatograms 
)
inlinevirtual

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
expectedSpectraNumber of spectra expected
expectedChromatogramsNumber of chromatograms expected

Implements IMSDataConsumer.

References OpenMS::Constants::c.

◆ setExperimentalSettings()

virtual void setExperimentalSettings ( const OpenMS::ExperimentalSettings exp)
inlinevirtual

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
expExperimental settings meta data for the data to be consumed

Implements IMSDataConsumer.

Member Data Documentation

◆ next_consumer_

Interfaces::IMSDataConsumer* next_consumer_
private

◆ previous_rt_

double previous_rt_
private

◆ rt_initialized_

bool rt_initialized_
private

◆ s_list

std::vector<SpectrumType> s_list
private

◆ s_tmp

SpectrumType s_tmp
private

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:10 using doxygen 1.8.13