Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
OnDiscMSExperiment< PeakT, ChromatogramPeakT > Class Template Reference

Representation of a mass spectrometry experiment on disk. More...

#include <OpenMS/KERNEL/OnDiscMSExperiment.h>

Public Member Functions

 OnDiscMSExperiment ()
 
 OnDiscMSExperiment (const String &filename)
 Constructor. More...
 
bool openFile (const String &filename)
 
 OnDiscMSExperiment (const OnDiscMSExperiment &source)
 Copy constructor. More...
 
bool operator== (const OnDiscMSExperiment &rhs) const
 Equality operator. More...
 
bool operator!= (const OnDiscMSExperiment &rhs) const
 Inequality operator. More...
 
bool isSortedByRT () const
 Checks if all spectra are sorted with respect to ascending RT. More...
 
Size size () const
 alias for getNrSpectra More...
 
bool empty () const
 returns whether spectra are empty More...
 
Size getNrSpectra () const
 get the total number of spectra available More...
 
Size getNrChromatograms () const
 get the total number of chromatograms available More...
 
boost::shared_ptr< const ExperimentalSettingsgetExperimentalSettings () const
 returns the meta information of this experiment (const access) More...
 
MSSpectrum< PeakToperator[] (Size n)
 alias for getSpectrum More...
 
MSSpectrum< PeakTgetSpectrum (Size id)
 returns a single spectrum More...
 
OpenMS::Interfaces::SpectrumPtr getSpectrumById (Size id)
 returns a single spectrum More...
 
MSChromatogram< ChromatogramPeakT > getChromatogram (Size id)
 returns a single chromatogram More...
 
OpenMS::Interfaces::ChromatogramPtr getChromatogramById (Size id)
 returns a single chromatogram More...
 

Protected Attributes

String filename_
 The filename of the underlying data file. More...
 
IndexedMzMLFile indexed_mzml_file_
 The index of the underlying data file. More...
 
boost::shared_ptr< MSExperiment<> > meta_ms_experiment_
 The meta-data. More...
 

Private Member Functions

OnDiscMSExperimentoperator= (const OnDiscMSExperiment &)
 Private Assignment operator -> we cannot copy file streams in IndexedMzMLFile. More...
 

Detailed Description

template<typename PeakT = Peak1D, typename ChromatogramPeakT = ChromatogramPeak>
class OpenMS::OnDiscMSExperiment< PeakT, ChromatogramPeakT >

Representation of a mass spectrometry experiment on disk.

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.

Constructor & Destructor Documentation

OnDiscMSExperiment ( )
inline
OnDiscMSExperiment ( const String filename)
inline

Constructor.

This initializes the object and attempts to read the indexed mzML by parsing the index and then reading the meta information into memory.

References OnDiscMSExperiment< PeakT, ChromatogramPeakT >::openFile().

OnDiscMSExperiment ( const OnDiscMSExperiment< PeakT, ChromatogramPeakT > &  source)
inline

Copy constructor.

Member Function Documentation

bool empty ( ) const
inline
MSChromatogram<ChromatogramPeakT> getChromatogram ( Size  id)
inline
OpenMS::Interfaces::ChromatogramPtr getChromatogramById ( Size  id)
inline
boost::shared_ptr<const ExperimentalSettings> getExperimentalSettings ( ) const
inline

returns the meta information of this experiment (const access)

References OnDiscMSExperiment< PeakT, ChromatogramPeakT >::meta_ms_experiment_.

Referenced by PeakPickerHiRes::pickExperiment(), and IndexedMzMLFileLoader::store().

Size getNrChromatograms ( ) const
inline
Size getNrSpectra ( ) const
inline
MSSpectrum<PeakT> getSpectrum ( Size  id)
inline
OpenMS::Interfaces::SpectrumPtr getSpectrumById ( Size  id)
inline
bool isSortedByRT ( ) const
inline

Checks if all spectra are sorted with respect to ascending RT.

Note that we cannot check whether all spectra are sorted (except if we were to load them all and check).

References OnDiscMSExperiment< PeakT, ChromatogramPeakT >::meta_ms_experiment_.

bool openFile ( const String filename)
inline
bool operator!= ( const OnDiscMSExperiment< PeakT, ChromatogramPeakT > &  rhs) const
inline
OnDiscMSExperiment& operator= ( const OnDiscMSExperiment< PeakT, ChromatogramPeakT > &  )
inlineprivate

Private Assignment operator -> we cannot copy file streams in IndexedMzMLFile.

bool operator== ( const OnDiscMSExperiment< PeakT, ChromatogramPeakT > &  rhs) const
inline

Equality operator.

This only checks whether the underlying file is the same and the parsed meta-information is the same. Note that the file reader (e.g. the std::ifstream of the file) might be in a different state.

References OnDiscMSExperiment< PeakT, ChromatogramPeakT >::filename_, and OnDiscMSExperiment< PeakT, ChromatogramPeakT >::meta_ms_experiment_.

Referenced by OnDiscMSExperiment< PeakT, ChromatogramPeakT >::operator!=().

MSSpectrum<PeakT> operator[] ( Size  n)
inline
Size size ( ) const
inline

Member Data Documentation

String filename_
protected
IndexedMzMLFile indexed_mzml_file_
protected
boost::shared_ptr<MSExperiment<> > meta_ms_experiment_
protected

OpenMS / TOPP release 2.0.0 Documentation generated on Fri May 29 2015 17:20:41 using doxygen 1.8.9.1