libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
mzcborbuildindexreader.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/core/processing/cbor/mzcbor/mzcborbuildindexreader.h
3
* \date 24/11/2025
4
* \author Olivier Langella
5
* \brief read mzcbor to build an index
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
MzcborBuildIndexReader
:
public
MzcborReaderBase
46
{
47
public
:
48
/**
49
* Default constructor
50
*/
51
MzcborBuildIndexReader
(
const
MsRunIdCstSPtr
&msrun_id);
52
53
/**
54
* Destructor
55
*/
56
virtual
~MzcborBuildIndexReader
();
57
virtual
void
readCbor
(QFile *cborp,
pappso::UiMonitorInterface
&monitor)
override
;
58
59
const
std::vector<qint64> &
getSpectrumIndexPositionInFile
()
const
;
60
const
std::map<QString, std::size_t> &
getNativeId2SpectrumIndexMap
()
const
;
61
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
74
/** @brief read each spectrum in the targeted msrun (msrunId)
75
*/
76
void
readSpectrum
(qint64 position_of_spectrum_in_file, std::size_t index_count);
77
78
79
80
81
private
:
82
MsRunIdCstSPtr
mcsp_msRunId
;
83
QString
m_xmlMzMlRunId
;
84
85
std::vector<qint64>
m_spectrumIndexPositionInFile
;
86
std::map<QString, std::size_t>
m_nativeId2SpectrumIndexMap
;
87
};
88
}
// namespace mzcbor
89
}
// namespace cbor
90
}
// namespace pappso
91
pappso::UiMonitorInterface
Definition
uimonitorinterface.h:50
pappso::cbor::mzcbor::MzcborBuildIndexReader::readSpectrumListAndLeave
void readSpectrumListAndLeave()
only the spectrum list of targeted msrun, then stop parsing
Definition
mzcborbuildindexreader.cpp:121
pappso::cbor::mzcbor::MzcborBuildIndexReader::mcsp_msRunId
MsRunIdCstSPtr mcsp_msRunId
Definition
mzcborbuildindexreader.h:82
pappso::cbor::mzcbor::MzcborBuildIndexReader::m_spectrumIndexPositionInFile
std::vector< qint64 > m_spectrumIndexPositionInFile
Definition
mzcborbuildindexreader.h:85
pappso::cbor::mzcbor::MzcborBuildIndexReader::m_nativeId2SpectrumIndexMap
std::map< QString, std::size_t > m_nativeId2SpectrumIndexMap
Definition
mzcborbuildindexreader.h:86
pappso::cbor::mzcbor::MzcborBuildIndexReader::getSpectrumIndexPositionInFile
const std::vector< qint64 > & getSpectrumIndexPositionInFile() const
Definition
mzcborbuildindexreader.cpp:70
pappso::cbor::mzcbor::MzcborBuildIndexReader::m_xmlMzMlRunId
QString m_xmlMzMlRunId
Definition
mzcborbuildindexreader.h:83
pappso::cbor::mzcbor::MzcborBuildIndexReader::readMsrun
virtual void readMsrun() override
read only the targeted msrun
Definition
mzcborbuildindexreader.cpp:81
pappso::cbor::mzcbor::MzcborBuildIndexReader::readCbor
virtual void readCbor(QFile *cborp, pappso::UiMonitorInterface &monitor) override
read mzCBOR file
Definition
mzcborbuildindexreader.cpp:51
pappso::cbor::mzcbor::MzcborBuildIndexReader::getNativeId2SpectrumIndexMap
const std::map< QString, std::size_t > & getNativeId2SpectrumIndexMap() const
Definition
mzcborbuildindexreader.cpp:76
pappso::cbor::mzcbor::MzcborBuildIndexReader::MzcborBuildIndexReader
MzcborBuildIndexReader(const MsRunIdCstSPtr &msrun_id)
Definition
mzcborbuildindexreader.cpp:39
pappso::cbor::mzcbor::MzcborBuildIndexReader::readSpectrum
void readSpectrum(qint64 position_of_spectrum_in_file, std::size_t index_count)
read each spectrum in the targeted msrun (msrunId)
Definition
mzcborbuildindexreader.cpp:178
pappso::cbor::mzcbor::MzcborReaderBase::MzcborReaderBase
MzcborReaderBase()
Definition
mzcborreaderbase.cpp:31
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::cbor::mzcbor
Definition
binarydataarray.h:41
pappso::cbor
Definition
cborstreamreader.cpp:35
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
mzcborbuildindexreader.h
Generated on
for libpappsomspp by
1.17.0