OpenMS
MockObjects.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- 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  size_t size() const override;
73 
74  std::map<std::string, boost::shared_ptr<MockFeature> > m_features;
75  std::map<std::string, boost::shared_ptr<MockFeature> > m_precursor_features;
76  float m_intensity;
77  double m_rt;
78  };
79 
83  class OPENSWATHALGO_DLLAPI MockTransitionGroup :
85  {
86 public:
87 
89 
91 
92  std::size_t size() const override;
93 
94  std::vector<std::string> getNativeIDs() const override;
95 
96  void getLibraryIntensities(std::vector<double>& intensities) const override;
97 
98  std::size_t m_size;
99  std::vector<std::string> m_native_ids;
100  std::vector<double> m_library_intensities;
101  };
102 
103 
107  class OPENSWATHALGO_DLLAPI MockSignalToNoise :
109  {
110 public:
112 
113  double getValueAtRT(double /* RT */) override;
114 
115  double m_sn_value;
116  };
117 
118 } //end namespace OpenMS
119 
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:76
std::map< std::string, boost::shared_ptr< MockFeature > > m_features
Definition: MockObjects.h:74
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
size_t size() const override
std::map< std::string, boost::shared_ptr< MockFeature > > m_precursor_features
Definition: MockObjects.h:75
double m_rt
Definition: MockObjects.h:77
std::vector< std::string > getPrecursorIDs() const override
Mock object implementing ISignalToNoise.
Definition: MockObjects.h:109
double m_sn_value
Definition: MockObjects.h:115
double getValueAtRT(double) override
Mock object implementing ITransitionGroup.
Definition: MockObjects.h:85
std::size_t m_size
Definition: MockObjects.h:98
std::vector< double > m_library_intensities
Definition: MockObjects.h:100
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:99
Definition: Scoring.h:18
Definition: ITransition.h:52
Definition: ITransition.h:44