Commit 1b71ec02 authored by Aaron Bray's avatar Aaron Bray
Browse files

Propagate dataDir override in scenario execution classes

parent 2437a233
......@@ -54,6 +54,8 @@ bool SEScenarioExec::ExecuteFile(PhysiologyEngine& pe, const std::string& scenar
rFile = scenarioFile;
rFile += ".out";
}
if (m_Scenario->HasPatientConfiguration())
m_Scenario->GetPatientConfiguration().SetDataRoot(dataDir);
bool success = Execute(pe, *m_Scenario, rFile, ec);
return success;
}
......@@ -88,6 +90,8 @@ bool SEScenarioExec::Execute(PhysiologyEngine& pe, const std::string& scenarioFi
Error("Error reading scenario file " + scenarioFile + " " + ex.what());
return false;
}
if (m_Scenario->HasPatientConfiguration())
m_Scenario->GetPatientConfiguration().SetDataRoot(dataDir);
bool success = Execute(pe, *m_Scenario, resultsFile, ec);
return success;
}
......
......@@ -6,6 +6,7 @@
#include "controller/Engine.h"
#include "engine/SEAction.h"
#include "engine/SEAutoSerialization.h"
#include "engine/SEPatientConfiguration.h"
#include "PulseScenario.h"
#include "PulseConfiguration.h"
#include "properties/SEScalarTime.h"
......@@ -95,6 +96,8 @@ bool PulseScenarioExec::Execute(PhysiologyEngine& engine, const std::string& sce
Error("Unable to load scenario : " + scenario);
return false;
}
if (m_PulseScenario->HasPatientConfiguration())
m_PulseScenario->GetPatientConfiguration().SetDataRoot(dataDir);
return Execute(engine, *m_PulseScenario, resultsFile);
}
catch (CommonDataModelException& ex)
......@@ -128,6 +131,8 @@ bool PulseScenarioExec::ExecuteFile(PhysiologyEngine& engine, const std::string&
rFile = scenarioFile;
rFile += ".csv";
}
if (m_PulseScenario->HasPatientConfiguration())
m_PulseScenario->GetPatientConfiguration().SetDataRoot(dataDir);
return Execute(engine, *m_PulseScenario, rFile);
}
catch (CommonDataModelException& ex)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment