Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
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

Public Types

typedef MSExperiment< Peak1DMapType
 
typedef MSSpectrum< Peak1DSpectrumType
 
typedef MSChromatogram
< ChromatogramPeak
ChromatogramType
 
typedef double DatumSingleton
 
typedef std::vector
< DatumSingleton
Datavector
 
- Public Types inherited from ProgressLogger
enum  LogType { CMD, GUI, NONE }
 Possible log types. More...
 

Public Member Functions

void createMemdumpIndex (String filename)
 Create an index on the location of all the spectra and chromatograms. More...
 
void writeMetadata (MapType exp, String out_meta)
 Write only the meta data of an MSExperiment. More...
 
Constructors and Destructor
 CachedmzML ()
 Default constructor. More...
 
 ~CachedmzML ()
 Default destructor. More...
 
CachedmzMLoperator= (const CachedmzML &rhs)
 Assignment operator. More...
 
Read / Write an MSExperiment
void writeMemdump (MapType &exp, String out)
 Write complete spectra as a dump to the disk. More...
 
void readMemdump (MapType &exp_reading, String filename) const
 Read all spectra from a dump from the disk. More...
 
Read a single MSSpectrum
void readSingleSpectrum (MSSpectrum< Peak1D > &spectrum, const String &filename, const Size &idx) const
 Read a single spectrum from the given filename. More...
 
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
 
- Public Member Functions inherited from ProgressLogger
 ProgressLogger ()
 Constructor. More...
 
 ~ProgressLogger ()
 Destructor. More...
 
void setLogType (LogType type) const
 Sets the progress log that should be used. The default type is NONE! More...
 
LogType getLogType () const
 Returns the type of progress log being used. More...
 
void startProgress (SignedSize begin, SignedSize end, const String &label) const
 Initializes the progress display. More...
 
void setProgress (SignedSize value) const
 Sets the current progress. More...
 
void endProgress () const
 Ends the progress display. More...
 

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 More...
 
static void readChromatogramFast (OpenSwath::BinaryDataArrayPtr data1, OpenSwath::BinaryDataArrayPtr data2, std::ifstream &ifs)
 fast access without copying More...
 

Protected 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_ (const SpectrumType &spectrum, std::ofstream &ofs)
 
void writeChromatogram_ (const ChromatogramType &chromatogram, std::ofstream &ofs)
 

Protected Attributes

std::vector< Sizespectra_index_
 
std::vector< Sizechrom_index_
 
- Protected Attributes inherited from ProgressLogger
LogType type_
 
SignedSize begin_
 
SignedSize end_
 
SignedSize value_
 
QProgressDialog * dlg_
 
StopWatch stop_watch_
 
time_t last_invoke_
 

Private Attributes

int int_field_
 
double dbl_field_
 

Additional Inherited Members

- Static Protected Attributes inherited from ProgressLogger
static int recursion_depth_
 

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
inlineprotected
void readChromatogram_ ( ChromatogramType chromatogram,
std::ifstream &  ifs 
) const
inlineprotected
static void readChromatogramFast ( OpenSwath::BinaryDataArrayPtr  data1,
OpenSwath::BinaryDataArrayPtr  data2,
std::ifstream &  ifs 
)
inlinestatic

fast access without copying

void readMemdump ( MapType exp_reading,
String  filename 
) const
inline
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
inlineprotected
void readSpectrum_ ( SpectrumType spectrum,
std::ifstream &  ifs 
) const
inlineprotected
static void readSpectrumFast ( OpenSwath::BinaryDataArrayPtr  data1,
OpenSwath::BinaryDataArrayPtr  data2,
std::ifstream &  ifs,
int  ms_level,
double  rt 
)
inlinestatic

fast access without copying

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

Write complete spectra as a dump to the disk.

void writeMetadata ( MapType  exp,
String  out_meta 
)
inline
void writeSpectrum_ ( const SpectrumType spectrum,
std::ofstream &  ofs 
)
inlineprotected

Member Data Documentation

std::vector<Size> chrom_index_
protected

Referenced by CachedmzML::operator=().

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

Referenced by CachedmzML::operator=().


OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:26 using doxygen 1.8.5