Skip to content
Snippets Groups Projects
AlignAndFocusPowder.cpp 39.2 KiB
Newer Older
    AnalysisDataService::Instance().addOrReplace(name, m_maskWS);
    this->setPropertyValue("MaskWorkspace", name);
}

//----------------------------------------------------------------------------------------------
/** Perform SortEvents on the output workspaces
 * but only if they are EventWorkspaces.
 *
 * @param ws :: any Workspace. Does nothing if not EventWorkspace.
 */
void AlignAndFocusPowder::doSortEvents(Mantid::API::Workspace_sptr ws) {
  EventWorkspace_sptr eventWS = boost::dynamic_pointer_cast<EventWorkspace>(ws);
  if (!eventWS)
    return;
  Algorithm_sptr alg = this->createChildAlgorithm("SortEvents");
  alg->setProperty("InputWorkspace", eventWS);
  alg->setPropertyValue("SortBy", "X Value");
  alg->executeAsChildAlg();
}
} // namespace WorkflowAlgorithm
} // namespace Mantid