libpappsomspp
Library for mass spectrometry
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"
31#include <QObject>
32
33pappso::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 {
47 QObject::tr("xic_coord == nullptr\nindex=%1 %2 %3 %4")
48 .arg(spectrum_index)
49 .arg(__FILE__)
50 .arg(__FUNCTION__)
51 .arg(__LINE__));
52 }
53}
54
58
59double
64
65std::size_t
70
pappso::XicCoordSPtr msp_xicCoord
Xic coordinates.
Definition precursor.h:84
std::size_t getSpectrumIndex() const
Definition precursor.cpp:66
double m_mz
selected m/z of this precursor
Definition precursor.h:82
const pappso::XicCoordSPtr & getXicCoordSPtr() const
Definition precursor.cpp:72
Precursor(std::size_t spectrum_index, double mz, double intensity, pappso::XicCoordSPtr xic_coord)
Definition precursor.cpp:33
double m_intensity
intensity of this precursor
Definition precursor.h:80
std::size_t m_spectrumIndex
< MS level 2 scan number whome this Precursor is parent
Definition precursor.h:78
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44