libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
mzcborreaderbase.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/core/processing/cbor/mzcbor/mzcborreaderbase.h
3 * \date 19/11/2025
4 * \author Olivier Langella
5 * \brief read mzcbor stream or file
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
10 *
11 * This file is part of PAPPSOms-tools.
12 *
13 * PAPPSOms-tools is free software: you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation, either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * PAPPSOms-tools is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
25 *
26 ******************************************************************************/
27
28
29#pragma once
32#include "cvparam.h"
33namespace pappso
34{
35namespace cbor
36{
37namespace mzcbor
38{
39/**
40 * @brief base class to initialize mzCBOR file parsing
41 *
42 * ensures stream read on regular file or any readable device
43 */
45{
46 public:
47 /**
48 * Default constructor
49 */
51
52 /**
53 * Destructor
54 */
55 virtual ~MzcborReaderBase();
56
57 /**
58 * @brief read mzCBOR file
59 * @param cborp file pointer
60 * @param monitor monitor read progress and messages
61 */
62 virtual void readCbor(QFile *cborp, pappso::UiMonitorInterface &monitor);
63
64
65 /**
66 * @brief read mzCBOR from any device (memory buffer or else)
67 * @param cborp device pointer
68 * @param monitor monitor read progress and messages
69 */
70 virtual void readCbor(QIODevice *cborp, pappso::UiMonitorInterface &monitor);
71
72 virtual void close();
73
74 bool isMzcbor() const;
75
76 const QStringList &getMsrunIdList() const;
77
78
79 protected:
81
82 virtual void readMsrun();
84
85 /** @brief read the array containing cvParams to give accessions and values
86 */
87 std::map<QString, CvParam> getCvParamsMap();
88
89 protected:
90 bool m_stopParsing = false;
91
92 private:
93 bool m_isMzcbor = false;
94 QStringList m_msrunIdList;
95};
96} // namespace mzcbor
97} // namespace cbor
98} // namespace pappso
virtual void readCbor(QFile *cborp, pappso::UiMonitorInterface &monitor)
read mzCBOR file
void readRoot(pappso::UiMonitorInterface &monitor)
virtual void close()
convenient function to clean pointer before leaving
std::map< QString, CvParam > getCvParamsMap()
read the array containing cvParams to give accessions and values
const QStringList & getMsrunIdList() const
PSI cvParam object for mzML/mzCBOR.
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39