libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
spectrumtube.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/core/processing/cbor/mzcbor/copyreplace/spectrumtube.h
3
* \date 3/10/2026
4
* \author Olivier Langella
5
* \brief buffer to store a whole spectrum list
6
* */
7
8
/*******************************************************************************
9
* Copyright (c) 2026 Olivier Langella <Olivier.Langella@cnrs.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
#include <QString>
31
#include <QDebug>
32
#include <QTemporaryFile>
33
#include <cstddef>
34
#include "
qcborspectrum.h
"
35
#include "
pappsomspp/core/processing/cbor/cborstreamwriter.h
"
36
#include "
pappsomspp/export-import-config.h
"
37
38
39
namespace
pappso
40
{
41
namespace
cbor
42
{
43
namespace
mzcbor
44
{
45
/**
46
* @todo write docs
47
*/
48
class
PMSPP_LIB_DECL
SpectrumTube
49
{
50
public
:
51
SpectrumTube
();
52
virtual
~SpectrumTube
();
53
// void decodeTrace(pappso::Trace &trace) const;
54
const
QString
push_back
(
QcborSpectrum
&spectrum);
55
56
void
flush
(
pappso::cbor::CborStreamWriter
*cbor_writer_p);
57
58
std::size_t
size
()
const
;
59
60
private
:
61
void
writeQcborSpectrumInBuffer
(
const
QcborSpectrum
&spectrum,
const
QString &old_native_id);
62
63
private
:
64
std::size_t
m_size
= 0;
65
QTemporaryFile *
mpa_buffer
=
nullptr
;
66
pappso::cbor::CborStreamWriter
*
mpa_bufferWriter
=
nullptr
;
67
};
68
}
// namespace mzcbor
69
}
// namespace cbor
70
}
// namespace pappso
cborstreamwriter.h
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition
cborstreamwriter.h:46
pappso::cbor::mzcbor::QcborSpectrum
Definition
qcborspectrum.h:48
pappso::cbor::mzcbor::SpectrumTube::mpa_buffer
QTemporaryFile * mpa_buffer
Definition
spectrumtube.h:65
pappso::cbor::mzcbor::SpectrumTube::size
std::size_t size() const
Definition
spectrumtube.cpp:64
pappso::cbor::mzcbor::SpectrumTube::writeQcborSpectrumInBuffer
void writeQcborSpectrumInBuffer(const QcborSpectrum &spectrum, const QString &old_native_id)
Definition
spectrumtube.cpp:104
pappso::cbor::mzcbor::SpectrumTube::m_size
std::size_t m_size
Definition
spectrumtube.h:64
pappso::cbor::mzcbor::SpectrumTube::push_back
const QString push_back(QcborSpectrum &spectrum)
Definition
spectrumtube.cpp:69
pappso::cbor::mzcbor::SpectrumTube::mpa_bufferWriter
pappso::cbor::CborStreamWriter * mpa_bufferWriter
Definition
spectrumtube.h:66
pappso::cbor::mzcbor::SpectrumTube::flush
void flush(pappso::cbor::CborStreamWriter *cbor_writer_p)
Definition
spectrumtube.cpp:170
pappso::cbor::mzcbor::SpectrumTube::SpectrumTube
SpectrumTube()
Definition
spectrumtube.cpp:43
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
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
qcborspectrum.h
Low level CBOR map to store an mzCBOR Spectrum object.
pappsomspp
core
processing
cbor
mzcbor
copyreplace
spectrumtube.h
Generated on
for libpappsomspp by
1.17.0