Commit 65aeac06 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Fix cases with optional path

parent ecf82e0e
......@@ -10,7 +10,10 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D
m_timewalkCorrectionFactors = m_config.getArray<double>("timewalkCorrectionFactors", std::vector<double>());
m_inputDirectory = m_config.getPath("inputDirectory");
m_calibrationFile = m_config.getPath("calibrationFile");
if(m_config.has("calibrationFile")) {
m_calibrationFile = m_config.getPath("calibrationFile");
}
m_clockCycle = m_config.get<double>("clockCycle", static_cast<double>(Units::convert(6.25, "ns")));
......
......@@ -26,8 +26,10 @@ EventLoaderTimepix3::EventLoaderTimepix3(Configuration config, std::shared_ptr<D
m_numberPixelHits = m_config.get<size_t>("number_of_pixelhits", 2000);
// Calibration parameters
calibrationPath = m_config.getPath("calibrationPath", "");
threshold = m_config.get<std::string>("threshold", "");
if(m_config.has("calibrationPath")) {
calibrationPath = m_config.getPath("calibrationPath", "");
threshold = m_config.get<std::string>("threshold", "");
}
}
void EventLoaderTimepix3::initialise() {
......
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