libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
precursor.cpp
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/masschroq/precursor.h
3
* \date 04/11/2024
4
* \author Olivier Langella
5
* \brief MS1 precursor information
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2024 Olivier Langella
10
*<Olivier.Langella@universite-paris-saclay.fr>.
11
*
12
* This file is part of MassChroQ.
13
*
14
* MassChroQ is free software: you can redistribute it and/or modify
15
* it under the terms of the GNU General Public License as published by
16
* the Free Software Foundation, either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* MassChroQ is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with MassChroQ. If not, see <http://www.gnu.org/licenses/>.
26
*
27
******************************************************************************/
28
29
#include "
precursor.h
"
30
#include "
pappsomspp/core/pappsoexception.h
"
31
#include <QObject>
32
33
pappso::masschroq::Precursor::Precursor
(std::size_t spectrum_index,
34
double
mz,
35
double
intensity,
36
pappso::XicCoordSPtr
xic_coord)
37
{
38
m_spectrumIndex
= spectrum_index;
39
m_intensity
= intensity;
40
m_mz
= mz;
41
42
msp_xicCoord
= xic_coord;
43
44
if
(
msp_xicCoord
.get() ==
nullptr
)
45
{
46
throw
pappso::PappsoException
(QObject::tr(
"xic_coord == nullptr\nindex=%1 %2 %3 %4"
)
47
.arg(spectrum_index)
48
.arg(__FILE__)
49
.arg(__FUNCTION__)
50
.arg(__LINE__));
51
}
52
}
53
54
pappso::masschroq::Precursor::~Precursor
()
55
{
56
}
57
58
double
59
pappso::masschroq::Precursor::getIntensity
()
const
60
{
61
return
m_intensity
;
62
}
63
64
std::size_t
65
pappso::masschroq::Precursor::getSpectrumIndex
()
const
66
{
67
return
m_spectrumIndex
;
68
}
69
70
const
pappso::XicCoordSPtr
&
71
pappso::masschroq::Precursor::getXicCoordSPtr
()
const
72
{
73
return
msp_xicCoord
;
74
}
pappso::PappsoException
Definition
pappsoexception.h:41
pappso::masschroq::Precursor::~Precursor
virtual ~Precursor()
Definition
precursor.cpp:54
pappso::masschroq::Precursor::msp_xicCoord
pappso::XicCoordSPtr msp_xicCoord
Xic coordinates.
Definition
precursor.h:84
pappso::masschroq::Precursor::getSpectrumIndex
std::size_t getSpectrumIndex() const
Definition
precursor.cpp:65
pappso::masschroq::Precursor::m_mz
double m_mz
selected m/z of this precursor
Definition
precursor.h:82
pappso::masschroq::Precursor::getXicCoordSPtr
const pappso::XicCoordSPtr & getXicCoordSPtr() const
Definition
precursor.cpp:71
pappso::masschroq::Precursor::Precursor
Precursor(std::size_t spectrum_index, double mz, double intensity, pappso::XicCoordSPtr xic_coord)
Definition
precursor.cpp:33
pappso::masschroq::Precursor::m_intensity
double m_intensity
intensity of this precursor
Definition
precursor.h:80
pappso::masschroq::Precursor::getIntensity
double getIntensity() const
Definition
precursor.cpp:59
pappso::masschroq::Precursor::m_spectrumIndex
std::size_t m_spectrumIndex
< MS level 2 scan number whome this Precursor is parent
Definition
precursor.h:78
precursor.h
pappso::XicCoordSPtr
std::shared_ptr< XicCoord > XicCoordSPtr
Definition
xiccoord.h:44
pappsoexception.h
pappsomspp
core
masschroq
precursor.cpp
Generated on
for libpappsomspp by
1.17.0