libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
msrunreadconfig.h
Go to the documentation of this file.
1/*******************************************************************************
2 * Copyright (c) 2023 Filippo Rusconi
3 *<filippo.rusconi@universite-paris-saclay.fr>.
4 *
5 * This file is part of the PAPPSOms++ library.
6 *
7 * PAPPSOms++ is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * PAPPSOms++ is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19 *
20 ******************************************************************************/
21
22#pragma once
23
24#include <map>
25#include <QVariant>
26
28
29namespace pappso
30{
31
32/** \def MsRunReadConfigParameters specific parameters for MsRunReadConfig
33 *
34 */
36{
37 // Only process mobility scans contained in the
38 // scan index range below.
41
42 // Only process mobility scans contained in the
43 // inverse mobility range below.
46
47 // Only process mass spectra for m/z values contained
48 // in the following m/z range.
51
52 // Merge m/z (TOF, really) indices on the basis of this
53 // count of m/z (TOF, really) indices.
55};
56
57// It is generally admitted that 11 is the max MS levels
58// reachable using a Paul trap...
59constexpr std::size_t MAX_MS_LEVELS = 12;
60
62{
63
64 public:
66 MsRunReadConfig(const MsRunReadConfig &other);
67
69
70 MsRunReadConfig &operator=(const MsRunReadConfig &other);
71
72 void setRetentionTimeStartInSeconds(double retention_time_start_in_seconds);
73 double getRetentionTimeStartInSeconds() const;
74
75 void setRetentionTimeEndInSeconds(double retention_time_end_in_seconds);
76 double getRetentionTimeEndInSeconds() const;
77
78 void setMsLevels(std::vector<std::size_t> ms_levels);
79 const bool *getMsLevels() const;
80 QString getMsLevelsAsString() const;
81
82 void setNeedPeakList(bool need_peak_list);
83 bool needPeakList() const;
84
85 void setParameterValue(MsRunReadConfigParameter parameter,
86 const QVariant &value);
87 const QVariant getParameterValue(MsRunReadConfigParameter parameter) const;
88
89 void reset();
90
91 QString toString() const;
92
93 bool acceptMsLevel(std::size_t ms_level) const;
94 bool acceptRetentionTimeInSeconds(double retention_time_in_seconds) const;
95
96 private:
97 double m_retentionTimeStartSeconds = -1;
98 double m_retentionTimeEndSeconds = -1;
99
100 bool m_isPeakListNeeded = true;
101
102 // Initialize the ms levels to false.
103 // Each index in the array contains a bool value indicating, if true, a
104 // requested MS level.
105 bool m_msLevels[MAX_MS_LEVELS] = {false};
106 // Fixme: maybe we should initialize in the constructor the MS level 1 to
107 // true?
108
109 //! map containing any parameter value
110 std::map<MsRunReadConfigParameter, QVariant> m_paramsMap;
111};
112
113} // namespace pappso
std::map< MsRunReadConfigParameter, QVariant > m_paramsMap
map containing any parameter value
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
constexpr std::size_t MAX_MS_LEVELS
MsRunReadConfigParameter