Skip to content

Commit

Permalink
Support saving result to default save directory
Browse files Browse the repository at this point in the history
Refs #10298
  • Loading branch information
DanNixon committed Jan 28, 2015
1 parent c81a4bc commit 03e144c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Code/Mantid/MantidQt/CustomInterfaces/src/DensityOfStates.cpp
Expand Up @@ -6,6 +6,7 @@
#include <QString>

using namespace Mantid::API;
using MantidQt::API::BatchAlgorithmRunner;

namespace
{
Expand Down Expand Up @@ -129,7 +130,19 @@ namespace MantidQt

m_batchAlgoRunner->addAlgorithm(dosAlgo);

//TODO: Saving
// Setup save algorithm if needed
if(m_uiForm.ckSave->isChecked())
{
BatchAlgorithmRunner::AlgorithmRuntimeProps saveProps;
saveProps["InputWorkspace"] = m_outputWsName.toStdString();

QString filename = m_outputWsName + ".nxs";

IAlgorithm_sptr saveAlgo = AlgorithmManager::Instance().create("SaveNexusProcessed");
saveAlgo->setProperty("Filename", filename.toStdString());

m_batchAlgoRunner->addAlgorithm(saveAlgo, saveProps);
}

connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(dosAlgoComplete(bool)));
m_batchAlgoRunner->executeBatchAsync();
Expand Down

0 comments on commit 03e144c

Please sign in to comment.