libpappsomspp
Library for mass spectrometry
tracepeak.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3  *
4  * This file is part of the PAPPSOms++ library.
5  *
6  * PAPPSOms++ is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * PAPPSOms++ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Contributors:
20  * Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21  *implementation
22  ******************************************************************************/
23 
24 #pragma once
25 
26 
27 #include "../../exportinmportconfig.h"
28 #include "../../trace/trace.h"
29 #include "../../types.h"
30 
31 namespace pappso
32 {
33 
34 class TracePeak;
35 typedef std::shared_ptr<const TracePeak> TracePeakCstSPtr;
36 
37 /** @/brief Xic Peak stores peak boudaries detected from a Xic
38  * */
40 {
41  public:
42  TracePeak();
43  /** @brief construct a peak given a trace, begin and end x coordinate
44  */
45  TracePeak(std::vector<DataPoint>::const_iterator it_begin,
46  std::vector<DataPoint>::const_iterator it_end);
47 
48  /** @brief construct a peak given a trace, begin and end x coordinate
49  *
50  * @param it_begin begining of trace
51  * @param it_end end of trace
52  * @param remove_base if true, remove the base peak signal
53  */
54  TracePeak(std::vector<DataPoint>::const_iterator it_begin,
55  std::vector<DataPoint>::const_iterator it_end,
56  bool remove_base);
57  TracePeak(const TracePeak &other);
58  ~TracePeak();
59 
60 
61  TracePeakCstSPtr makeTracePeakCstSPtr() const;
62 
63  DataPoint &getMaxXicElement();
64  const DataPoint &getMaxXicElement() const;
65  void setMaxXicElement(const DataPoint &max);
66 
67  DataPoint &getLeftBoundary();
68  const DataPoint &getLeftBoundary() const;
69  void setLeftBoundary(const DataPoint &left);
70 
71  DataPoint &getRightBoundary();
72  const DataPoint &getRightBoundary() const;
73  void setRightBoundary(const DataPoint &right);
74  pappso_double getArea() const;
75 
76 
77  void setArea(pappso_double area);
78 
79  bool containsRt(pappso::pappso_double rt) const;
80 
81 
82  bool operator==(const TracePeak &other) const;
83 
84  TracePeak &operator=(const TracePeak &other);
85 
86 
87  protected:
88  pappso_double m_area = 0;
92 };
93 
94 
95 } // namespace pappso
DataPoint m_left
Definition: tracepeak.h:90
DataPoint m_max
Definition: tracepeak.h:89
DataPoint m_right
Definition: tracepeak.h:91
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
double pappso_double
A type definition for doubles.
Definition: types.h:49
@ rt
Retention time.
bool operator==(Aa const &l, Aa const &r)
Definition: aa.cpp:280
std::shared_ptr< const TracePeak > TracePeakCstSPtr
Definition: tracepeak.h:34
@ max
maximum of intensities