Commit 7ed54382 authored by Michael Reuter's avatar Michael Reuter
Browse files

Refs #5453. Keep original loaded workspaces out of the ADS.

parent 6f33b156
......@@ -51,7 +51,7 @@ protected:
void setAccumAlg(const std::string & alg);
ITableWorkspace_sptr determineChunk();
void loadChunk();
Workspace_sptr load(const std::string &inputData);
Workspace_sptr load(const std::string &inputData, const bool loadQuiet = false);
std::vector<std::string> splitInput(const std::string & input);
void forwardProperties();
boost::shared_ptr<Kernel::PropertyManager> getProcessProperties(const std::string &propertyManager);
......
......@@ -148,7 +148,8 @@ namespace API
* Determine what kind of input data we have and load it
* @param inputData :: File path or workspace name
*/
Workspace_sptr DataProcessorAlgorithm::load(const std::string &inputData)
Workspace_sptr DataProcessorAlgorithm::load(const std::string &inputData,
const bool loadQuiet)
{
Workspace_sptr inputWS;
......@@ -175,7 +176,10 @@ namespace API
IAlgorithm_sptr loadAlg = createSubAlgorithm(m_loadAlg);
loadAlg->setProperty(m_loadAlgFileProp, foundFile);
loadAlg->setAlwaysStoreInADS(true);
if (!loadQuiet)
{
loadAlg->setAlwaysStoreInADS(true);
}
// Set up MPI if available
#ifdef MPI_BUILD
......@@ -196,7 +200,14 @@ namespace API
#endif
loadAlg->execute();
inputWS = AnalysisDataService::Instance().retrieve(outputWSName);
if (loadQuiet)
{
inputWS = loadAlg->getProperty("OutputWorkspace");
}
else
{
inputWS = AnalysisDataService::Instance().retrieve(outputWSName);
}
}
else
throw std::runtime_error("DataProcessorAlgorithm::load could process any data");
......
......@@ -461,7 +461,7 @@ namespace Mantid
this->reductionManager->declareProperty(new PropertyWithValue<std::string>(detCalFileProperty, detCalFilename));
}
inputWS = this->load(inputData);
inputWS = this->load(inputData, true);
}
else
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment