OpenMS
ISpectrumAccess Class Referenceabstract

The interface of a mass spectrometry experiment. More...

#include <OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h>

Inheritance diagram for ISpectrumAccess:
[legend]

Public Member Functions

virtual ~ISpectrumAccess ()
 Destructor. More...
 
virtual boost::shared_ptr< ISpectrumAccesslightClone () const =0
 Light clone operator to produce a copy for concurrent read access. More...
 
virtual SpectrumPtr getSpectrumById (int id)=0
 Return a pointer to a spectrum at the given id. More...
 
SpectrumPtr getSpectrumById (int id, double drift_start, double drift_end)
 Return pointer to a spectrum at the given id, the spectrum will be filtered by drift time. More...
 
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. More...
 
virtual size_t getNrSpectra () const =0
 Returns the number of spectra available. More...
 
virtual SpectrumMeta getSpectrumMetaById (int id) const =0
 Returns the meta information for a spectrum. More...
 
virtual ChromatogramPtr getChromatogramById (int id)=0
 Return a pointer to a chromatogram at the given id. More...
 
virtual std::size_t getNrChromatograms () const =0
 Returns the number of chromatograms available. More...
 
virtual std::string getChromatogramNativeID (int id) const =0
 Returns the native id of the chromatogram at the given id. More...
 
SpectrumSequence getMultipleSpectra (double RT, int nr_spectra_to_fetch)
 
SpectrumSequence getMultipleSpectra (double RT, int nr_spectra_to_fetch, double drift_start, double drift_end)
 

Static Public Member Functions

static SpectrumPtr filterByDrift (const SpectrumPtr &input, double drift_start, double drift_end)
 filters a spectrum by drift time, spectrum pointer returned is a copy More...
 

Detailed Description

The interface of a mass spectrometry experiment.

Constructor & Destructor Documentation

◆ ~ISpectrumAccess()

virtual ~ISpectrumAccess ( )
virtual

Destructor.

Member Function Documentation

◆ filterByDrift()

static SpectrumPtr filterByDrift ( const SpectrumPtr input,
double  drift_start,
double  drift_end 
)
inlinestatic

filters a spectrum by drift time, spectrum pointer returned is a copy

◆ getChromatogramById()

virtual ChromatogramPtr getChromatogramById ( int  id)
pure virtual

Return a pointer to a chromatogram at the given id.

Implemented in SpectrumAccessSqMass, SpectrumAccessTransforming, SpectrumAccessOpenMSInMemory, SpectrumAccessOpenMSCached, and SpectrumAccessOpenMS.

◆ getChromatogramNativeID()

virtual std::string getChromatogramNativeID ( int  id) const
pure virtual

Returns the native id of the chromatogram at the given id.

Implemented in SpectrumAccessSqMass, SpectrumAccessTransforming, SpectrumAccessOpenMSInMemory, SpectrumAccessOpenMSCached, and SpectrumAccessOpenMS.

◆ getMultipleSpectra() [1/2]

SpectrumSequence getMultipleSpectra ( double  RT,
int  nr_spectra_to_fetch 
)

◆ getMultipleSpectra() [2/2]

SpectrumSequence getMultipleSpectra ( double  RT,
int  nr_spectra_to_fetch,
double  drift_start,
double  drift_end 
)

◆ getNrChromatograms()

virtual std::size_t getNrChromatograms ( ) const
pure virtual

◆ getNrSpectra()

virtual size_t getNrSpectra ( ) const
pure virtual

◆ getSpectraByRT()

virtual std::vector<std::size_t> getSpectraByRT ( double  RT,
double  deltaRT 
) const
pure virtual

Return a vector of ids of spectra that are within RT +/- deltaRT.

Implemented in SpectrumAccessSqMass, SpectrumAccessTransforming, SpectrumAccessOpenMSInMemory, SpectrumAccessOpenMSCached, and SpectrumAccessOpenMS.

◆ getSpectrumById() [1/2]

virtual SpectrumPtr getSpectrumById ( int  id)
pure virtual

◆ getSpectrumById() [2/2]

SpectrumPtr getSpectrumById ( int  id,
double  drift_start,
double  drift_end 
)

Return pointer to a spectrum at the given id, the spectrum will be filtered by drift time.

◆ getSpectrumMetaById()

virtual SpectrumMeta getSpectrumMetaById ( int  id) const
pure virtual

◆ lightClone()

virtual boost::shared_ptr<ISpectrumAccess> lightClone ( ) const
pure virtual

Light clone operator to produce a copy for concurrent read access.

This function guarantees to produce a copy of the underlying object that provides thread-safe concurrent read access to the underlying data. It should be implemented with minimal copy-overhead to make this operation as fast as possible.

To use this function, each thread should call this function to produce an individual copy on which it can operate.

Implemented in SpectrumAccessTransforming, SpectrumAccessSqMass, SpectrumAccessQuadMZTransforming, SpectrumAccessOpenMSInMemory, SpectrumAccessOpenMSCached, and SpectrumAccessOpenMS.