OpenMS
openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, 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, Witold Wolski $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/OPENSWATHALGO/OpenSwathAlgoConfig.h>
12 
14 #include <boost/shared_ptr.hpp>
15 #include <string>
16 #include <vector>
17 
18 namespace OpenSwath
19 {
20 
24  class OPENSWATHALGO_DLLAPI ISpectrumAccess
25  {
26 public:
28  virtual ~ISpectrumAccess();
29 
42  virtual boost::shared_ptr<ISpectrumAccess> lightClone() const = 0;
43 
45  virtual SpectrumPtr getSpectrumById(int id) = 0;
47  virtual std::vector<std::size_t> getSpectraByRT(double RT, double deltaRT) const = 0;
49  virtual size_t getNrSpectra() const = 0;
51  virtual SpectrumMeta getSpectrumMetaById(int id) const = 0;
52 
54  virtual ChromatogramPtr getChromatogramById(int id) = 0;
56  virtual std::size_t getNrChromatograms() const = 0;
58  virtual std::string getChromatogramNativeID(int id) const = 0;
59  };
60 
61  typedef boost::shared_ptr<ISpectrumAccess> SpectrumAccessPtr;
62 }
63 
The interface of a mass spectrometry experiment.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:25
virtual ChromatogramPtr getChromatogramById(int id)=0
Return a pointer to a chromatogram at the given id.
virtual std::vector< std::size_t > getSpectraByRT(double RT, double deltaRT) const =0
Return a vector of ids of spectra that are within RT +/- deltaRT.
virtual ~ISpectrumAccess()
Destructor.
virtual boost::shared_ptr< ISpectrumAccess > lightClone() const =0
Light clone operator to produce a copy for concurrent read access.
virtual SpectrumMeta getSpectrumMetaById(int id) const =0
Returns the meta information for a spectrum.
virtual SpectrumPtr getSpectrumById(int id)=0
Return a pointer to a spectrum at the given id.
virtual std::size_t getNrChromatograms() const =0
Returns the number of chromatograms available.
virtual size_t getNrSpectra() const =0
Returns the number of spectra available.
virtual std::string getChromatogramNativeID(int id) const =0
Returns the native id of the chromatogram at the given id.
Definition: Scoring.h:18
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:270
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:61
Identifying information for a spectrum.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/DataStructures.h:150