Skip to content
Snippets Groups Projects
Commit 5dcefe18 authored by Langella Olivier's avatar Langella Olivier
Browse files

WIP: adapting xtpcpp to new PAPPSOms++ library

parent a5eb638f
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <pappsomspp/exception/exceptionnotfound.h> #include <pappsomspp/exception/exceptionnotfound.h>
#include <pappsomspp/xicextractor/msrunxicextractorfactory.h> #include <pappsomspp/xicextractor/msrunxicextractorfactory.h>
#include "../utils/msrunstatisticshandler.h" #include "../utils/msrunstatisticshandler.h"
#include <pappsomspp/msfile/msfileaccessor.h>
#include <pappsomspp/exception/exceptionnotimplemented.h>
MsRun::MsRun(const QString &location) : pappso::MsRunId(location) MsRun::MsRun(const QString &location) : pappso::MsRunId(location)
{ {
...@@ -62,9 +64,24 @@ MsRun::getMsRunReaderSp() ...@@ -62,9 +64,24 @@ MsRun::getMsRunReaderSp()
{ {
try try
{ {
_msrun_reader_sp =
pappso::MsRunReaderFactory::getInstance().buildPwizMsRunReaderSp( pappso::MsFileAccessor accessor(getFilename(), 0);
*this); qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "()";
auto msrunid_list = accessor.getMsRunIds();
if(msrunid_list.size() == 1)
{
_msrun_reader_sp = accessor.msRunReaderSp(msrunid_list.front());
}
else
{
throw(pappso::ExceptionNotImplemented(QObject::tr(
"multiple msruns inside mz data file not yet implemented")));
}
/*
_msrun_reader_sp =
pappso::MsRunReaderFactory::getInstance().buildPwizMsRunReaderSp(
*this);
*/
} }
catch(pappso::PappsoException &error) catch(pappso::PappsoException &error)
{ {
...@@ -142,7 +159,7 @@ MsRun::findMsRunFile() ...@@ -142,7 +159,7 @@ MsRun::findMsRunFile()
qDebug() << "FILE: " << file.fileName(); qDebug() << "FILE: " << file.fileName();
if(onlyfilename == file.fileName()) if(onlyfilename == file.fileName())
{ {
this->setFilename(file.absoluteFilePath()); this->setFileName(file.absoluteFilePath());
try try
{ {
if(_msrun_reader_sp == nullptr) if(_msrun_reader_sp == nullptr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment