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

Representation of 1D spectrum settings. More...

#include <OpenMS/METADATA/SpectrumSettings.h>

Inheritance diagram for SpectrumSettings:
MetaInfoInterface MSSpectrum< OpenMS::Peak2D > MSSpectrum< Peak1D > MSSpectrum< PeakType > MSSpectrum< RichPeak1D > MSSpectrum< PeakT >

Public Types

enum  SpectrumType { UNKNOWN, PEAKS, RAWDATA, SIZE_OF_SPECTRUMTYPE }
 Spectrum peak type. More...
 

Public Member Functions

 SpectrumSettings ()
 Constructor. More...
 
 SpectrumSettings (const SpectrumSettings &source)
 Copy constructor. More...
 
 ~SpectrumSettings ()
 Destructor. More...
 
SpectrumSettingsoperator= (const SpectrumSettings &source)
 
bool operator== (const SpectrumSettings &rhs) const
 Equality operator. More...
 
bool operator!= (const SpectrumSettings &rhs) const
 Equality operator. More...
 
void unify (const SpectrumSettings &rhs)
 merge another spectrum setting into this one (data is usually appended, except for spectrum type which needs to be unambiguous to be kept) More...
 
SpectrumType getType () const
 returns the spectrum type More...
 
void setType (SpectrumType type)
 sets the spectrum type More...
 
const StringgetNativeID () const
 returns the native identifier for the spectrum, used by the acquisition software. More...
 
void setNativeID (const String &native_id)
 sets the native identifier for the spectrum, used by the acquisition software. More...
 
const StringgetComment () const
 returns the free-text comment More...
 
void setComment (const String &comment)
 sets the free-text comment More...
 
const InstrumentSettingsgetInstrumentSettings () const
 returns a const reference to the instrument settings of the current spectrum More...
 
InstrumentSettingsgetInstrumentSettings ()
 returns a mutable reference to the instrument settings of the current spectrum More...
 
void setInstrumentSettings (const InstrumentSettings &instrument_settings)
 sets the instrument settings of the current spectrum More...
 
const AcquisitionInfogetAcquisitionInfo () const
 returns a const reference to the acquisition info More...
 
AcquisitionInfogetAcquisitionInfo ()
 returns a mutable reference to the acquisition info More...
 
void setAcquisitionInfo (const AcquisitionInfo &acquisition_info)
 sets the acquisition info More...
 
const SourceFilegetSourceFile () const
 returns a const reference to the source file More...
 
SourceFilegetSourceFile ()
 returns a mutable reference to the source file More...
 
void setSourceFile (const SourceFile &source_file)
 sets the source file More...
 
const std::vector< Precursor > & getPrecursors () const
 returns a const reference to the precursors More...
 
std::vector< Precursor > & getPrecursors ()
 returns a mutable reference to the precursors More...
 
void setPrecursors (const std::vector< Precursor > &precursors)
 sets the precursors More...
 
const std::vector< Product > & getProducts () const
 returns a const reference to the products More...
 
std::vector< Product > & getProducts ()
 returns a mutable reference to the products More...
 
void setProducts (const std::vector< Product > &products)
 sets the products More...
 
const std::vector
< PeptideIdentification > & 
getPeptideIdentifications () const
 returns a const reference to the PeptideIdentification vector More...
 
std::vector
< PeptideIdentification > & 
getPeptideIdentifications ()
 returns a mutable reference to the PeptideIdentification vector More...
 
void setPeptideIdentifications (const std::vector< PeptideIdentification > &identifications)
 sets the PeptideIdentification vector More...
 
const std::vector
< DataProcessing > & 
getDataProcessing () const
 returns a const reference to the description of the applied processing More...
 
std::vector< DataProcessing > & getDataProcessing ()
 returns a mutable reference to the description of the applied processing More...
 
void setDataProcessing (const std::vector< DataProcessing > &data_processing)
 sets the description of the applied processing More...
 
- Public Member Functions inherited from MetaInfoInterface
 MetaInfoInterface ()
 constructor More...
 
 MetaInfoInterface (const MetaInfoInterface &rhs)
 copy constructor More...
 
 ~MetaInfoInterface ()
 destructor More...
 
MetaInfoInterfaceoperator= (const MetaInfoInterface &rhs)
 assignment operator More...
 
bool operator== (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
bool operator!= (const MetaInfoInterface &rhs) const
 Equality operator. More...
 
const DataValuegetMetaValue (const String &name) const
 returns the value corresponding to a string More...
 
const DataValuegetMetaValue (UInt index) const
 returns the value corresponding to an index More...
 
bool metaValueExists (const String &name) const
 returns if this MetaInfo is set More...
 
bool metaValueExists (UInt index) const
 returns if this MetaInfo is set More...
 
void setMetaValue (const String &name, const DataValue &value)
 sets the DataValue corresponding to a name More...
 
void setMetaValue (UInt index, const DataValue &value)
 sets the DataValue corresponding to an index More...
 
void removeMetaValue (const String &name)
 Removes the DataValue corresponding to name if it exists. More...
 
void removeMetaValue (UInt index)
 Removes the DataValue corresponding to index if it exists. More...
 
void getKeys (std::vector< String > &keys) const
 fills the given vector with a list of all keys for which a value is set More...
 
void getKeys (std::vector< UInt > &keys) const
 fills the given vector with a list of all keys for which a value is set More...
 
bool isMetaEmpty () const
 returns if the MetaInfo is empty More...
 
void clearMetaInfo ()
 removes all meta values More...
 

Static Public Attributes

static const std::string NamesOfSpectrumType [SIZE_OF_SPECTRUMTYPE]
 Names of spectrum types. More...
 

Protected Attributes

SpectrumType type_
 
String native_id_
 
String comment_
 
InstrumentSettings instrument_settings_
 
SourceFile source_file_
 
AcquisitionInfo acquisition_info_
 
std::vector< Precursorprecursors_
 
std::vector< Productproducts_
 
std::vector
< PeptideIdentification
identification_
 
std::vector< DataProcessingdata_processing_
 
- Protected Attributes inherited from MetaInfoInterface
MetaInfometa_
 pointer to the MetaInfo object. 0 by default More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MetaInfoInterface
static MetaInfoRegistrymetaRegistry ()
 returns a reference to the MetaInfoRegistry More...
 
- Protected Member Functions inherited from MetaInfoInterface
void createIfNotExists_ ()
 creates the MetaInfo object if it does not exist More...
 

Detailed Description

Representation of 1D spectrum settings.

It contains the metadata about spectrum specific instrument settings, acquisition settings, description of the meta values used in the peaks and precursor info.

Precursor info should only be used if this spectrum is a tandem-MS spectrum. The precursor spectrum is the first spectrum before this spectrum, that has a lower MS-level than the current spectrum.

Member Enumeration Documentation

Spectrum peak type.

Enumerator
UNKNOWN 

Unknown spectrum type.

PEAKS 

Peak data (also called centroided data or stick data)

RAWDATA 

Raw data (also called profile data)

SIZE_OF_SPECTRUMTYPE 

Constructor & Destructor Documentation

Constructor.

Referenced by MSSpectrum< RichPeak1D >::clear().

SpectrumSettings ( const SpectrumSettings source)

Copy constructor.

Destructor.

Member Function Documentation

const AcquisitionInfo& getAcquisitionInfo ( ) const
AcquisitionInfo& getAcquisitionInfo ( )

returns a mutable reference to the acquisition info

const String& getComment ( ) const

returns the free-text comment

Referenced by MzXMLHandler< MapType >::writeTo().

const std::vector<DataProcessing>& getDataProcessing ( ) const

returns a const reference to the description of the applied processing

Referenced by MSDataWritingConsumer::consumeSpectrum(), ChromatogramExtractor::return_chromatogram(), and MzMLHandler< MapType >::writeSpectrum_().

std::vector<DataProcessing>& getDataProcessing ( )

returns a mutable reference to the description of the applied processing

const InstrumentSettings& getInstrumentSettings ( ) const

returns a const reference to the instrument settings of the current spectrum

Referenced by ChromatogramExtractor::return_chromatogram(), MzMLHandler< MapType >::writeSpectrum_(), MzDataHandler< MapType >::writeTo(), and MzXMLHandler< MapType >::writeTo().

InstrumentSettings& getInstrumentSettings ( )

returns a mutable reference to the instrument settings of the current spectrum

const String& getNativeID ( ) const
const std::vector<PeptideIdentification>& getPeptideIdentifications ( ) const

returns a const reference to the PeptideIdentification vector

std::vector<PeptideIdentification>& getPeptideIdentifications ( )

returns a mutable reference to the PeptideIdentification vector

const std::vector<Precursor>& getPrecursors ( ) const
std::vector<Precursor>& getPrecursors ( )

returns a mutable reference to the precursors

const std::vector<Product>& getProducts ( ) const

returns a const reference to the products

Referenced by MzMLHandler< MapType >::writeSpectrum_().

std::vector<Product>& getProducts ( )

returns a mutable reference to the products

const SourceFile& getSourceFile ( ) const

returns a const reference to the source file

Referenced by ChromatogramExtractor::return_chromatogram(), and MzMLHandler< MapType >::writeSpectrum_().

SourceFile& getSourceFile ( )

returns a mutable reference to the source file

SpectrumType getType ( ) const
bool operator!= ( const SpectrumSettings rhs) const

Equality operator.

SpectrumSettings& operator= ( const SpectrumSettings source)
bool operator== ( const SpectrumSettings rhs) const

Equality operator.

Referenced by MSSpectrum< RichPeak1D >::operator==().

void setAcquisitionInfo ( const AcquisitionInfo acquisition_info)

sets the acquisition info

Referenced by XMassFile::load().

void setComment ( const String comment)

sets the free-text comment

Referenced by XMassFile::load(), and TOPPRNPxl::main_().

void setDataProcessing ( const std::vector< DataProcessing > &  data_processing)

sets the description of the applied processing

Referenced by XMassFile::load().

void setInstrumentSettings ( const InstrumentSettings instrument_settings)

sets the instrument settings of the current spectrum

Referenced by XMassFile::load().

void setNativeID ( const String native_id)

sets the native identifier for the spectrum, used by the acquisition software.

Referenced by MS2File::load(), and XMassFile::load().

void setPeptideIdentifications ( const std::vector< PeptideIdentification > &  identifications)

sets the PeptideIdentification vector

void setPrecursors ( const std::vector< Precursor > &  precursors)
void setProducts ( const std::vector< Product > &  products)

sets the products

void setSourceFile ( const SourceFile source_file)

sets the source file

Referenced by XMassFile::load().

void setType ( SpectrumType  type)
void unify ( const SpectrumSettings rhs)

merge another spectrum setting into this one (data is usually appended, except for spectrum type which needs to be unambiguous to be kept)

Referenced by SpectraMerger::mergeSpectra_().

Member Data Documentation

AcquisitionInfo acquisition_info_
protected
String comment_
protected
std::vector<DataProcessing> data_processing_
protected
std::vector<PeptideIdentification> identification_
protected
InstrumentSettings instrument_settings_
protected
const std::string NamesOfSpectrumType[SIZE_OF_SPECTRUMTYPE]
static

Names of spectrum types.

String native_id_
protected
std::vector<Precursor> precursors_
protected
std::vector<Product> products_
protected
SourceFile source_file_
protected
SpectrumType type_
protected

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