OpenMS
Loading...
Searching...
No Matches
InstrumentSettings Class Reference

Description of the settings a MS Instrument was run with. More...

#include <OpenMS/METADATA/InstrumentSettings.h>

Inheritance diagram for InstrumentSettings:
[legend]
Collaboration diagram for InstrumentSettings:
[legend]

Public Types

enum  ScanMode {
  UNKNOWN , MASSSPECTRUM , MS1SPECTRUM , MSNSPECTRUM ,
  SIM , SRM , CRM , CNG ,
  CNL , PRECURSOR , EMC , TDF ,
  EMR , EMISSION , ABSORPTION , SIZE_OF_SCANMODE
}
 scan mode More...
 

Public Member Functions

 InstrumentSettings ()
 Constructor.
 
 InstrumentSettings (const InstrumentSettings &)=default
 Copy constructor.
 
 InstrumentSettings (InstrumentSettings &&)=default
 Move constructor.
 
 ~InstrumentSettings ()
 Destructor.
 
InstrumentSettingsoperator= (const InstrumentSettings &)=default
 Assignment operator.
 
InstrumentSettingsoperator= (InstrumentSettings &&) &=default
 Move assignment operator.
 
bool operator== (const InstrumentSettings &rhs) const
 Equality operator.
 
bool operator!= (const InstrumentSettings &rhs) const
 Equality operator.
 
ScanMode getScanMode () const
 returns the scan mode
 
void setScanMode (ScanMode scan_mode)
 sets the scan mode
 
bool getZoomScan () const
 return if this scan is a zoom (enhanced resolution) scan
 
void setZoomScan (bool zoom_scan)
 sets if this scan is a zoom (enhanced resolution) scan
 
IonSource::Polarity getPolarity () const
 returns the polarity
 
void setPolarity (IonSource::Polarity polarity)
 sets the polarity
 
const std::vector< ScanWindow > & getScanWindows () const
 returns a const reference to the m/z scan windows
 
std::vector< ScanWindow > & getScanWindows ()
 returns a mutable reference to the m/z scan windows
 
void setScanWindows (std::vector< ScanWindow > scan_windows)
 sets the m/z scan windows
 
- Public Member Functions inherited from MetaInfoInterface
 MetaInfoInterface ()=default
 Constructor.
 
 MetaInfoInterface (const MetaInfoInterface &rhs)
 Copy constructor.
 
 MetaInfoInterface (MetaInfoInterface &&) noexcept
 Move constructor.
 
 ~MetaInfoInterface ()
 Destructor.
 
MetaInfoInterfaceoperator= (const MetaInfoInterface &rhs)
 Assignment operator.
 
MetaInfoInterfaceoperator= (MetaInfoInterface &&) noexcept
 Move assignment operator.
 
void swap (MetaInfoInterface &rhs)
 Swap contents.
 
bool operator== (const MetaInfoInterface &rhs) const
 Equality operator.
 
bool operator!= (const MetaInfoInterface &rhs) const
 Equality operator.
 
const DataValuegetMetaValue (const String &name) const
 Returns the value corresponding to a string, or DataValue::EMPTY if not found.
 
DataValue getMetaValue (const String &name, const DataValue &default_value) const
 Returns the value corresponding to a string, or a default value (e.g.: DataValue::EMPTY) if not found

 
const DataValuegetMetaValue (UInt index) const
 Returns the value corresponding to the index, or DataValue::EMPTY if not found.
 
DataValue getMetaValue (UInt index, const DataValue &default_value) const
 Returns the value corresponding to the index, or a default value (e.g.: DataValue::EMPTY) if not found

 
bool metaValueExists (const String &name) const
 Returns whether an entry with the given name exists.
 
bool metaValueExists (UInt index) const
 Returns whether an entry with the given index exists.
 
void setMetaValue (const String &name, const DataValue &value)
 Sets the DataValue corresponding to a name.
 
void setMetaValue (UInt index, const DataValue &value)
 Sets the DataValue corresponding to an index.
 
void removeMetaValue (const String &name)
 Removes the DataValue corresponding to name if it exists.
 
void removeMetaValue (UInt index)
 Removes the DataValue corresponding to index if it exists.
 
void addMetaValues (const MetaInfoInterface &from)
 
void getKeys (std::vector< String > &keys) const
 Fills the given vector with a list of all keys for which a value is set.
 
void getKeys (std::vector< UInt > &keys) const
 Fills the given vector with a list of all keys for which a value is set.
 
bool isMetaEmpty () const
 Returns if the MetaInfo is empty.
 
void clearMetaInfo ()
 Removes all meta values.
 

Static Public Member Functions

static StringList getAllNamesOfScanMode ()
 Returns all scan mode names known to OpenMS.
 
static const std::string & scanModeToString (ScanMode mode)
 Convert a ScanMode enum to its string representation.
 
static ScanMode toScanMode (const std::string &name)
 Convert a string to a ScanMode enum.
 
- Static Public Member Functions inherited from MetaInfoInterface
static MetaInfoRegistrymetaRegistry ()
 Returns a reference to the MetaInfoRegistry.
 

Static Public Attributes

static const std::string NamesOfScanMode [SIZE_OF_SCANMODE]
 Names of scan modes.
 

Protected Attributes

ScanMode scan_mode_
 
bool zoom_scan_
 
IonSource::Polarity polarity_
 
std::vector< ScanWindowscan_windows_
 
- Protected Attributes inherited from MetaInfoInterface
MetaInfometa_ = nullptr
 Pointer to the MetaInfo object.
 

Additional Inherited Members

- Protected Member Functions inherited from MetaInfoInterface
void createIfNotExists_ ()
 Creates the MetaInfo object if it does not exist.
 

Detailed Description

Description of the settings a MS Instrument was run with.

Member Enumeration Documentation

◆ ScanMode

enum ScanMode

scan mode

Enumerator
UNKNOWN 

Unknown scan method.

MASSSPECTRUM 

general spectrum type

MS1SPECTRUM 

full scan mass spectrum, is a "mass spectrum"
Synonyms: 'full spectrum', 'Q1 spectrum', 'Q3 spectrum', 'Single-Stage Mass Spectrometry'

MSNSPECTRUM 

MS2+ mass spectrum, is a "mass spectrum".

SIM 

Selected ion monitoring scan
Synonyms: 'Multiple ion monitoring scan', 'SIM scan', 'MIM scan'.

SRM 

Selected reaction monitoring scan
Synonyms: 'Multiple reaction monitoring scan', 'SRM scan', 'MRM scan'.

CRM 

Consecutive reaction monitoring scan
Synonyms: 'CRM scan'.

CNG 

Constant neutral gain scan
Synonyms: 'CNG scan'.

CNL 

Constant neutral loss scan
Synonyms: 'CNG scan'.

PRECURSOR 

Precursor ion scan.

EMC 

Enhanced multiply charged scan.

TDF 

Time-delayed fragmentation scan.

EMR 

Electromagnetic radiation scan
Synonyms: 'EMR spectrum'.

EMISSION 

Emission scan.

ABSORPTION 

Absorption scan.

SIZE_OF_SCANMODE 

Constructor & Destructor Documentation

◆ InstrumentSettings() [1/3]

Constructor.

◆ InstrumentSettings() [2/3]

InstrumentSettings ( const InstrumentSettings )
default

Copy constructor.

◆ InstrumentSettings() [3/3]

Move constructor.

◆ ~InstrumentSettings()

Destructor.

Member Function Documentation

◆ getAllNamesOfScanMode()

static StringList getAllNamesOfScanMode ( )
static

Returns all scan mode names known to OpenMS.

Returns
List of all scan mode names

◆ getPolarity()

IonSource::Polarity getPolarity ( ) const

returns the polarity

Referenced by HasScanPolarity< SpectrumType >::operator()().

◆ getScanMode()

ScanMode getScanMode ( ) const

returns the scan mode

Referenced by HasScanMode< SpectrumType >::operator()().

◆ getScanWindows() [1/2]

std::vector< ScanWindow > & getScanWindows ( )

returns a mutable reference to the m/z scan windows

◆ getScanWindows() [2/2]

const std::vector< ScanWindow > & getScanWindows ( ) const

returns a const reference to the m/z scan windows

◆ getZoomScan()

bool getZoomScan ( ) const

return if this scan is a zoom (enhanced resolution) scan

Referenced by IsZoomSpectrum< SpectrumType >::operator()().

◆ operator!=()

bool operator!= ( const InstrumentSettings rhs) const

Equality operator.

◆ operator=() [1/2]

InstrumentSettings & operator= ( const InstrumentSettings )
default

Assignment operator.

◆ operator=() [2/2]

InstrumentSettings & operator= ( InstrumentSettings &&  ) &
default

Move assignment operator.

◆ operator==()

bool operator== ( const InstrumentSettings rhs) const

Equality operator.

◆ scanModeToString()

static const std::string & scanModeToString ( ScanMode  mode)
static

Convert a ScanMode enum to its string representation.

Parameters
modeThe scan mode enum value to convert
Returns
Reference to the string representation
Exceptions
Exception::InvalidValueif mode is SIZE_OF_SCANMODE

◆ setPolarity()

void setPolarity ( IonSource::Polarity  polarity)

sets the polarity

Referenced by XMassFile::load().

◆ setScanMode()

void setScanMode ( ScanMode  scan_mode)

sets the scan mode

Referenced by XMassFile::load().

◆ setScanWindows()

void setScanWindows ( std::vector< ScanWindow scan_windows)

sets the m/z scan windows

◆ setZoomScan()

void setZoomScan ( bool  zoom_scan)

sets if this scan is a zoom (enhanced resolution) scan

Referenced by XMassFile::load().

◆ toScanMode()

static ScanMode toScanMode ( const std::string &  name)
static

Convert a string to a ScanMode enum.

Parameters
nameThe string name to convert
Returns
The corresponding ScanMode enum value
Exceptions
Exception::InvalidValueif name is not found in NamesOfScanMode[]

Member Data Documentation

◆ NamesOfScanMode

const std::string NamesOfScanMode[SIZE_OF_SCANMODE]
static

Names of scan modes.

◆ polarity_

IonSource::Polarity polarity_
protected

◆ scan_mode_

ScanMode scan_mode_
protected

◆ scan_windows_

std::vector<ScanWindow> scan_windows_
protected

◆ zoom_scan_

bool zoom_scan_
protected