Skip to content

Commit

Permalink
Refs #5678. Only save mask if filename set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Sep 13, 2012
1 parent 282d804 commit d25413c
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions Code/Mantid/Framework/WorkflowAlgorithms/src/DgsDiagnose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,34 +339,19 @@ namespace Mantid
totalCountsWS.reset();
backgroundIntWS.reset();

// If mask file name is set or the processed detector vanadium is
// being saved, save out the diagnositic mask.
if (reductionManager->existsProperty("SaveProcessedDetVan") ||
reductionManager->existsProperty("OutputMaskFile"))
// If mask file name is set save out the diagnostic mask.
if (reductionManager->existsProperty("OutputMaskFile"))
{
// Now actually get the parameters
bool saveProcDetVan = false;
if (reductionManager->existsProperty("SaveProcessedDetVan"))
std::string maskFilename = reductionManager->getPropertyValue("OutputMaskFile");
if (maskFilename.empty())
{
saveProcDetVan = reductionManager->getProperty("SaveProcessedDetVan");
maskFilename = maskName + ".xml";
}
std::string maskFilename = "";
if (reductionManager->existsProperty("OutputMaskFile"))
{
maskFilename = reductionManager->getPropertyValue("OutputMaskFile");
}
if (saveProcDetVan || !maskFilename.empty())
{
if (maskFilename.empty())
{
maskFilename = maskName + ".xml";
}

IAlgorithm_sptr saveNxs = this->createSubAlgorithm("SaveMask");
saveNxs->setProperty("InputWorkspace", maskWS);
saveNxs->setProperty("OutputFile", maskFilename);
saveNxs->execute();
}
IAlgorithm_sptr saveNxs = this->createSubAlgorithm("SaveMask");
saveNxs->setProperty("InputWorkspace", maskWS);
saveNxs->setProperty("OutputFile", maskFilename);
saveNxs->execute();
}

MaskWorkspace_sptr m = boost::dynamic_pointer_cast<MaskWorkspace>(maskWS);
Expand Down

0 comments on commit d25413c

Please sign in to comment.