OpenMS
Loading...
Searching...
No Matches
MSChromatogramParquetConsumer.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: Justin Sing $
6// $Authors: Justin Sing $
7// --------------------------------------------------------------------------
8
9#pragma once
10
13
14#include <memory>
15
16namespace OpenMS
17{
18 class MSChromatogramParquetConsumerImpl;
19
63 {
64 public:
74 UInt64 run_id,
75 const String& source_file,
76 const OpenSwath::LightTargetedExperiment& transition_exp);
77
80
82 void consumeSpectrum(SpectrumType& s) override;
90 void finalize();
97 void setExpectedSize(Size expectedSpectra, Size expectedChromatograms) override;
104
105 private:
106 std::unique_ptr<MSChromatogramParquetConsumerImpl> impl_;
107 };
108} // namespace OpenMS
Description of the experimental settings.
Definition ExperimentalSettings.h:36
The interface of a consumer of spectra and chromatograms.
Definition IMSDataConsumer.h:46
Writes chromatograms to a Parquet file with a PyProphet-compatible schema.
Definition MSChromatogramParquetConsumer.h:63
void setExpectedSize(Size expectedSpectra, Size expectedChromatograms) override
Reserve storage for expected data sizes.
void finalize()
Finalize and write the parquet file.
std::unique_ptr< MSChromatogramParquetConsumerImpl > impl_
Definition MSChromatogramParquetConsumer.h:106
void consumeChromatogram(ChromatogramType &c) override
Consume a chromatogram and append it to the parquet output.
~MSChromatogramParquetConsumer() override
Destructor flushes pending data and closes the parquet writer.
MSChromatogramParquetConsumer(const String &filename, UInt64 run_id, const String &source_file, const OpenSwath::LightTargetedExperiment &transition_exp)
Construct a parquet consumer for chromatogram export.
void setExperimentalSettings(const ExperimentalSettings &exp) override
Set experimental settings (currently unused).
void consumeSpectrum(SpectrumType &s) override
Consume a spectrum (no-op; spectra are ignored for chromatogram export).
The representation of a chromatogram.
Definition MSChromatogram.h:30
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
A more convenient string class.
Definition String.h:34
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
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
Definition TransitionExperiment.h:356