libpappsomspp
Library for mass spectrometry
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 More...
 
MsRunXicExtractorInterfaceSp buildMsRunXicExtractorDiskSp (MsRunReaderSPtr &msrun_reader) const
 build Xic extractor that first read the whole MsRun, put it on disk and extract XICs more quickly This needs some space on disk to store slices (1 dalton each) building the XIC extractor is slow extracting XIC from slices is a very quick operation More...
 
MsRunXicExtractorInterfaceSp buildMsRunXicExtractorDiskBufferSp (MsRunReaderSPtr &msrun_reader) const
 build Xic extractor that first read the whole MsRun, put it on disk using a write cache and extract XICs more quickly This needs some space on disk to store slices (1 dalton each) building the XIC extractor is slower than buildMsRunXicExtractorPwizSp, but faster than buildMsRunXicExtractorDiskSp extracting XIC from slices is a very quick operation More...
 
void setTmpDir (const QString &dir_name)
 set the temporary working directory More...
 

Static Public Member Functions

static MsRunXicExtractorFactorygetInstance ()
 singleton to get the only instance of the factory More...
 

Private Member Functions

 MsRunXicExtractorFactory ()
 
virtual ~MsRunXicExtractorFactory ()
 

Private Attributes

QString m_tmpDirName
 

Static Private Attributes

static MsRunXicExtractorFactory m_instance
 

Detailed Description

factory to build different kinds of XIC extractors

Definition at line 40 of file msrunxicextractorfactory.h.

Constructor & Destructor Documentation

◆ MsRunXicExtractorFactory()

pappso::MsRunXicExtractorFactory::MsRunXicExtractorFactory ( )
private

Definition at line 50 of file msrunxicextractorfactory.cpp.

51 {
52 }

◆ ~MsRunXicExtractorFactory()

pappso::MsRunXicExtractorFactory::~MsRunXicExtractorFactory ( )
privatevirtual

Definition at line 53 of file msrunxicextractorfactory.cpp.

54 {
55 }

Member Function Documentation

◆ buildMsRunXicExtractorDiskBufferSp()

MsRunXicExtractorInterfaceSp pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorDiskBufferSp ( MsRunReaderSPtr msrun_reader) const

build Xic extractor that first read the whole MsRun, put it on disk using a write cache and extract XICs more quickly This needs some space on disk to store slices (1 dalton each) building the XIC extractor is slower than buildMsRunXicExtractorPwizSp, but faster than buildMsRunXicExtractorDiskSp extracting XIC from slices is a very quick operation

Parameters
msrun_readerthe MsRun reader on which the XIC extractor will run

Definition at line 84 of file msrunxicextractorfactory.cpp.

86 {
87  std::shared_ptr<MsRunXicExtractorDiskBuffer> msrun_xic_extractor_sp =
88  std::make_shared<MsRunXicExtractorDiskBuffer>(
89  MsRunXicExtractorDiskBuffer(msrun_reader, QDir(m_tmpDirName)));
90  msrun_xic_extractor_sp.get()->prepareExtractor();
91  return (msrun_xic_extractor_sp);
92 }

References m_tmpDirName.

◆ buildMsRunXicExtractorDiskSp()

MsRunXicExtractorInterfaceSp pappso::MsRunXicExtractorFactory::buildMsRunXicExtractorDiskSp ( MsRunReaderSPtr msrun_reader) const

build Xic extractor that first read the whole MsRun, put it on disk and extract XICs more quickly This needs some space on disk to store slices (1 dalton each) building the XIC extractor is slow extracting XIC from slices is a very quick operation

Parameters
msrun_readerthe MsRun reader on which the XIC extractor will run

Definition at line 72 of file msrunxicextractorfactory.cpp.

74 {
75  std::shared_ptr<MsRunXicExtractorDisk> msrun_xic_extractor_sp =
76  std::make_shared<MsRunXicExtractorDisk>(
77  MsRunXicExtractorDisk(msrun_reader, QDir(m_tmpDirName)));
78 
79  msrun_xic_extractor_sp.get()->prepareExtractor();
80  return (msrun_xic_extractor_sp);
81 }

References m_tmpDirName.

◆ 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_readerthe MsRun reader on which the XIC extractor will run

Definition at line 63 of file msrunxicextractorfactory.cpp.

65 {
66  std::shared_ptr<MsRunXicExtractor> msrun_xic_extractor_sp =
67  std::make_shared<MsRunXicExtractor>(MsRunXicExtractor(msrun_reader));
68  return (msrun_xic_extractor_sp);
69 }

◆ getInstance()

MsRunXicExtractorFactory & pappso::MsRunXicExtractorFactory::getInstance ( )
static

singleton to get the only instance of the factory

Definition at line 44 of file msrunxicextractorfactory.cpp.

45 {
46  return m_instance;
47 }
static MsRunXicExtractorFactory m_instance

References m_instance.

◆ setTmpDir()

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

set the temporary working directory

Definition at line 58 of file msrunxicextractorfactory.cpp.

59 {
60  m_tmpDirName = dir_name;
61 }

References m_tmpDirName.

Member Data Documentation

◆ m_instance

MsRunXicExtractorFactory pappso::MsRunXicExtractorFactory::m_instance
staticprivate
Initial value:

Definition at line 43 of file msrunxicextractorfactory.h.

Referenced by getInstance().

◆ m_tmpDirName

QString pappso::MsRunXicExtractorFactory::m_tmpDirName
private

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