libpappsomspp
Library for mass spectrometry
msrunxicextractordiskbuffer.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/xicextractor/private/msrunxicextractordiskbuffer.h
3  * \date 18/05/2018
4  * \author Olivier Langella
5  * \brief proteowizard based XIC extractor featuring disk cache + write buffer
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.fr>.
10  *
11  * This file is part of the PAPPSOms++ library.
12  *
13  * PAPPSOms++ 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++ 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++. If not, see <http://www.gnu.org/licenses/>.
25  *
26  * Contributors:
27  * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
28  *implementation
29  ******************************************************************************/
30 
31 
32 #pragma once
33 
34 
35 #include "msrunxicextractordisk.h"
36 
37 
38 class MsRunXicExtractorFactory;
39 
40 namespace pappso
41 {
42 
44 {
46 
47  public:
50 
51  protected:
53  const QDir &temporary_dir);
54 
55  virtual void storeSlices(std::map<unsigned int, MassSpectrum> &slice_vector,
56  std::size_t ipos) override;
57  void appendSliceInBuffer(unsigned int slice_number,
58  MassSpectrum &spectrum,
59  std::size_t ipos);
60 
61  void flushBufferOnDisk();
62  virtual void endPwizRead() override;
63 
64 
65  protected:
66  std::map<unsigned int, QByteArray> m_sliceBufferMap;
67 
68  std::size_t m_bufferSize = 0;
69  std::size_t m_bufferMaxSize = 150;
70 };
71 
72 
73 } // namespace pappso
Class to represent a mass spectrum.
Definition: massspectrum.h:71
void appendSliceInBuffer(unsigned int slice_number, MassSpectrum &spectrum, std::size_t ipos)
std::map< unsigned int, QByteArray > m_sliceBufferMap
MsRunXicExtractorDiskBuffer(const MsRunXicExtractorDiskBuffer &other)
virtual void storeSlices(std::map< unsigned int, MassSpectrum > &slice_vector, std::size_t ipos) override
store MassSpectrum slices (by daltons) for a given retention time
MsRunReader based XIC extractor featuring disk cache.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition: msrunreader.h:185