Loading...
Searching...
No Matches
msrunslice.h
Go to the documentation of this file.
/**
* \file pappsomspp/xicextractor/private/msrunslice.h
* \date 12/05/2018
* \author Olivier Langella
* \brief one mz slice (1 dalton) of an MsRun
*/
/*******************************************************************************
* 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 "pappsomspp/core/massspectrum/massspectrum.h"
#include <QDataStream>
namespace pappso
{
class MsRunSlice;
typedef std::shared_ptr<const MsRunSlice> MsRunSliceSPtr;
class MsRunSlice
{
public:
MsRunSlice();
MsRunSlice(const MsRunSlice &other);
virtual ~MsRunSlice();
MsRunSliceSPtr makeMsRunSliceSp() const;
void setSliceNumber(unsigned int slice_number);
unsigned int getSliceNumber() const;
void clear();
std::size_t size() const;
/** @brief set number of spectrum (mz/intensity) stored in this slice
*/
void setSize(std::size_t size);
void appendToStream(QDataStream &stream, std::size_t ipos) const;
const MassSpectrum &getSpectrum(std::size_t i) const;
MassSpectrum &getSpectrum(std::size_t i);
/** @brief set the mass spectrum for a given index (retention time)
*/
void setSpectrum(std::size_t i, const MassSpectrum &spectrum);
private:
unsigned int m_sliceNumber = 0;
std::vector<MassSpectrum> m_spectrumList;
};
QDataStream &operator>>(QDataStream &instream, MsRunSlice &slice);
} // namespace pappso
pappso::MassSpectrum
Class to represent a mass spectrum.
Definition massspectrum.h:70
pappso::MsRunSlice
Definition msrunslice.h:43
pappso::MsRunSlice::getSpectrum
const MassSpectrum & getSpectrum(std::size_t i) const
Definition msrunslice.cpp:126
pappso::MsRunSlice::~MsRunSlice
virtual ~MsRunSlice()
Definition msrunslice.cpp:52
pappso::MsRunSlice::m_sliceNumber
unsigned int m_sliceNumber
Definition msrunslice.h:73
pappso::MsRunSlice::MsRunSlice
MsRunSlice()
Definition msrunslice.cpp:42
pappso::MsRunSlice::makeMsRunSliceSp
MsRunSliceSPtr makeMsRunSliceSp() const
Definition msrunslice.cpp:57
pappso::MsRunSlice::setSpectrum
void setSpectrum(std::size_t i, const MassSpectrum &spectrum)
set the mass spectrum for a given index (retention time)
Definition msrunslice.cpp:93
pappso::MsRunSlice::setSliceNumber
void setSliceNumber(unsigned int slice_number)
Definition msrunslice.cpp:63
pappso::MsRunSlice::appendToStream
void appendToStream(QDataStream &stream, std::size_t ipos) const
Definition msrunslice.cpp:143
pappso::MsRunSlice::clear
void clear()
Definition msrunslice.cpp:86
pappso::MsRunSlice::getSliceNumber
unsigned int getSliceNumber() const
Definition msrunslice.cpp:69
pappso::MsRunSlice::setSize
void setSize(std::size_t size)
set number of spectrum (mz/intensity) stored in this slice
Definition msrunslice.cpp:81
pappso::MsRunSlice::size
std::size_t size() const
Definition msrunslice.cpp:75
pappso::MsRunSlice::m_spectrumList
std::vector< MassSpectrum > m_spectrumList
Definition msrunslice.h:74
massspectrum.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::operator>>
QDataStream & operator>>(QDataStream &instream, MassSpectrum &massSpectrum)
Definition massspectrum.cpp:353
pappso::MsRunSliceSPtr
std::shared_ptr< const MsRunSlice > MsRunSliceSPtr
Definition msrunslice.h:40