Skip to content

Commit

Permalink
Added Sassena algorithm to UI
Browse files Browse the repository at this point in the history
Refs #10443
  • Loading branch information
DanNixon committed Oct 28, 2014
1 parent 3084fcf commit 56478f4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
@@ -1,6 +1,7 @@
#ifndef MANTID_CUSTOMINTERFACES_INDIRECTSIMULATIONTAB_H_
#define MANTID_CUSTOMINTERFACES_INDIRECTSIMULATIONTAB_H_

#include "MantidAPI/AlgorithmManager.h"
#include "MantidKernel/System.h"
#include "MantidQtAPI/AlgorithmRunner.h"
#include <QSettings>
Expand Down
2 changes: 0 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/src/IndirectMolDyn.cpp
@@ -1,7 +1,5 @@
#include "MantidQtCustomInterfaces/IndirectMolDyn.h"

#include "MantidAPI/AlgorithmManager.h"

#include <QFileInfo>
#include <QString>

Expand Down
19 changes: 17 additions & 2 deletions Code/Mantid/MantidQt/CustomInterfaces/src/IndirectSassena.cpp
Expand Up @@ -26,10 +26,25 @@ namespace MantidQt
}

/**
* TODO
* Configures and executes the LoadSassena algorithm.
*/
void IndirectSassena::run()
{
{
using namespace Mantid::API;

QString inputFileName = m_uiForm.mwInputFile->getFirstFilename();
QFileInfo inputFileInfo(inputFileName);
QString outWsName = inputFileInfo.baseName();

IAlgorithm_sptr sassenaAlg = AlgorithmManager::Instance().create("LoadSassena");
sassenaAlg->initialize();

sassenaAlg->setProperty("Filename", inputFileName.toStdString());
sassenaAlg->setProperty("SortByQVectors", m_uiForm.cbSortQ->isChecked());
sassenaAlg->setProperty("TimeUnit", m_uiForm.sbTimeUnit->value());
sassenaAlg->setProperty("OutputWorkspace", outWsName.toStdString());

runAlgorithm(sassenaAlg);
}

/**
Expand Down

0 comments on commit 56478f4

Please sign in to comment.