OpenMS
Instrument.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2023.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
43 
44 #include <vector>
45 
46 namespace OpenMS
47 {
63  class OPENMS_DLLAPI Instrument :
64  public MetaInfoInterface
65  {
66 
67 public:
68 
71  {
84  SIZE_OF_IONOPTICSTYPE
85  };
86 
88  static const std::string NamesOfIonOpticsType[SIZE_OF_IONOPTICSTYPE];
89 
93  Instrument(const Instrument &) = default;
95  Instrument(Instrument&&) = default;
98 
100  Instrument & operator=(const Instrument &) = default;
102  Instrument& operator=(Instrument&&) & = default;
103 
105  bool operator==(const Instrument & rhs) const;
107  bool operator!=(const Instrument & rhs) const;
108 
110  const String & getName() const;
112  void setName(const String & name);
113 
115  const String & getVendor() const;
117  void setVendor(const String & vendor);
118 
120  const String & getModel() const;
122  void setModel(const String & model);
123 
125  const String & getCustomizations() const;
127  void setCustomizations(const String & customizations);
128 
130  const std::vector<IonSource> & getIonSources() const;
132  std::vector<IonSource> & getIonSources();
134  void setIonSources(const std::vector<IonSource> & ion_sources);
135 
137  const std::vector<MassAnalyzer> & getMassAnalyzers() const;
139  std::vector<MassAnalyzer> & getMassAnalyzers();
141  void setMassAnalyzers(const std::vector<MassAnalyzer> & mass_analyzers);
142 
144  const std::vector<IonDetector> & getIonDetectors() const;
146  std::vector<IonDetector> & getIonDetectors();
148  void setIonDetectors(const std::vector<IonDetector> & ion_detectors);
149 
151  const Software & getSoftware() const;
155  void setSoftware(const Software & software);
156 
160  void setIonOptics(IonOpticsType ion_optics);
161 
162 protected:
163 
168  std::vector<IonSource> ion_sources_;
169  std::vector<MassAnalyzer> mass_analyzers_;
170  std::vector<IonDetector> ion_detectors_;
173  };
174 } // namespace OpenMS
175 
Description of a MS instrument.
Definition: Instrument.h:65
String model_
Definition: Instrument.h:166
std::vector< IonDetector > & getIonDetectors()
returns a mutable reference to the ion detector list
~Instrument()
Destructor.
Software software_
Definition: Instrument.h:171
const String & getCustomizations() const
returns a description of customizations
bool operator==(const Instrument &rhs) const
Equality operator.
String name_
Definition: Instrument.h:164
const Software & getSoftware() const
returns a const reference to the instrument software
void setIonSources(const std::vector< IonSource > &ion_sources)
sets the ion source list
std::vector< MassAnalyzer > mass_analyzers_
Definition: Instrument.h:169
Instrument & operator=(Instrument &&) &=default
Move assignment operator.
void setMassAnalyzers(const std::vector< MassAnalyzer > &mass_analyzers)
sets the mass analyzer list
const std::vector< MassAnalyzer > & getMassAnalyzers() const
returns a const reference to the mass analyzer list
String vendor_
Definition: Instrument.h:165
void setName(const String &name)
sets the name of the instrument
void setIonOptics(IonOpticsType ion_optics)
sets the ion optics type
void setCustomizations(const String &customizations)
sets a description of customizations
std::vector< IonSource > ion_sources_
Definition: Instrument.h:168
void setSoftware(const Software &software)
sets the instrument software
IonOpticsType ion_optics_
Definition: Instrument.h:172
bool operator!=(const Instrument &rhs) const
Equality operator.
void setModel(const String &model)
sets the instrument model
const String & getName() const
returns the name of the instrument
void setIonDetectors(const std::vector< IonDetector > &ion_detectors)
sets the ion detector list
Instrument(const Instrument &)=default
Copy constructor.
IonOpticsType
ion optics type
Definition: Instrument.h:71
@ REFLECTRON
reflectron
Definition: Instrument.h:78
@ FIRST_STABILITY_REGION
first stability region
Definition: Instrument.h:80
@ STATIC_FIELD
static field
Definition: Instrument.h:83
@ KINETIC_ENERGY_ANALYZER
kinetic energy analyzer
Definition: Instrument.h:82
@ TIME_LAG_FOCUSING
time lag focusing
Definition: Instrument.h:77
@ COLLISION_QUADRUPOLE
collision quadrupole
Definition: Instrument.h:75
@ UNKNOWN
unknown
Definition: Instrument.h:72
@ MAGNETIC_DEFLECTION
magnetic deflection
Definition: Instrument.h:73
@ FRINGING_FIELD
fringing field
Definition: Instrument.h:81
@ DELAYED_EXTRACTION
delayed extraction
Definition: Instrument.h:74
@ SELECTED_ION_FLOW_TUBE
selected ion flow tube
Definition: Instrument.h:76
@ EINZEL_LENS
einzel lens
Definition: Instrument.h:79
void setVendor(const String &vendor)
sets the instrument vendor
std::vector< IonSource > & getIonSources()
returns a mutable reference to the ion source list
const String & getVendor() const
returns the instrument vendor
IonOpticsType getIonOptics() const
returns the ion optics type
Instrument(Instrument &&)=default
Move constructor.
std::vector< MassAnalyzer > & getMassAnalyzers()
returns a mutable reference to the mass analyzer list
Instrument & operator=(const Instrument &)=default
Assignment operator.
const std::vector< IonSource > & getIonSources() const
returns a const reference to the ion source list
const String & getModel() const
returns the instrument model
Instrument()
Constructor.
std::vector< IonDetector > ion_detectors_
Definition: Instrument.h:170
const std::vector< IonDetector > & getIonDetectors() const
returns a const reference to the ion detector list
String customizations_
Definition: Instrument.h:167
Software & getSoftware()
returns a mutable reference to the instrument software
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition: MetaInfoInterface.h:61
Description of the software used for processing.
Definition: Software.h:50
A more convenient string class.
Definition: String.h:60
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48