OpenMS
MSDataTransformingConsumer.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hannes Roest $
6 // $Authors: Hannes Roest, Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 
16 #include <OpenMS/KERNEL/Peak1D.h>
18 
19 namespace OpenMS
20 {
21 
32  class OPENMS_DLLAPI MSDataTransformingConsumer :
34  {
35 
36  public:
37 
42 
45 
47  void setExpectedSize(Size /* expectedSpectra */, Size /* expectedChromatograms */) override;
48 
49  void consumeSpectrum(SpectrumType& s) override;
50 
58  virtual void setSpectraProcessingFunc( std::function<void (SpectrumType&)> f_spec );
59 
61 
69  virtual void setChromatogramProcessingFunc( std::function<void (ChromatogramType&)> f_chrom );
70 
78  virtual void setExperimentalSettingsFunc( std::function<void (const OpenMS::ExperimentalSettings&)> f_exp_settings );
79 
82 
83  protected:
84  std::function<void (SpectrumType&)> lambda_spec_;
85  std::function<void (ChromatogramType&)> lambda_chrom_;
86  std::function<void (const OpenMS::ExperimentalSettings&)> lambda_exp_settings_;
87  };
88 
89 } //end namespace OpenMS
90 
Description of the experimental settings.
Definition: ExperimentalSettings.h:36
The interface of a consumer of spectra and chromatograms.
Definition: IMSDataConsumer.h:46
The representation of a chromatogram.
Definition: MSChromatogram.h:30
Transforming consumer of MS data.
Definition: MSDataTransformingConsumer.h:34
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.
~MSDataTransformingConsumer() override
Default destructor.
void consumeChromatogram(ChromatogramType &c) override
Consume a chromatogram.
std::function< void(const OpenMS::ExperimentalSettings &)> lambda_exp_settings_
Definition: MSDataTransformingConsumer.h:86
void setExpectedSize(Size, Size) override
ignored
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.
void consumeSpectrum(SpectrumType &s) override
Consume a spectrum.
std::function< void(SpectrumType &)> lambda_spec_
Definition: MSDataTransformingConsumer.h:84
void setExperimentalSettings(const OpenMS::ExperimentalSettings &) override
ignored
std::function< void(ChromatogramType &)> lambda_chrom_
Definition: MSDataTransformingConsumer.h:85
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.
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:97
const double c
Definition: Constants.h:188
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19