Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

CachedmzML Class Reference

An class that uses on-disk caching to read and write spectra and chromatograms. More...

#include <OpenMS/ANALYSIS/OPENSWATH/CachedmzML.h>

Inheritance diagram for CachedmzML:
ProgressLogger

List of all members.

Public Types

typedef MSExperiment< Peak1DMapType
typedef MSSpectrum< Peak1DSpectrumType
typedef MSChromatogram
< ChromatogramPeak
ChromatogramType
typedef double DatumSingleton
typedef std::vector
< DatumSingleton
Datavector

Public Member Functions

void createMemdumpIndex (String filename)
 Create an index on the location of all the spectra and chromatograms.
void writeMetadata (MapType exp, String out_meta)
 Write only the meta data of an MSExperiment.
Constructors and Destructor

 CachedmzML ()
 Default constructor.
 ~CachedmzML ()
 Default destructor.
CachedmzMLoperator= (const CachedmzML &rhs)
 Assignment operator.
Read / Write an MSExperiment

void writeMemdump (MapType &exp, String out)
 Write complete spectra as a dump to the disk.
void readMemdump (MapType &exp_reading, String filename) const
 Read all spectra from a dump from the disk.
Read a single MSSpectrum

void readSingleSpectrum (MSSpectrum< Peak1D > &spectrum, const String &filename, const Size &idx) const
 Read a single spectrum from the given filename.
void readSingleSpectrum (MSSpectrum< Peak1D > &spectrum, std::ifstream &ifs, const Size &idx) const
Access to the binary indices

const std::vector< Size > & getSpectraIndex () const
const std::vector< Size > & getChromatogramIndex () const

Static Public Member Functions

static void readSpectrumFast (OpenSwath::BinaryDataArrayPtr data1, OpenSwath::BinaryDataArrayPtr data2, std::ifstream &ifs, int ms_level, double rt)
 fast access without copying
static void readChromatogramFast (OpenSwath::BinaryDataArrayPtr data1, OpenSwath::BinaryDataArrayPtr data2, std::ifstream &ifs)
 fast access without copying

Private Member Functions

void readSpectrum_ (Datavector &data1, Datavector &data2, std::ifstream &ifs, int &ms_level, double &rt) const
void readChromatogram_ (Datavector &data1, Datavector &data2, std::ifstream &ifs) const
void readSpectrum_ (SpectrumType &spectrum, std::ifstream &ifs) const
void readChromatogram_ (ChromatogramType &chromatogram, std::ifstream &ifs) const
void writeSpectrum_ (SpectrumType &spectrum, std::ofstream &ofs)
void writeChromatogram_ (const ChromatogramType &chromatogram, std::ofstream &ofs)

Private Attributes

int int_field_
double dbl_field_
std::vector< Sizespectra_index_
std::vector< Sizechrom_index_

Detailed Description

An class that uses on-disk caching to read and write spectra and chromatograms.

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


Member Typedef Documentation

typedef std::vector<DatumSingleton> Datavector

Constructor & Destructor Documentation

CachedmzML (  )  [inline]

Default constructor.

~CachedmzML (  )  [inline]

Default destructor.


Member Function Documentation

void createMemdumpIndex ( String  filename  )  [inline]

Create an index on the location of all the spectra and chromatograms.

References MAGIC_NUMBER.

const std::vector<Size>& getChromatogramIndex (  )  const [inline]
const std::vector<Size>& getSpectraIndex (  )  const [inline]
CachedmzML& operator= ( const CachedmzML rhs  )  [inline]

Assignment operator.

References CachedmzML::chrom_index_, and CachedmzML::spectra_index_.

void readChromatogram_ ( Datavector data1,
Datavector data2,
std::ifstream &  ifs 
) const [inline, private]
void readChromatogram_ ( ChromatogramType chromatogram,
std::ifstream &  ifs 
) const [inline, private]
static void readChromatogramFast ( OpenSwath::BinaryDataArrayPtr  data1,
OpenSwath::BinaryDataArrayPtr  data2,
std::ifstream &  ifs 
) [inline, static]

fast access without copying

void readMemdump ( MapType exp_reading,
String  filename 
) const [inline]

Read all spectra from a dump from the disk.

References MAGIC_NUMBER, and MSExperiment< PeakT, ChromatogramPeakT >::setChromatograms().

void readSingleSpectrum ( MSSpectrum< Peak1D > &  spectrum,
const String filename,
const Size idx 
) const [inline]

Read a single spectrum from the given filename.

void readSingleSpectrum ( MSSpectrum< Peak1D > &  spectrum,
std::ifstream &  ifs,
const Size idx 
) const [inline]
void readSpectrum_ ( Datavector data1,
Datavector data2,
std::ifstream &  ifs,
int &  ms_level,
double rt 
) const [inline, private]
void readSpectrum_ ( SpectrumType spectrum,
std::ifstream &  ifs 
) const [inline, private]
static void readSpectrumFast ( OpenSwath::BinaryDataArrayPtr  data1,
OpenSwath::BinaryDataArrayPtr  data2,
std::ifstream &  ifs,
int  ms_level,
double  rt 
) [inline, static]

fast access without copying

void writeChromatogram_ ( const ChromatogramType chromatogram,
std::ofstream &  ofs 
) [inline, private]
void writeMemdump ( MapType exp,
String  out 
) [inline]

Write complete spectra as a dump to the disk.

References MSExperiment< PeakT, ChromatogramPeakT >::getChromatograms().

void writeSpectrum_ ( SpectrumType spectrum,
std::ofstream &  ofs 
) [inline, private]

Member Data Documentation

std::vector<Size> chrom_index_ [private]

Referenced by CachedmzML::operator=().

double dbl_field_ [private]
int int_field_ [private]
std::vector<Size> spectra_index_ [private]

Referenced by CachedmzML::operator=().


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:50 using doxygen 1.7.1