All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MockObjects.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hannes Roest $
6 // $Authors: Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/OPENSWATHALGO/OpenSwathAlgoConfig.h>
13 
14 #include <boost/shared_ptr.hpp>
15 #include <map>
16 #include <vector>
17 #include <string>
18 
19 namespace OpenSwath
20 {
21 
25  class OPENSWATHALGO_DLLAPI MockFeature :
26  public OpenSwath::IFeature
27  {
28 public:
29 
31 
32  ~MockFeature() override;
33 
34  void getRT(std::vector<double>& rt) const override;
35 
36  void getIntensity(std::vector<double>& intens) const override;
37 
38  float getIntensity() const override;
39 
40  double getRT() const override;
41 
42  std::vector<double> m_rt_vec;
43  std::vector<double> m_intensity_vec;
44  float m_intensity;
45  double m_rt;
46  };
47 
51  class OPENSWATHALGO_DLLAPI MockMRMFeature :
53  {
54 public:
55 
57 
58  ~MockMRMFeature() override;
59 
60  boost::shared_ptr<OpenSwath::IFeature> getFeature(std::string nativeID) override;
61 
62  boost::shared_ptr<OpenSwath::IFeature> getPrecursorFeature(std::string nativeID) override;
63 
64  std::vector<std::string> getNativeIDs() const override;
65 
66  std::vector<std::string> getPrecursorIDs() const override;
67 
68  float getIntensity() const override;
69 
70  double getRT() const override;
71 
72  double getMetaValue(std::string name) const override;
73 
74  size_t size() const override;
75 
76  std::map<std::string, boost::shared_ptr<MockFeature> > m_features;
77  std::map<std::string, boost::shared_ptr<MockFeature> > m_precursor_features;
78  float m_intensity;
79  double m_rt;
80  double m_metavalue;
81  };
82 
86  class OPENSWATHALGO_DLLAPI MockTransitionGroup :
88  {
89 public:
90 
92 
94 
95  std::size_t size() const override;
96 
97  std::vector<std::string> getNativeIDs() const override;
98 
99  void getLibraryIntensities(std::vector<double>& intensities) const override;
100 
101  std::size_t m_size;
102  std::vector<std::string> m_native_ids;
103  std::vector<double> m_library_intensities;
104  };
105 
106 
110  class OPENSWATHALGO_DLLAPI MockSignalToNoise :
112  {
113 public:
115 
116  double getValueAtRT(double /* RT */) override;
117 
118  double m_sn_value;
119  };
120 
121 } //end namespace OpenMS
122 
Definition: ITransition.h:21
Definition: ITransition.h:31
Mock object implementing IFeature.
Definition: MockObjects.h:27
float m_intensity
Definition: MockObjects.h:44
void getRT(std::vector< double > &rt) const override
std::vector< double > m_intensity_vec
Definition: MockObjects.h:43
double getRT() const override
float getIntensity() const override
void getIntensity(std::vector< double > &intens) const override
std::vector< double > m_rt_vec
Definition: MockObjects.h:42
double m_rt
Definition: MockObjects.h:45
Mock object implementing IMRMFeature.
Definition: MockObjects.h:53
boost::shared_ptr< OpenSwath::IFeature > getPrecursorFeature(std::string nativeID) override
float m_intensity
Definition: MockObjects.h:78
std::map< std::string, boost::shared_ptr< MockFeature > > m_features
Definition: MockObjects.h:76
boost::shared_ptr< OpenSwath::IFeature > getFeature(std::string nativeID) override
double getRT() const override
std::vector< std::string > getNativeIDs() const override
float getIntensity() const override
double m_metavalue
Definition: MockObjects.h:80
double getMetaValue(std::string name) const override
size_t size() const override
std::map< std::string, boost::shared_ptr< MockFeature > > m_precursor_features
Definition: MockObjects.h:77
double m_rt
Definition: MockObjects.h:79
std::vector< std::string > getPrecursorIDs() const override
Mock object implementing ISignalToNoise.
Definition: MockObjects.h:112
double m_sn_value
Definition: MockObjects.h:118
double getValueAtRT(double) override
Mock object implementing ITransitionGroup.
Definition: MockObjects.h:88
std::size_t m_size
Definition: MockObjects.h:101
std::vector< double > m_library_intensities
Definition: MockObjects.h:103
std::vector< std::string > getNativeIDs() const override
void getLibraryIntensities(std::vector< double > &intensities) const override
std::size_t size() const override
std::vector< std::string > m_native_ids
Definition: MockObjects.h:102
Definition: Scoring.h:18
Definition: ITransition.h:53
Definition: ITransition.h:45