Skip to content

Commit

Permalink
re #11275 Allow instrument parameters to be defined from numeric logs
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed Mar 19, 2015
1 parent 0998a85 commit 7e05c05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/API/src/ExperimentInfo.cpp
Expand Up @@ -220,9 +220,14 @@ struct ParameterValue {
operator double() {
if (info.m_logfileID.empty())
return boost::lexical_cast<double>(info.m_value);
else
else {
try {
return info.createParamValue(
runData.getTimeSeriesProperty<double>(info.m_logfileID));
} catch(std::invalid_argument &) { //std::invalid_argument in this case means that it wasn't a time series property
return boost::lexical_cast<double>(runData.getProperty(info.m_logfileID)->value());
}
}
}
operator int() { return boost::lexical_cast<int>(info.m_value); }
operator bool() {
Expand Down

0 comments on commit 7e05c05

Please sign in to comment.