OpenMS
2.7.0
|
Transforming consumer of MS data. More...
#include <OpenMS/FORMAT/DATAACCESS/MSDataTransformingConsumer.h>
Public Member Functions | |
MSDataTransformingConsumer () | |
Constructor. More... | |
~MSDataTransformingConsumer () override | |
Default destructor. More... | |
void | setExpectedSize (Size, Size) override |
ignored More... | |
void | consumeSpectrum (SpectrumType &s) override |
Consume a spectrum. More... | |
virtual void | setSpectraProcessingFunc (std::function< void(SpectrumType &)> f_spec) |
Sets the lambda function to be called for every spectrum which is passed to this interface. More... | |
void | consumeChromatogram (ChromatogramType &c) override |
Consume a chromatogram. More... | |
virtual void | setChromatogramProcessingFunc (std::function< void(ChromatogramType &)> f_chrom) |
Sets the lambda function to be called for every chromatogram which is passed to this interface. More... | |
virtual void | setExperimentalSettingsFunc (std::function< void(const OpenMS::ExperimentalSettings &)> f_exp_settings) |
Sets the lambda function to be called when setExperimentalSettings is called via this interface. More... | |
void | setExperimentalSettings (const OpenMS::ExperimentalSettings &) override |
ignored More... | |
Public Member Functions inherited from IMSDataConsumer | |
virtual | ~IMSDataConsumer () |
Protected Attributes | |
std::function< void(SpectrumType &)> | lambda_spec_ |
std::function< void(ChromatogramType &)> | lambda_chrom_ |
std::function< void(const OpenMS::ExperimentalSettings &)> | lambda_exp_settings_ |
Additional Inherited Members | |
Public Types inherited from IMSDataConsumer | |
typedef MSSpectrum | SpectrumType |
typedef MSChromatogram | ChromatogramType |
Transforming consumer of MS data.
Is able to work on spectrum/chromatogram on the fly while it is read using a lambda function provided by the user. The lambda can transform the spectrum/chromatogram in-place or just extract some information and store it in locally captured variables. Just make sure the captured variables are still in scope when this consumer is used.
Constructor.
|
override |
Default destructor.
|
overridevirtual |
Consume a chromatogram.
The chromatogram will be consumed by the implementation and possibly modified.
s | The chromatogram to be consumed |
Implements IMSDataConsumer.
|
overridevirtual |
Consume a spectrum.
The spectrum will be consumed by the implementation and possibly modified.
s | The spectrum to be consumed |
Implements IMSDataConsumer.
|
virtual |
Sets the lambda function to be called for every chromatogram which is passed to this interface.
The lambda can contain locally captured variables, which allow to change some state. Make sure that the captured variables are still in scope (i.e. not destroyed at the point of calling the lambda). Pass a nullptr if the chromatogram should be left unchanged.
ignored
Implements IMSDataConsumer.
|
overridevirtual |
ignored
Implements IMSDataConsumer.
|
virtual |
Sets the lambda function to be called when setExperimentalSettings is called via this interface.
The lambda can contain locally captured variables, which allow to change some state. Make sure that the captured variables are still in scope (i.e. not destroyed at the point of calling the lambda). Pass a nullptr if nothing should happen (default).
|
virtual |
Sets the lambda function to be called for every spectrum which is passed to this interface.
The lambda can contain locally captured variables, which allow to change some state. Make sure that the captured variables are still in scope (i.e. not destroyed at the point of calling the lambda). Pass a nullptr if the spectrum should be left unchanged.
|
protected |
|
protected |
|
protected |