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
31
#include "
pappsomspp/core/processing/cbor/mzcbor/mzcborreaderbase.h
"
32
#include "
pappsomspp/core/msrun/spectrumcollectionhandlerinterface.h
"
33
#include "
pappsomspp/core/msrun/msrunreadconfig.h
"
34
#include "
pappsomspp/core/msrun/msrunid.h
"
35
36
namespace
pappso
37
{
38
namespace
cbor
39
{
40
namespace
mzcbor
41
{
42
/**
43
* @todo write docs
44
*/
45
class
PMSPP_LIB_DECL
MzcborSpectrumCollectionReader
:
public
MzcborReaderBase
46
{
47
public
:
48
/**
49
* Default constructor
50
*/
51
MzcborSpectrumCollectionReader
(
const
MsRunReadConfig
&config,
52
SpectrumCollectionHandlerInterface
&handler);
53
54
/**
55
* Destructor
56
*/
57
virtual
~MzcborSpectrumCollectionReader
();
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
*/
71
void
readSpectrumListAndLeave();
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
:
81
const
MsRunReadConfig
&
m_msRunReadConfig
;
82
SpectrumCollectionHandlerInterface
&
m_SpectrumCollectionHandlerInterface
;
83
MsRunIdCstSPtr
mcsp_msRunId
;
84
QString
m_xmlMzMlRunId
;
85
86
const
std::map<QString, std::size_t> *mp_nativeId2SpectrumIndexMap =
nullptr
;
87
};
88
}
// namespace mzcbor
89
}
// namespace cbor
90
}
// namespace pappso
pappso::MsRunReadConfig
Definition
msrunreadconfig.h:62
pappso::SpectrumCollectionHandlerInterface
interface to collect spectrums from the MsRunReader class
Definition
spectrumcollectionhandlerinterface.h:52
pappso::cbor::mzcbor::MzcborReaderBase
base class to initialize mzCBOR file parsing
Definition
mzcborreaderbase.h:45
pappso::cbor::mzcbor::MzcborSpectrumCollectionReader
Definition
mzcborspectrumcollectionreader.h:46
pappso::cbor::mzcbor::MzcborSpectrumCollectionReader::m_SpectrumCollectionHandlerInterface
SpectrumCollectionHandlerInterface & m_SpectrumCollectionHandlerInterface
Definition
mzcborspectrumcollectionreader.h:82
pappso::cbor::mzcbor::MzcborSpectrumCollectionReader::mcsp_msRunId
MsRunIdCstSPtr mcsp_msRunId
Definition
mzcborspectrumcollectionreader.h:83
pappso::cbor::mzcbor::MzcborSpectrumCollectionReader::m_xmlMzMlRunId
QString m_xmlMzMlRunId
Definition
mzcborspectrumcollectionreader.h:84
pappso::cbor::mzcbor::MzcborSpectrumCollectionReader::m_msRunReadConfig
const MsRunReadConfig & m_msRunReadConfig
Definition
mzcborspectrumcollectionreader.h:81
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
msrunid.h
msrunreadconfig.h
mzcborreaderbase.h
read mzcbor stream or file
pappso::Enums::MsDataFormat::mzcbor
@ mzcbor
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::MsRunIdCstSPtr
std::shared_ptr< const MsRunId > MsRunIdCstSPtr
Definition
msrunid.h:46
spectrumcollectionhandlerinterface.h
base interface to read MSrun files
pappsomspp
core
processing
cbor
mzcbor
mzcborspectrumcollectionreader.h
Generated on Tue May 19 2026 12:52:14 for libpappsomspp by
1.9.8