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 */
46
47// It is generally admitted that 11 is the max MS levels
48// reachable using a Paul trap...
49constexpr std::size_t MAX_MS_LEVELS = 12;
50
52{
53
54 public:
56 MsRunReadConfig(const MsRunReadConfig &other);
57
59
60 MsRunReadConfig &operator=(const MsRunReadConfig &other);
61
62 void setRetentionTimeStartInSeconds(double retention_time_start_in_seconds);
63 double getRetentionTimeStartInSeconds() const;
64
65 void setRetentionTimeEndInSeconds(double retention_time_end_in_seconds);
66 double getRetentionTimeEndInSeconds() const;
67
68 void setMsLevels(std::vector<std::size_t> ms_levels);
69 const bool *getMsLevels() const;
70 QString getMsLevelsAsString() const;
71
72 void setNeedPeakList(bool need_peak_list);
73 bool needPeakList() const;
74
75 void setParameterValue(MsRunReadConfigParameter parameter,
76 const QVariant &value);
77 const QVariant getParameterValue(MsRunReadConfigParameter parameter) const;
78
79 void reset();
80
81 QString toString() const;
82
83 bool acceptMsLevel(std::size_t ms_level) const;
84 bool acceptRetentionTimeInSeconds(double retention_time_in_seconds) const;
85
86 private:
87 double m_retentionTimeStartSeconds = -1;
88 double m_retentionTimeEndSeconds = -1;
89
90 bool m_isPeakListNeeded = true;
91
92 // Initialize the ms levels to false.
93 // Each index in the array contains a bool value indicating, if true, a
94 // requested MS level.
95 bool m_msLevels[MAX_MS_LEVELS] = {false};
96 // Fixme: maybe we should initialize in the constructor the MS level 1 to
97 // true?
98
99 //! map containing any parameter value
100 std::map<MsRunReadConfigParameter, QVariant> m_paramsMap;
101};
102
103} // 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