Skip to content

Commit

Permalink
Re #11624 Allow skipping missing run files
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalvarezbanos committed Apr 24, 2015
1 parent e07584d commit ebe0add
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp
Expand Up @@ -198,8 +198,10 @@ void PlotAsymmetryByLogValue::exec() {
// Load run, apply dead time corrections and detector grouping
Workspace_sptr loadedWs = doLoad(i);

// Analyse loadedWs
doAnalysis (loadedWs, i);
if ( loadedWs ) {
// Analyse loadedWs
doAnalysis (loadedWs, i);
}
}

progress.report();
Expand Down Expand Up @@ -368,6 +370,12 @@ Workspace_sptr PlotAsymmetryByLogValue::doLoad (int64_t runNumber ) {
fnn << std::setw(g_filenameZeros) << std::setfill('0') << runNumber;
fn << g_filenameBase << fnn.str() << g_filenameExt;

// Check if file exists
if ( !Poco::File(fn.str()).exists() ) {
g_log.warning() << "File " << fn.str() << " not found" << std::endl;
return Workspace_sptr();
}

// Load run
IAlgorithm_sptr load = createChildAlgorithm("LoadMuonNexus");
load->setPropertyValue("Filename", fn.str());
Expand Down

0 comments on commit ebe0add

Please sign in to comment.