Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
RawData.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-2013.
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: Florian Zeller $
32 // $Authors: Lukas Mueller, Markus Mueller $
33 // --------------------------------------------------------------------------
34 //
35 /*
36  * RawData.h
37  * PeakDetection
38  *
39  * Created by Markus Mueller on 10/19/06.
40  *
41  * Ported to OpenMS by Florian Zeller, florian.zeller@bsse.ethz.ch
42  * December 2010
43  *
44  */
45 
46 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_RAWDATA_H
47 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_RAWDATA_H
48 
49 #include <vector>
50 #include <ostream>
51 
52 #include <OpenMS/config.h>
53 
54 namespace OpenMS
55 {
56 
57 // Class for the storage of raw MS data
58  class OPENMS_DLLAPI RawData
59  {
60 
61 public:
62 
63  RawData() {}
64  RawData(std::vector<double> &, std::vector<double> &);
65  virtual ~RawData();
66 
67  friend std::ostream & operator<<(std::ostream &, RawData &);
68 
69  /*
70  * @brief Retrieve raw data as mass and intensity vectors. First argument: Mass values in profile mode
71  * Second argument: Intensity values in profile mode
72  */
73  void get(std::vector<double> &, std::vector<double> &);
74 
75  /*
76  * @brief Set raw data as mass and intensity vectors. First argument: Mass values in profile mode
77  * Second argument: Intensity values in profile mode
78  */
79  void set(std::vector<double> &, std::vector<double> &);
80 
81  // Virtual functions
82  virtual void smooth()
83  {
84  }
85 
86 protected:
87  std::vector<double> profileMasses_;
88  std::vector<double> profileIntensities_;
89  };
90 
91  std::ostream & operator<<(std::ostream & out, RawData & data);
92 
93  inline RawData::RawData(std::vector<double> & masses, std::vector<double> & intensities)
94  {
95  profileMasses_ = masses;
96  profileIntensities_ = intensities;
97  }
98 
99  inline void RawData::get(std::vector<double> & masses, std::vector<double> & intensities)
100  {
101  masses = profileMasses_;
102  intensities = profileIntensities_;
103  }
104 
105  inline void RawData::set(std::vector<double> & masses, std::vector<double> & intensities)
106  {
107  profileMasses_ = masses;
108  profileIntensities_ = intensities;
109  }
110 
111 } // ns
112 
113 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_RAWDATA_H
std::vector< double > profileIntensities_
Definition: RawData.h:88
virtual void smooth()
Definition: RawData.h:82
std::ostream & operator<<(std::ostream &os, const ItraqQuantifier::ItraqQuantifierStats &stats)
void set(std::vector< double > &, std::vector< double > &)
Definition: RawData.h:105
std::vector< double > profileMasses_
Definition: RawData.h:87
RawData()
Definition: RawData.h:63
void get(std::vector< double > &, std::vector< double > &)
Definition: RawData.h:99
Definition: RawData.h:58

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