libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
mzcborspectrumcollectionreader.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/core/processing/cbor/mzcbor/mzcborspectrumcollectionreader.h
3 * \date 22/11/2025
4 * \author Olivier Langella
5 * \brief read mzcbor for spectrum collection handler
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
30
35
36namespace pappso
37{
38namespace cbor
39{
40namespace mzcbor
41{
42/**
43 * @todo write docs
44 */
46{
47 public:
48 /**
49 * Default constructor
50 */
53
54 /**
55 * Destructor
56 */
58
59 void setMsRunId(const MsRunIdCstSPtr &msrun_id);
60 void
61 setNativeId2SpectrumIndexMapPtr(const std::map<QString, std::size_t> *nativeId2SpectrumIndexMap);
62
63 protected:
64 /** @brief read only the targeted msrun
65 */
66 virtual void readMsrun() override;
67
68
69 /** @brief only the spectrum list of targeted msrun, then stop parsing
70 */
72
73 /** @brief read each spectrum in the targeted msrun (msrunId)
74 */
75 void readSpectrum(std::size_t index_count, bool want_binary_data);
76
77
78 std::map<QString, CvParam> readScan();
79
80 private:
85
86 const std::map<QString, std::size_t> *mp_nativeId2SpectrumIndexMap = nullptr;
87};
88} // namespace mzcbor
89} // namespace cbor
90} // namespace pappso
interface to collect spectrums from the MsRunReader class
SpectrumCollectionHandlerInterface & m_SpectrumCollectionHandlerInterface
void readSpectrum(std::size_t index_count, bool want_binary_data)
read each spectrum in the targeted msrun (msrunId)
MzcborSpectrumCollectionReader(const MsRunReadConfig &config, SpectrumCollectionHandlerInterface &handler)
void setNativeId2SpectrumIndexMapPtr(const std::map< QString, std::size_t > *nativeId2SpectrumIndexMap)
void readSpectrumListAndLeave()
only the spectrum list of targeted msrun, then stop parsing
const std::map< QString, std::size_t > * mp_nativeId2SpectrumIndexMap
virtual void readMsrun() override
read only the targeted msrun
#define PMSPP_LIB_DECL
read mzcbor stream or file
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition msrunid.h:46
base interface to read MSrun files