OpenMS
Loading...
Searching...
No Matches
OnDiscThermoRawExperiment.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: Julianus Pfeuffer $
6// $Authors: Julianus Pfeuffer $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
13#ifdef WITH_THERMO_RAW
14
17
18#include <memory>
19#include <string>
20
21namespace OpenMS
22{
62 class OPENMS_DLLAPI OnDiscThermoRawExperiment :
63 public IMSExperimentRandomAccess
64 {
65 public:
66 using Options = ThermoRawFile::Options;
67
69 OnDiscThermoRawExperiment();
70
72 OnDiscThermoRawExperiment(const OnDiscThermoRawExperiment& source);
73
75 OnDiscThermoRawExperiment(OnDiscThermoRawExperiment&& source) noexcept;
76
78 OnDiscThermoRawExperiment& operator=(const OnDiscThermoRawExperiment& source);
79
81 OnDiscThermoRawExperiment& operator=(OnDiscThermoRawExperiment&& source) noexcept;
82
84 ~OnDiscThermoRawExperiment() override;
85
95 void openFile(const std::string& path, const Options& options = Options());
96
98 bool isOpen() const;
99
101 const std::string& getFilename() const;
102
104 const Options& getOptions() const;
105
106 Size getNrSpectra() const override;
107 Size getNrChromatograms() const override;
108
114 MSSpectrum getSpectrum(Size index) override;
115
117 MSSpectrum operator[](Size index)
118 {
119 return getSpectrum(index);
120 }
121
130 MSSpectrum getSpectrumMetadata(Size index) override;
131
139 MSSpectrum getSpectrumPeaks(Size index) override;
140
146 MSSpectrum getSpectrumByNativeId(const std::string& native_id);
147
148 double getSpectrumRT(Size index) const override;
149 UInt getSpectrumMSLevel(Size index) const override;
150
152 const std::string& getSpectrumNativeID(Size index) const;
153
155 int getScanNumber(Size index) const;
156
158 Size getSpectrumIndexByScanNumber(int scan) const;
159
160 bool isSortedByRT() const override;
161 Size findFirstRT(double rt) const override;
162
168 MSChromatogram getChromatogram(Size index) override;
169
170 std::shared_ptr<const ExperimentalSettings> getExperimentalSettings() const override;
171
172 std::unique_ptr<IMSExperimentRandomAccess> clone() const override;
173
174 private:
175 struct Index;
176 struct Handle;
177 void checkIndex_(Size index) const;
178 std::shared_ptr<const Index> index_;
179 std::unique_ptr<Handle> handle_;
180 };
181} // namespace OpenMS
182
183#endif // WITH_THERMO_RAW
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
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