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
27#include "../exportinmportconfig.h"
28
29namespace pappso
30{
31
32
33/** \def MsRunReadConfigParameters specific parameters for MsRunReadConfig
34 *
35 */
37{
38 // Only process mobility scans contained in the
39 // scan index range below.
42
43 // Only process mobility scans contained in the
44 // inverse mobility range below.
47
48 // Merge ion mobility scans on the basis of this
49 // count of scan indices (merge together groups
50 // of this number of scan indices)
52
53 // Merge ion mogility scans on the basis of this
54 // window of inverse mobility.
56
57 // Only process mass spectra for m/z values contained
58 // in the following m/z range.
61
62 // Merge m/z (TOF, really) indices on the basis of this
63 // count of m/z (TOF, really) indices.
65};
66
67// It is generally admitted that 11 is the max MS levels
68// reachable using a Paul trap...
69constexpr std::size_t MAX_MS_LEVELS = 12;
70
72{
73
74 public:
76 MsRunReadConfig(const MsRunReadConfig &other);
77
79
80 MsRunReadConfig &operator=(const MsRunReadConfig &other);
81
82 void setRetentionTimeStartInSeconds(double retention_time_start_in_seconds);
83 double getRetentionTimeStartInSeconds() const;
84
85 void setRetentionTimeEndInSeconds(double retention_time_end_in_seconds);
86 double getRetentionTimeEndInSeconds() const;
87
88 void setMsLevels(std::vector<std::size_t> ms_levels);
89 const bool *getMsLevels() const;
90 QString getMsLevelsAsString() const;
91
92 void setNeedPeakList(bool need_peak_list);
93 bool needPeakList() const;
94
95 void setParameterValue(MsRunReadConfigParameter parameter,
96 const QVariant &value);
97 const QVariant getParameterValue(MsRunReadConfigParameter parameter) const;
98
99 void reset();
100
101 QString toString() const;
102
103 bool acceptMsLevel(std::size_t ms_level) const;
104 bool acceptRetentionTimeInSeconds(double retention_time_in_seconds) const;
105
106 private:
107 double m_retentionTimeStartSeconds = -1;
108 double m_retentionTimeEndSeconds = -1;
109
110 bool m_isPeakListNeeded = true;
111
112 // Initialize the ms levels to false.
113 // Each index in the array contains a bool value indicating, if true, a
114 // requested MS level.
115 bool m_msLevels[MAX_MS_LEVELS] = {false};
116 // Fixme: maybe we should initialize in the constructor the MS level 1 to
117 // true?
118
119 //! map containing any parameter value
120 std::map<MsRunReadConfigParameter, QVariant> m_paramsMap;
121};
122
123} // 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