Loading...
Searching...
No Matches
msrunxicextractordiskbuffer.h
Go to the documentation of this file.
/**
* \file pappsomspp/xicextractor/private/msrunxicextractordiskbuffer.h
* \date 18/05/2018
* \author Olivier Langella
* \brief proteowizard based XIC extractor featuring disk cache + write buffer
*/
/*******************************************************************************
* Copyright (c) 2018 Olivier Langella <Olivier.Langella@u-psud.fr>.
*
* This file is part of the PAPPSOms++ library.
*
* PAPPSOms++ is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms++ is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
* Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
*implementation
******************************************************************************/
#pragma once
#include "msrunxicextractordisk.h"
class MsRunXicExtractorFactory;
namespace pappso
{
class MsRunXicExtractorDiskBuffer : public MsRunXicExtractorDisk
{
friend MsRunXicExtractorFactory;
public:
MsRunXicExtractorDiskBuffer(const MsRunXicExtractorDiskBuffer &other);
virtual ~MsRunXicExtractorDiskBuffer();
protected:
MsRunXicExtractorDiskBuffer(MsRunReaderSPtr &msrun_reader,
const QDir &temporary_dir);
virtual void storeSlices(std::map<unsigned int, MassSpectrum> &slice_vector,
std::size_t ipos) override;
void appendSliceInBuffer(unsigned int slice_number,
MassSpectrum &spectrum,
std::size_t ipos);
void flushBufferOnDisk();
virtual void endPwizRead() override;
protected:
std::map<unsigned int, QByteArray> m_sliceBufferMap;
std::size_t m_bufferSize = 0;
std::size_t m_bufferMaxSize = 150;
};
} // namespace pappso
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition massspectrum.h:70
pappso::MsRunXicExtractorDiskBuffer::m_bufferMaxSize
std::size_t m_bufferMaxSize
Definition msrunxicextractordiskbuffer.h:69
pappso::MsRunXicExtractorDiskBuffer::endPwizRead
virtual void endPwizRead() override
Definition msrunxicextractordiskbuffer.cpp:196
pappso::MsRunXicExtractorDiskBuffer::m_bufferSize
std::size_t m_bufferSize
Definition msrunxicextractordiskbuffer.h:68
pappso::MsRunXicExtractorDiskBuffer::appendSliceInBuffer
void appendSliceInBuffer(unsigned int slice_number, MassSpectrum &spectrum, std::size_t ipos)
Definition msrunxicextractordiskbuffer.cpp:77
pappso::MsRunXicExtractorDiskBuffer::m_sliceBufferMap
std::map< unsigned int, QByteArray > m_sliceBufferMap
Definition msrunxicextractordiskbuffer.h:66
pappso::MsRunXicExtractorDiskBuffer::flushBufferOnDisk
void flushBufferOnDisk()
Definition msrunxicextractordiskbuffer.cpp:126
pappso::MsRunXicExtractorDiskBuffer::MsRunXicExtractorFactory
friend MsRunXicExtractorFactory
Definition msrunxicextractordiskbuffer.h:45
pappso::MsRunXicExtractorDiskBuffer::~MsRunXicExtractorDiskBuffer
virtual ~MsRunXicExtractorDiskBuffer()
Definition msrunxicextractordiskbuffer.cpp:55
pappso::MsRunXicExtractorDiskBuffer::MsRunXicExtractorDiskBuffer
MsRunXicExtractorDiskBuffer(const MsRunXicExtractorDiskBuffer &other)
Definition msrunxicextractordiskbuffer.cpp:48
pappso::MsRunXicExtractorDiskBuffer::storeSlices
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
Definition msrunxicextractordiskbuffer.cpp:60
pappso::MsRunXicExtractorDisk::MsRunXicExtractorDisk
MsRunXicExtractorDisk(MsRunReaderSPtr &msrun_reader)
msrunxicextractordisk.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::MsRunReaderSPtr
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition msrunreader.h:57