Skip to content

Commit

Permalink
Use the new algorithm to apply auto-grouping.
Browse files Browse the repository at this point in the history
It means I can apply dead time correction before grouping happens.

Refs #7229
  • Loading branch information
arturbekasov committed Oct 11, 2013
1 parent dbc7caa commit 72c9c1d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,19 @@ namespace Mantid
IAlgorithm_sptr loadNexus = createChildAlgorithm("LoadMuonNexus");
loadNexus->initialize();
loadNexus->setPropertyValue("Filename", fn.str());
if (m_autogroup)
loadNexus->setPropertyValue("AutoGroup","1");
loadNexus->execute();

Workspace_sptr loadedWs = loadNexus->getProperty("OutputWorkspace");

if(m_autogroup)
{
IAlgorithm_sptr applyGrouping = createChildAlgorithm("ApplyGroupingFromMuonNexus");
applyGrouping->initialize();
applyGrouping->setProperty("InputWorkspace", loadedWs);
applyGrouping->setPropertyValue("Filename", fn.str());
applyGrouping->execute();
loadedWs = applyGrouping->getProperty("OutputWorkspace");
}

WorkspaceGroup_sptr loadedGroup = boost::dynamic_pointer_cast<WorkspaceGroup>(loadedWs);

Expand Down

0 comments on commit 72c9c1d

Please sign in to comment.