Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Private Attributes | List of all members
SpectrumAccessOpenMSCached Class Reference

An implementation of the Spectrum Access interface using on-disk caching. More...

#include <OpenMS/ANALYSIS/OPENSWATH/DATAACCESS/SpectrumAccessOpenMSCached.h>

Inheritance diagram for SpectrumAccessOpenMSCached:
ISpectrumAccess

Public Types

typedef OpenMS::MSExperiment
< Peak1D
MSExperimentType
 
typedef OpenMS::MSSpectrum
< Peak1D
MSSpectrumType
 

Public Member Functions

 SpectrumAccessOpenMSCached (String filename)
 Constructor, opens the file stream. More...
 
 ~SpectrumAccessOpenMSCached ()
 Destructor. More...
 
 SpectrumAccessOpenMSCached (const SpectrumAccessOpenMSCached &rhs)
 Copy constructor. More...
 
boost::shared_ptr
< OpenSwath::ISpectrumAccess
lightClone () const
 Light clone operator (actual data will not get copied) More...
 
OpenSwath::SpectrumPtr getSpectrumById (int id)
 Return a pointer to a spectrum at the given id. More...
 
OpenSwath::SpectrumMeta getSpectrumMetaById (int id) const
 Returns the meta information for a spectrum. More...
 
std::vector< std::size_t > getSpectraByRT (double RT, double deltaRT) const
 Return a vector of ids of spectra that are within RT +/- deltaRT. More...
 
size_t getNrSpectra () const
 Returns the number of spectra available. More...
 
SpectrumSettings getSpectraMetaInfo (int id) const
 
OpenSwath::ChromatogramPtr getChromatogramById (int id)
 Return a pointer to a chromatogram at the given id. More...
 
size_t getNrChromatograms () const
 Returns the number of chromatograms available. More...
 
ChromatogramSettings getChromatogramMetaInfo (int id) const
 
std::string getChromatogramNativeID (int id) const
 Returns the native id of the chromatogram at the given id. More...
 
- Public Member Functions inherited from ISpectrumAccess
virtual ~ISpectrumAccess ()
 Destructor. More...
 

Private Attributes

MSExperimentType meta_ms_experiment_
 Meta data. More...
 
std::ifstream ifs_
 Internal filestream. More...
 
String filename_
 Name of the mzML file. More...
 
String filename_cached_
 Name of the cached mzML file. More...
 
std::vector< std::streampos > spectra_index_
 Indices. More...
 
std::vector< std::streampos > chrom_index_
 

Detailed Description

An implementation of the Spectrum Access interface using on-disk caching.

This class implements the OpenSWATH Spectrum Access interface (ISpectrumAccess) using the CachedmzML class which is able to read and write a cached mzML file.

Note
This implementation is not thread-safe since it keeps internally a single file access pointer which it moves when accessing a specific data item. The caller is responsible to ensure that access is performed atomically.

Member Typedef Documentation

Constructor & Destructor Documentation

SpectrumAccessOpenMSCached ( String  filename)
explicit

Constructor, opens the file stream.

Parameters
filenameThe filename of the .mzML file (it is assumed a second file .mzML.cached exists).
Exceptions
Exception::FileNotFoundis thrown if the file is not found
Exception::ParseErroris thrown if the file cannot be parsed

Destructor.

Copy constructor.

Member Function Documentation

OpenSwath::ChromatogramPtr getChromatogramById ( int  id)
virtual

Return a pointer to a chromatogram at the given id.

Implements ISpectrumAccess.

ChromatogramSettings getChromatogramMetaInfo ( int  id) const
std::string getChromatogramNativeID ( int  id) const
virtual

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

Implements ISpectrumAccess.

size_t getNrChromatograms ( ) const
virtual

Returns the number of chromatograms available.

Implements ISpectrumAccess.

size_t getNrSpectra ( ) const
virtual

Returns the number of spectra available.

Implements ISpectrumAccess.

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

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

Implements ISpectrumAccess.

SpectrumSettings getSpectraMetaInfo ( int  id) const
OpenSwath::SpectrumPtr getSpectrumById ( int  id)
virtual

Return a pointer to a spectrum at the given id.

Implements ISpectrumAccess.

OpenSwath::SpectrumMeta getSpectrumMetaById ( int  id) const
virtual

Returns the meta information for a spectrum.

Implements ISpectrumAccess.

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

Light clone operator (actual data will not get copied)

Implements ISpectrumAccess.

Member Data Documentation

std::vector<std::streampos> chrom_index_
private
String filename_
private

Name of the mzML file.

String filename_cached_
private

Name of the cached mzML file.

std::ifstream ifs_
private

Internal filestream.

MSExperimentType meta_ms_experiment_
private

Meta data.

std::vector<std::streampos> spectra_index_
private

Indices.


OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:44 using doxygen 1.8.5