Skip to content

Commit

Permalink
Refs #10223 Fix minor error in fetchRun
Browse files Browse the repository at this point in the history
fetchRun was not fetching loaded runs from the ADS correctly because it
was using incorrect workspace names to look for them.
  • Loading branch information
Harry Jeffery committed Sep 16, 2014
1 parent bad470f commit e309903
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -151,9 +151,11 @@ namespace MantidQt
*/
Workspace_sptr ReflMainViewPresenter::fetchRun(const std::string& run, const std::string& instrument = "")
{
const std::string wsName = run + "_TOF";

//First, let's see if the run given is the name of a workspace in the ADS
if(AnalysisDataService::Instance().doesExist(run))
return AnalysisDataService::Instance().retrieveWS<Workspace>(run);
if(AnalysisDataService::Instance().doesExist(wsName))
return AnalysisDataService::Instance().retrieveWS<Workspace>(wsName);

const std::string filename = instrument + run;

Expand All @@ -162,7 +164,7 @@ namespace MantidQt
algLoadRun->initialize();
algLoadRun->setChild(true);
algLoadRun->setProperty("Filename", filename);
algLoadRun->setProperty("OutputWorkspace", filename + "_TOF");
algLoadRun->setProperty("OutputWorkspace", wsName);
algLoadRun->execute();

if(!algLoadRun->isExecuted())
Expand Down

0 comments on commit e309903

Please sign in to comment.