pappso::MassSpectrumId Class Reference

`#include <massspectrumid.h>`

## Public Member Functions

| MassSpectrumId ()
| MassSpectrumId (const MsRunIdCstSPtr &msrun_id)
| MassSpectrumId (const MsRunIdCstSPtr &msrun_id, std::size_t spectrum_index)
| MassSpectrumId (const MassSpectrumId &other)
| ~MassSpectrumId ()
MassSpectrumId & | operator= (const MassSpectrumId &other)
void | setMsRunId (MsRunIdCstSPtr other)
const MsRunIdCstSPtr & | getMsRunIdCstSPtr () const
void | setNativeId (const QString &native_id)
const QString & | getNativeId () const
void | setSpectrumIndex (std::size_t index)
std::size_t | getSpectrumIndex () const
bool | operator== (const MassSpectrumId &other) const
bool | isValid () const
QString | toString () const

## Private Attributes

MsRunIdCstSPtr | mcsp_msRunId = nullptr
QString | m_nativeId
std::size_t | m_spectrumIndex = std::numeric_limits<std::size_t>::max()

## Detailed Description

Definition at line 39 of file massspectrumid.h.

## Constructor & Destructor Documentation

## MassSpectrumId() [1/4]

pappso::MassSpectrumId::MassSpectrumId | ( |  | ) |

Definition at line 34 of file massspectrumid.cpp.

{
}

## MassSpectrumId() [2/4]

pappso::MassSpectrumId::MassSpectrumId | ( | const MsRunIdCstSPtr & | msrun_id | ) |

Definition at line 39 of file massspectrumid.cpp.

: mcsp_msRunId(msRunId)
{
}
pappso::MassSpectrumId::mcsp_msRunId
MsRunIdCstSPtr mcsp_msRunId
Definition: massspectrumid.h:42

## MassSpectrumId() [3/4]

pappso::MassSpectrumId::MassSpectrumId | ( | const MsRunIdCstSPtr & | msrun_id,
|  | std::size_t | spectrum_index
| ) |  |

Definition at line 45 of file massspectrumid.cpp.

: mcsp_msRunId(msRunId), m_nativeId(""), m_spectrumIndex(spectrum_index)
{
}
pappso::MassSpectrumId::m_spectrumIndex
std::size_t m_spectrumIndex
Definition: massspectrumid.h:56
pappso::MassSpectrumId::m_nativeId
QString m_nativeId
Definition: massspectrumid.h:51

## MassSpectrumId() [4/4]

pappso::MassSpectrumId::MassSpectrumId | ( | const MassSpectrumId & | other | ) |

Definition at line 52 of file massspectrumid.cpp.

: mcsp_msRunId(other.mcsp_msRunId),
m_nativeId(other.m_nativeId),
m_spectrumIndex(other.m_spectrumIndex)
{
}

## ~MassSpectrumId()

pappso::MassSpectrumId::~MassSpectrumId | ( |  | ) |

Definition at line 60 of file massspectrumid.cpp.

{
}

## Member Function Documentation

## getMsRunIdCstSPtr()

const MsRunIdCstSPtr & pappso::MassSpectrumId::getMsRunIdCstSPtr | ( |  | ) | const

Definition at line 85 of file massspectrumid.cpp.

{
return mcsp_msRunId;
};

References mcsp_msRunId.

Referenced by pappso::MgfOutput::write().

## getNativeId()

const QString & pappso::MassSpectrumId::getNativeId | ( |  | ) | const

Definition at line 99 of file massspectrumid.cpp.

{
return m_nativeId;
}

References m_nativeId.

Referenced by pappso::MzxmlOutput::getScanNumber(), pappso::MsRunReaderScanNumberMultiMap::setQualifiedMassSpectrum(), and pappso::MsRunReaderRetentionTimeLine::setQualifiedMassSpectrum().

## getSpectrumIndex()

std::size_t pappso::MassSpectrumId::getSpectrumIndex | ( |  | ) | const

Definition at line 113 of file massspectrumid.cpp.

{
return m_spectrumIndex;
}

References m_spectrumIndex.

Referenced by pappso::MzxmlOutput::getScanNumber(), pappso::TimsMsRunReaderMs2::newXicCoordSPtrFromQualifiedMassSpectrum(), pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), pappso::MsRunReaderScanNumberMultiMap::setQualifiedMassSpectrum(), and pappso::MgfOutput::write().

## isValid()

bool pappso::MassSpectrumId::isValid | ( |  | ) | const

Definition at line 127 of file massspectrumid.cpp.

{
return mcsp_msRunId->isValid() &&
m_spectrumIndex != std::numeric_limits<std::size_t>::max();
}

References m_spectrumIndex, and mcsp_msRunId.

## operator=()

MassSpectrumId & pappso::MassSpectrumId::operator= | ( | const MassSpectrumId & | other | ) |

Definition at line 66 of file massspectrumid.cpp.

{
mcsp_msRunId = other.mcsp_msRunId;
m_spectrumIndex = other.m_spectrumIndex;
m_nativeId = other.m_nativeId;
return *this;
}

References m_nativeId, m_spectrumIndex, and mcsp_msRunId.

## operator==()

bool pappso::MassSpectrumId::operator== | ( | const MassSpectrumId & | other | ) | const

Definition at line 120 of file massspectrumid.cpp.

{
return (mcsp_msRunId == other.mcsp_msRunId &&
m_spectrumIndex == other.m_spectrumIndex);
}

References m_spectrumIndex, and mcsp_msRunId.

## setMsRunId()

void pappso::MassSpectrumId::setMsRunId | ( | MsRunIdCstSPtr | other | ) |

Definition at line 77 of file massspectrumid.cpp.

{
mcsp_msRunId = other;
};

References mcsp_msRunId.

Referenced by pappso::TimsData::getQualifiedMassSpectrumByRawIndex(), pappso::TimsData::getQualifiedMs1MassSpectrumByPrecursorId(), pappso::TimsData::getQualifiedMs2MassSpectrumByPrecursorId(), and pappso::TimsData::rawReaderSpectrumCollectionByMsLevel().

## setNativeId()

void pappso::MassSpectrumId::setNativeId | ( | const QString & | native_id | ) |

Definition at line 92 of file massspectrumid.cpp.

{
m_nativeId = native_id;
}

References m_nativeId.

Referenced by pappso::TimsData::getQualifiedMassSpectrumByRawIndex(), pappso::TimsData::getQualifiedMs1MassSpectrumByPrecursorId(), pappso::TimsData::getQualifiedMs2MassSpectrumByPrecursorId(), pappso::PwizMsRunReader::qualifiedMassSpectrumFromPwizMSData(), pappso::TimsData::rawReaderSpectrumCollectionByMsLevel(), and pappso::PwizMsRunReader::readSpectrumCollectionByMsLevel().

## setSpectrumIndex()

void pappso::MassSpectrumId::setSpectrumIndex | ( | std::size_t | index | ) |

Definition at line 106 of file massspectrumid.cpp.

{
m_spectrumIndex = index;
}

References m_spectrumIndex.

Referenced by pappso::TimsData::getQualifiedMassSpectrumByRawIndex(), pappso::TimsData::getQualifiedMs1MassSpectrumByPrecursorId(), pappso::TimsData::getQualifiedMs2MassSpectrumByPrecursorId(), pappso::PwizMsRunReader::qualifiedMassSpectrumFromPwizMSData(), and pappso::TimsData::rawReaderSpectrumCollectionByMsLevel().

## toString()

QString pappso::MassSpectrumId::toString | ( |  | ) | const

Definition at line 135 of file massspectrumid.cpp.

{
return QString(
"ms run id: %1 \n"
"native id: %2 \n"
"m_spectrumIndex: %3\n")
.arg(mcsp_msRunId != nullptr ? mcsp_msRunId->toString() : "nullptr")
.arg(m_nativeId)
.arg(m_spectrumIndex);
}

References m_nativeId, m_spectrumIndex, and mcsp_msRunId.

Referenced by pappso::QualifiedMassSpectrum::toString().

## Member Data Documentation

## m_nativeId

QString pappso::MassSpectrumId::m_nativeId

private

Definition at line 51 of file massspectrumid.h.

Referenced by getNativeId(), operator=(), setNativeId(), and toString().

## m_spectrumIndex

std::size_t pappso::MassSpectrumId::m_spectrumIndex = std::numeric_limits<std::size_t>::max()

private

Definition at line 56 of file massspectrumid.h.

Referenced by getSpectrumIndex(), isValid(), operator=(), operator==(), setSpectrumIndex(), and toString().

## mcsp_msRunId

MsRunIdCstSPtr pappso::MassSpectrumId::mcsp_msRunId = nullptr

private

Definition at line 42 of file massspectrumid.h.

Referenced by getMsRunIdCstSPtr(), isValid(), operator=(), operator==(), setMsRunId(), and toString().

The documentation for this class was generated from the following files:

- pappsomspp/massspectrum/massspectrumid.h
- pappsomspp/massspectrum/massspectrumid.cpp