OpenMS
SpectrumAccessOpenMSCached.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 $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
15 
17 
19 
20 #include <fstream>
21 
22 namespace OpenMS
23 {
24 
38  class OPENMS_DLLAPI SpectrumAccessOpenMSCached :
40  public OpenMS::CachedmzML
41  {
42 
43 public:
46 
56  explicit SpectrumAccessOpenMSCached(const String& filename);
57 
62 
65 
67  boost::shared_ptr<OpenSwath::ISpectrumAccess> lightClone() const override;
68 
70 
72 
73  std::vector<std::size_t> getSpectraByRT(double RT, double deltaRT) const override;
74 
75  size_t getNrSpectra() const override;
76 
78 
80 
81  size_t getNrChromatograms() const override;
82 
84 
85  std::string getChromatogramNativeID(int id) const override;
86  };
87 
88 } //end namespace
89 
An class that uses on-disk caching to read and write spectra and chromatograms.
Definition: CachedMzML.h:28
Representation of chromatogram settings, e.g. SRM/MRM chromatograms.
Definition: ChromatogramSettings.h:35
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
An implementation of the Spectrum Access interface using on-disk caching.
Definition: SpectrumAccessOpenMSCached.h:41
OpenMS::PeakMap MSExperimentType
Definition: SpectrumAccessOpenMSCached.h:44
size_t getNrSpectra() const override
Returns the number of spectra available.
SpectrumAccessOpenMSCached(const String &filename)
Constructor, opens the file stream.
SpectrumAccessOpenMSCached(const SpectrumAccessOpenMSCached &rhs)
Copy constructor.
OpenMS::MSSpectrum MSSpectrumType
Definition: SpectrumAccessOpenMSCached.h:45
std::vector< std::size_t > getSpectraByRT(double RT, double deltaRT) const override
Return a vector of ids of spectra that are within RT +/- deltaRT.
~SpectrumAccessOpenMSCached() override
Destructor.
size_t getNrChromatograms() const override
Returns the number of chromatograms available.
SpectrumSettings getSpectraMetaInfo(int id) const
OpenSwath::ChromatogramPtr getChromatogramById(int id) override
Return a pointer to a chromatogram at the given id.
OpenSwath::SpectrumPtr getSpectrumById(int id) override
Return a pointer to a spectrum at the given id.
ChromatogramSettings getChromatogramMetaInfo(int id) const
std::string getChromatogramNativeID(int id) const override
Returns the native id of the chromatogram at the given id.
boost::shared_ptr< OpenSwath::ISpectrumAccess > lightClone() const override
Light clone operator (actual data will not get copied)
OpenSwath::SpectrumMeta getSpectrumMetaById(int id) const override
Returns the meta information for a spectrum.
Representation of 1D spectrum settings.
Definition: SpectrumSettings.h:39
A more convenient string class.
Definition: String.h:34
The interface of a mass spectrometry experiment.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:30
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:146
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:276
Identifying information for a spectrum.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:150