Loading...
Searching...
No Matches
pappso::MsRunXicExtractorFactory Class Reference

factory to build different kinds of XIC extractors More...

`#include <msrunxicextractorfactory.h>`

## Public Member Functions

MsRunXicExtractorInterfaceSp | buildMsRunXicExtractorSp (MsRunReaderSPtr &msrun_reader) const
| build a simple XIC extractor that directly uses Proeowizard library to read and extract XICs building the xic extractor is fast, but extracting each XIC is slow
void | setTmpDir (const QString &dir_name)
| set the temporary working directory
void | setMsRunXicExtractorFactoryType (pappso::MsRunXicExtractorFactoryType type)
| sets the xic extractor type

## Static Public Member Functions

static MsRunXicExtractorFactory & | getInstance ()
| singleton to get the only instance of the factory

## Private Member Functions

| MsRunXicExtractorFactory ()
virtual | ~MsRunXicExtractorFactory ()

## Private Attributes

QString | m_tmpDirName
MsRunXicExtractorFactoryType | m_type = MsRunXicExtractorFactoryType::nose

## Static Private Attributes

static MsRunXicExtractorFactory | m_instance

## Detailed Description

factory to build different kinds of XIC extractors

Definition at line 67 of file msrunxicextractorfactory.h.

## Constructor & Destructor Documentation

## MsRunXicExtractorFactory()

pappso::MsRunXicExtractorFactory::MsRunXicExtractorFactory | ( |  | ) |

private

Definition at line 52 of file msrunxicextractorfactory.cpp.

{
}

## ~MsRunXicExtractorFactory()

pappso::MsRunXicExtractorFactory::~MsRunXicExtractorFactory | ( |  | ) |

private virtual

Definition at line 55 of file msrunxicextractorfactory.cpp.

{
}

## Member Function Documentation

## buildMsRunXicExtractorSp()

MsRunXicExtractorInterfaceSp pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorSp | ( | MsRunReaderSPtr & | msrun_reader | ) | const

build a simple XIC extractor that directly uses Proeowizard library to read and extract XICs building the xic extractor is fast, but extracting each XIC is slow

Parameters

  msrun_reader | the MsRun reader on which the XIC extractor will run

Definition at line 72 of file msrunxicextractorfactory.cpp.

{
pappso::TimsMsRunReaderMs2 *tims2_reader =
dynamic_cast<pappso::TimsMsRunReaderMs2 *>(msrun_reader.get());
if(tims2_reader == nullptr)
{
// NO TIMS
if((m_type == MsRunXicExtractorFactoryType::nose) ||
(m_type == MsRunXicExtractorFactoryType::direct))
{
std::shared_ptr<MsRunXicExtractor> msrun_xic_extractor_sp =
std::make_shared<MsRunXicExtractor>(
MsRunXicExtractor(msrun_reader));
return (msrun_xic_extractor_sp);
}
else if(m_type == MsRunXicExtractorFactoryType::disk)
{
std::shared_ptr<MsRunXicExtractorDisk> msrun_xic_extractor_sp =
std::make_shared<MsRunXicExtractorDisk>(
MsRunXicExtractorDisk(msrun_reader, QDir(m_tmpDirName)));
msrun_xic_extractor_sp.get()->prepareExtractor();
return (msrun_xic_extractor_sp);
}
else if(m_type == MsRunXicExtractorFactoryType::diskbuffer)
{
std::shared_ptr<MsRunXicExtractorDiskBuffer> msrun_xic_extractor_sp =
std::make_shared<MsRunXicExtractorDiskBuffer>(
MsRunXicExtractorDiskBuffer(msrun_reader, QDir(m_tmpDirName)));
msrun_xic_extractor_sp.get()->prepareExtractor();
return (msrun_xic_extractor_sp);
}
}
else
{
// TIMS
std::shared_ptr<TimsDirectXicExtractor> msrun_xic_extractor_sp =
std::make_shared<TimsDirectXicExtractor>(msrun_reader);
return (msrun_xic_extractor_sp);
}
return nullptr;
}
pappso::MsRunXicExtractorFactory::m_type
MsRunXicExtractorFactoryType m_type
Definition msrunxicextractorfactory.h:99
pappso::MsRunXicExtractorFactory::m_tmpDirName
QString m_tmpDirName
Definition msrunxicextractorfactory.h:98
pappso::TimsMsRunReaderMs2
Definition timsmsrunreaderms2.h:39
pappso::MsRunXicExtractorFactoryType::diskbuffer
@ diskbuffer
pappso::MsRunXicExtractorFactoryType::nose
@ nose
default factory
pappso::MsRunXicExtractorFactoryType::disk
@ disk
pappso::MsRunXicExtractorFactoryType::direct
@ direct

References pappso::direct, pappso::disk, pappso::diskbuffer, m_tmpDirName, m_type, and pappso::nose.

## getInstance()

MsRunXicExtractorFactory & pappso::MsRunXicExtractorFactory::getInstance | ( |  | ) |

static

singleton to get the only instance of the factory

Definition at line 46 of file msrunxicextractorfactory.cpp.

{
return m_instance;
}
pappso::MsRunXicExtractorFactory::m_instance
static MsRunXicExtractorFactory m_instance
Definition msrunxicextractorfactory.h:97

References m_instance.

## setMsRunXicExtractorFactoryType()

void pappso::MsRunXicExtractorFactory::setMsRunXicExtractorFactoryType | ( | pappso::MsRunXicExtractorFactoryType | type | ) |

sets the xic extractor type

Parameters

  type | see the documentation of enumerations

Definition at line 65 of file msrunxicextractorfactory.cpp.

{
m_type = type;
}

References m_type.

## setTmpDir()

void pappso::MsRunXicExtractorFactory::setTmpDir | ( | const QString & | dir_name | ) |

set the temporary working directory

Definition at line 60 of file msrunxicextractorfactory.cpp.

{
m_tmpDirName = dir_name;
}

References m_tmpDirName.

## Member Data Documentation

## m_instance

MsRunXicExtractorFactory pappso::MsRunXicExtractorFactory::m_instance

static private

Initial value:
=
MsRunXicExtractorFactory()
pappso::MsRunXicExtractorFactory::MsRunXicExtractorFactory
MsRunXicExtractorFactory()
Definition msrunxicextractorfactory.cpp:52

Definition at line 97 of file msrunxicextractorfactory.h.

Referenced by getInstance().

## m_tmpDirName

QString pappso::MsRunXicExtractorFactory::m_tmpDirName

private

Definition at line 98 of file msrunxicextractorfactory.h.

Referenced by buildMsRunXicExtractorSp(), and setTmpDir().

## m_type

MsRunXicExtractorFactoryType pappso::MsRunXicExtractorFactory::m_type = MsRunXicExtractorFactoryType::nose

private

Definition at line 99 of file msrunxicextractorfactory.h.

Referenced by buildMsRunXicExtractorSp(), and setMsRunXicExtractorFactoryType().

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

- pappsomspp/xicextractor/msrunxicextractorfactory.h
- pappsomspp/xicextractor/msrunxicextractorfactory.cpp