libpappsomspp
Library for mass spectrometry
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"
37
38
39namespace pappso
40{
41namespace cbor
42{
43namespace mzcbor
44{
45/**
46 * @todo write docs
47 */
49{
50 public:
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;
67};
68} // namespace mzcbor
69} // namespace cbor
70} // namespace pappso
overrides QCborStreamWriter base class to provide convenient functions
void writeQcborSpectrumInBuffer(const QcborSpectrum &spectrum, const QString &old_native_id)
const QString push_back(QcborSpectrum &spectrum)
pappso::cbor::CborStreamWriter * mpa_bufferWriter
void flush(pappso::cbor::CborStreamWriter *cbor_writer_p)
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
Low level CBOR map to store an mzCBOR Spectrum object.