OpenMS
Loading...
Searching...
No Matches
MSDataCachedConsumer.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Hannes Roest $
6// $Authors: Hannes Roest $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
14
16
17
18namespace OpenMS
19{
20
28 class OPENMS_DLLAPI MSDataCachedConsumer :
31 {
34
35 public:
36
51 MSDataCachedConsumer(const String& filename, bool clearData=true);
52
59
65 void consumeSpectrum(SpectrumType & s) override;
66
73
74 void setExpectedSize(Size /* expectedSpectra */, Size /* expectedChromatograms */) override {;}
75
76 void setExperimentalSettings(const ExperimentalSettings& /* exp */) override {;}
77
78 protected:
79 std::ofstream ofs_;
83
84 };
85
86} //end namespace OpenMS
87
Description of the experimental settings.
Definition ExperimentalSettings.h:36
The interface of a consumer of spectra and chromatograms.
Definition IMSDataConsumer.h:46
An class that uses on-disk caching to read and write spectra and chromatograms.
Definition CachedMzMLHandler.h:41
The representation of a chromatogram.
Definition MSChromatogram.h:30
Transforming and cached writing consumer of MS data.
Definition MSDataCachedConsumer.h:31
MSChromatogram ChromatogramType
Definition MSDataCachedConsumer.h:33
std::ofstream ofs_
Definition MSDataCachedConsumer.h:79
Size spectra_written_
Definition MSDataCachedConsumer.h:81
MSSpectrum SpectrumType
Definition MSDataCachedConsumer.h:32
void setExperimentalSettings(const ExperimentalSettings &) override
Set experimental settings (meta-data) of the data to be consumed.
Definition MSDataCachedConsumer.h:76
void consumeChromatogram(ChromatogramType &c) override
Write a chromatogram to the output file.
void setExpectedSize(Size, Size) override
Set expected size of spectra and chromatograms to be consumed.
Definition MSDataCachedConsumer.h:74
MSDataCachedConsumer(const String &filename, bool clearData=true)
Constructor.
~MSDataCachedConsumer() override
Destructor.
void consumeSpectrum(SpectrumType &s) override
Write a spectrum to the output file.
bool clearData_
Definition MSDataCachedConsumer.h:80
Size chromatograms_written_
Definition MSDataCachedConsumer.h:82
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
A more convenient string class.
Definition String.h:34
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19