libpappsomspp
Library for mass spectrometry
pappso::TracePeak Class Reference

#include <tracepeak.h>

Public Member Functions

 TracePeak ()
 
 TracePeak (std::vector< DataPoint >::const_iterator it_begin, std::vector< DataPoint >::const_iterator it_end)
 construct a peak given a trace, begin and end x coordinate More...
 
 TracePeak (const TracePeak &other)
 
 ~TracePeak ()
 
TracePeakCstSPtr makeTracePeakCstSPtr () const
 
DataPointgetMaxXicElement ()
 
const DataPointgetMaxXicElement () const
 
void setMaxXicElement (const DataPoint &max)
 
DataPointgetLeftBoundary ()
 
const DataPointgetLeftBoundary () const
 
void setLeftBoundary (const DataPoint &left)
 
DataPointgetRightBoundary ()
 
const DataPointgetRightBoundary () const
 
void setRightBoundary (const DataPoint &right)
 
pappso_double getArea () const
 
void setArea (pappso_double area)
 
bool containsRt (pappso::pappso_double rt) const
 
bool operator== (const TracePeak &other) const
 

Protected Attributes

pappso_double m_area = 0
 
DataPoint m_max
 
DataPoint m_left
 
DataPoint m_right
 

Detailed Description

@/brief Xic Peak stores peak boudaries detected from a Xic

Definition at line 39 of file tracepeak.h.

Constructor & Destructor Documentation

◆ TracePeak() [1/3]

pappso::TracePeak::TracePeak ( )

Definition at line 31 of file tracepeak.cpp.

32 {
33 }

◆ TracePeak() [2/3]

pappso::TracePeak::TracePeak ( std::vector< DataPoint >::const_iterator  it_begin,
std::vector< DataPoint >::const_iterator  it_end 
)

construct a peak given a trace, begin and end x coordinate

Definition at line 34 of file tracepeak.cpp.

36 {
37 
38  m_left = *it_begin;
39  m_right = *(it_end - 1);
40  m_max = *maxYDataPoint(it_begin, it_end);
41  m_area = areaTrace(it_begin, it_end);
42 }
DataPoint m_left
Definition: tracepeak.h:44
DataPoint m_max
Definition: tracepeak.h:43
DataPoint m_right
Definition: tracepeak.h:45
pappso_double m_area
Definition: tracepeak.h:42
std::vector< DataPoint >::const_iterator maxYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
Definition: trace.cpp:139
double areaTrace(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
calculate the area of a trace
Definition: trace.cpp:241

References pappso::areaTrace(), m_area, m_left, m_max, m_right, and pappso::maxYDataPoint().

◆ TracePeak() [3/3]

pappso::TracePeak::TracePeak ( const TracePeak other)

Definition at line 44 of file tracepeak.cpp.

45 {
46  m_area = other.m_area;
47  m_left = other.m_left;
48  m_right = other.m_right;
49  m_max = other.m_max;
50 }

References m_area, m_left, m_max, and m_right.

◆ ~TracePeak()

pappso::TracePeak::~TracePeak ( )

Definition at line 52 of file tracepeak.cpp.

53 {
54 }

Member Function Documentation

◆ containsRt()

bool pappso::TracePeak::containsRt ( pappso::pappso_double  rt) const

Definition at line 111 of file tracepeak.cpp.

112 {
113  if((rt >= m_left.x) && (rt <= m_right.x))
114  {
115  return (true);
116  }
117  return (false);
118 }
pappso_double x
Definition: datapoint.h:22

References m_left, m_right, pappso::rt, and pappso::DataPoint::x.

◆ getArea()

pappso_double pappso::TracePeak::getArea ( ) const

Definition at line 100 of file tracepeak.cpp.

101 {
102  return m_area;
103 };

References m_area.

◆ getLeftBoundary() [1/2]

DataPoint & pappso::TracePeak::getLeftBoundary ( )

Definition at line 74 of file tracepeak.cpp.

75 {
76  return m_left;
77 };

References m_left.

Referenced by pappso::QCPXic::drawXicPeakBorders().

◆ getLeftBoundary() [2/2]

const DataPoint& pappso::TracePeak::getLeftBoundary ( ) const
inline

Definition at line 69 of file tracepeak.h.

70  {
71  return m_left;
72  };

◆ getMaxXicElement() [1/2]

DataPoint & pappso::TracePeak::getMaxXicElement ( )

Definition at line 64 of file tracepeak.cpp.

65 {
66  return m_max;
67 };

References m_max.

Referenced by pappso::QCPXic::drawXicPeakBorders().

◆ getMaxXicElement() [2/2]

const DataPoint& pappso::TracePeak::getMaxXicElement ( ) const
inline

Definition at line 61 of file tracepeak.h.

62  {
63  return m_max;
64  };

◆ getRightBoundary() [1/2]

DataPoint & pappso::TracePeak::getRightBoundary ( )

Definition at line 85 of file tracepeak.cpp.

86 {
87  return m_right;
88 };

References m_right.

Referenced by pappso::QCPXic::drawXicPeakBorders().

◆ getRightBoundary() [2/2]

const DataPoint & pappso::TracePeak::getRightBoundary ( ) const

Definition at line 90 of file tracepeak.cpp.

91 {
92  return m_right;
93 };

References m_right.

◆ makeTracePeakCstSPtr()

TracePeakCstSPtr pappso::TracePeak::makeTracePeakCstSPtr ( ) const

Definition at line 58 of file tracepeak.cpp.

59 {
60  return std::make_shared<const TracePeak>(*this);
61 }

◆ operator==()

bool pappso::TracePeak::operator== ( const TracePeak other) const
inline

Definition at line 85 of file tracepeak.h.

86  {
87  return ((m_area == other.m_area) && (m_max == other.m_max) &&
88  (m_left == other.m_left) && (m_right == other.m_right));
89  };

References m_area, m_left, m_max, and m_right.

◆ setArea()

void pappso::TracePeak::setArea ( pappso_double  area)

Definition at line 105 of file tracepeak.cpp.

106 {
107  m_area = area;
108 };

References m_area.

◆ setLeftBoundary()

void pappso::TracePeak::setLeftBoundary ( const DataPoint left)

Definition at line 79 of file tracepeak.cpp.

80 {
81  m_left = left;
82 };

References m_left.

◆ setMaxXicElement()

void pappso::TracePeak::setMaxXicElement ( const DataPoint max)

Definition at line 69 of file tracepeak.cpp.

70 {
71  m_max = max;
72 };
@ max
maximum of intensities

References m_max, and pappso::max.

◆ setRightBoundary()

void pappso::TracePeak::setRightBoundary ( const DataPoint right)

Definition at line 95 of file tracepeak.cpp.

96 {
97  m_right = right;
98 };

References m_right.

Member Data Documentation

◆ m_area

pappso_double pappso::TracePeak::m_area = 0
protected

Definition at line 42 of file tracepeak.h.

Referenced by TracePeak(), getArea(), operator==(), and setArea().

◆ m_left

DataPoint pappso::TracePeak::m_left
protected

Definition at line 44 of file tracepeak.h.

Referenced by TracePeak(), containsRt(), getLeftBoundary(), operator==(), and setLeftBoundary().

◆ m_max

DataPoint pappso::TracePeak::m_max
protected

Definition at line 43 of file tracepeak.h.

Referenced by TracePeak(), getMaxXicElement(), operator==(), and setMaxXicElement().

◆ m_right

DataPoint pappso::TracePeak::m_right
protected

Definition at line 45 of file tracepeak.h.

Referenced by TracePeak(), containsRt(), getRightBoundary(), operator==(), and setRightBoundary().


The documentation for this class was generated from the following files: