libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
cboroutputstream.h
Go to the documentation of this file.
1
2/**
3 * \file pappsomspp/masschroq/output/cboroutputstream.h
4 * \date 02/01/2025
5 * \author Olivier Langella
6 * \brief quantification result cbor writer for MassChroqLight
7 */
8
9/*******************************************************************************
10 * Copyright (c) 2025 Olivier Langella
11 *<Olivier.Langella@universite-paris-saclay.fr>.
12 *
13 * This file is part of MassChroQ.
14 *
15 * MassChroQ is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation, either version 3 of the License, or
18 * (at your option) any later version.
19 *
20 * MassChroQ is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with MassChroQ. If not, see <http://www.gnu.org/licenses/>.
27 *
28 ******************************************************************************/
29
30#pragma once
31
32#include <QStringList>
34#include <QJsonObject>
35#include "../msrun.h"
36#include "../msrunpeptidelist.h"
42
43
44namespace pappso::masschroq
45{
46
47/**
48 * @todo write docs
49 */
51{
52 public:
53 /**
54 * Default constructor
55 */
56 CborOutputStream(QIODevice *device);
57
58 /**
59 * Destructor
60 */
61 virtual ~CborOutputStream();
62
63 /** @brief set trace output flag
64 * */
65 void setIsTraceOutput(bool is_trace_output);
66
67
68 /** @brief set peak shape output flag
69 * */
70 void setIsPeakShapeOutput(bool is_shape_output, double margin_in_seconds);
71
72 void writeJsonObject(const QString &name, const QJsonObject &json_object);
73
74 void writeProjectParameters(const pappso::ProjectParameters &project_parameters);
75
76
77 void writeActionBegin(const QString &operation);
78
79 void close();
80
81
82 QCborStreamWriter &getCborStreamWriter();
83
84
86 const MsRunPeptideList &msrun_peptide_list,
87 bool is_mbr);
88
89 void writeMsRunRetentionTime(const pappso::Trace &report_common_ms2,
90 const pappso::MsRunRetentionTime<QString> &msrun_retention_time);
91
92 private:
93 void
94 writeMbrPeptideMeasurements(const MbrPeptideMeasurements &peptide_measurements,
95 const pappso::MsRunRetentionTime<QString> *msrun_retention_time_p);
96
98 const pappso::MsRunRetentionTime<QString> *msrun_retention_time_p);
99 void writeTrace(const pappso::Trace &trace);
100 void writeVectorDouble(const std::vector<double> &vector);
101 void writeTracePeak(const pappso::TracePeak &peak,
102 const pappso::MsRunRetentionTime<QString> *msrun_retention_time_p);
103 void writeActionEnd();
104
105
106 void writeMsRun(const MsRun &msrun);
107
108 void writePeptideMeasurements(const PeptideMeasurements &peptide_measurements,
109 const pappso::MsRunRetentionTime<QString> *msrun_retention_time_p);
110
111
112 private:
114 bool m_isTraceOutput = false;
117
119};
120} // namespace pappso::masschroq
A simple container of DataPoint instances.
Definition trace.h:148
void setIsTraceOutput(bool is_trace_output)
set trace output flag
void writeMbrPeptideMeasurements(const MbrPeptideMeasurements &peptide_measurements, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
void setIsPeakShapeOutput(bool is_shape_output, double margin_in_seconds)
set peak shape output flag
pappso::cbor::CborStreamWriter * mpa_writer
void writeJsonObject(const QString &name, const QJsonObject &json_object)
void writeTrace(const pappso::Trace &trace)
void writeMeasurement(const PeptideMeasurements::Measurement &measurement, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
void writeProjectParameters(const pappso::ProjectParameters &project_parameters)
void writeMsRunRetentionTime(const pappso::Trace &report_common_ms2, const pappso::MsRunRetentionTime< QString > &msrun_retention_time)
void writeVectorDouble(const std::vector< double > &vector)
void writeActionBegin(const QString &operation)
void writeTracePeak(const pappso::TracePeak &peak, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
void writeQrDataBlock(pappso::UiMonitorInterface &m_uiMonitor, const MsRunPeptideList &msrun_peptide_list, bool is_mbr)
void writePeptideMeasurements(const PeptideMeasurements &peptide_measurements, const pappso::MsRunRetentionTime< QString > *msrun_retention_time_p)
#define PMSPP_LIB_DECL