tracepeak.h
Go to the documentation of this file.
/*******************************************************************************
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include "../../exportinmportconfig.h"
#include "../../trace/trace.h"
#include "../../types.h"
namespace pappso
{
class TracePeak;
typedef std::shared_ptr<const TracePeak> TracePeakCstSPtr;
/** @/brief Xic Peak stores peak boudaries detected from a Xic
* */
class PMSPP_LIB_DECL TracePeak
{
protected:
pappso_double m_area = 0;
DataPoint m_max;
DataPoint m_left;
DataPoint m_right;
public:
TracePeak();
/** @brief construct a peak given a trace, begin and end x coordinate
*/
TracePeak(std::vector<DataPoint>::const_iterator it_begin,
std::vector<DataPoint>::const_iterator it_end);
TracePeak(const TracePeak &other);
~TracePeak();
TracePeakCstSPtr makeTracePeakCstSPtr() const;
DataPoint &getMaxXicElement();
const DataPoint &
getMaxXicElement() const
{
return m_max;
};
void setMaxXicElement(const DataPoint &max);
DataPoint &getLeftBoundary();
const DataPoint &
getLeftBoundary() const
{
return m_left;
};
void setLeftBoundary(const DataPoint &left);
DataPoint &getRightBoundary();
const DataPoint &getRightBoundary() 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
{
return ((m_area == other.m_area) && (m_max == other.m_max) &&
(m_left == other.m_left) && (m_right == other.m_right));
};
TracePeak &
operator=(const TracePeak &other)
{
if(this == &other)
return *this;
m_area = other.m_area;
m_max = other.m_max;
m_left = other.m_left;
m_right = other.m_right;
return *this;
}
};
} // namespace pappso
pappso::TracePeak
Definition: tracepeak.h:40
pappso::TracePeak::operator==
bool operator==(const TracePeak &other) const
Definition: tracepeak.h:85
pappso::TracePeak::getMaxXicElement
const DataPoint & getMaxXicElement() const
Definition: tracepeak.h:61
pappso::TracePeak::getLeftBoundary
const DataPoint & getLeftBoundary() const
Definition: tracepeak.h:69
pappso::TracePeak::m_left
DataPoint m_left
Definition: tracepeak.h:44
pappso::TracePeak::m_max
DataPoint m_max
Definition: tracepeak.h:43
pappso::TracePeak::operator=
TracePeak & operator=(const TracePeak &other)
Definition: tracepeak.h:92
pappso::TracePeak::m_right
DataPoint m_right
Definition: tracepeak.h:45
pappso::TracePeak::m_area
pappso_double m_area
Definition: tracepeak.h:42
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition: exportinmportconfig.h:14
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
pappso::pappso_double
double pappso_double
A type definition for doubles.
Definition: types.h:48
pappso::TracePeakCstSPtr
std::shared_ptr< const TracePeak > TracePeakCstSPtr
Definition: tracepeak.h:34
pappso::DataPoint
Definition: datapoint.h:21