libpappsomspp
Library for mass spectrometry
psmfilescanprocess.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/processing/cbor/psm/psmfilescanprocess.h
3 * \date 12/07/2025
4 * \author Olivier Langella
5 * \brief PSM file reader designed to parallelize scan process
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#pragma once
28
29#include "psmfilereaderbase.h"
30#include <QTemporaryDir>
31#include <QCborMap>
32#include "cborscanmapbase.h"
33
34namespace pappso::cbor::psm
35{
36/**
37 * @brief Basic PSM file reader to process scan (parallelized scan processing)
38 */
40
41{
43
44 public:
45 /**
46 * Default constructor
47 */
48 PsmFileScanProcess(std::size_t buffer_scan_size);
49
50 /**
51 * Destructor
52 */
53 virtual ~PsmFileScanProcess();
54
55 protected:
56 void readScan(pappso::UiMonitorInterface &monitor) override;
57 void scanFinished(pappso::UiMonitorInterface &monitor) override;
58 void sampleFinished(pappso::UiMonitorInterface &monitor) override;
59 virtual void processBufferScan(pappso::UiMonitorInterface &monitor);
62 void clearScanBuffer();
63
64
65 protected:
66 std::size_t m_bufferScanSize = 1000;
67 std::vector<CborScanMapBase *> m_cborScanList;
68};
69} // namespace pappso::cbor::psm
Base class to handle scan cbor map.
Basic PSM file reader to process scan (parallelized scan processing)
std::vector< CborScanMapBase * > m_cborScanList
void scanFinished(pappso::UiMonitorInterface &monitor) override
void readScan(pappso::UiMonitorInterface &monitor) override
void sampleFinished(pappso::UiMonitorInterface &monitor) override
virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor)
PsmFileScanProcess(std::size_t buffer_scan_size)
virtual void processBufferScan(pappso::UiMonitorInterface &monitor)
virtual CborScanMapBase * newCborScanMap()=0
Base class to read CBOR PSM file.