Skip to content

Commit

Permalink
refs #6667 Modified WFA helper to understand bool property
Browse files Browse the repository at this point in the history
this should fix DGSReduction algorithm
  • Loading branch information
abuts committed Jul 7, 2013
1 parent 0559208 commit 2d4a934
Showing 1 changed file with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,24 @@ namespace WorkflowAlgorithmHelpers
}
else
{
std::vector<double> params = ws->getInstrument()->getNumberParameter(instParam);
if (!params.empty())
{
param = (params[0] != 0.0);
}
try
{
std::vector<bool> params = ws->getInstrument()->getBoolParameter(instParam);
if (!params.empty())
param = params[0];
else
param = false;
}
catch(std::runtime_error &) // Old style bool parameter expressed as double
{
std::vector<double> params = ws->getInstrument()->getNumberParameter(instParam);
if (!params.empty())
{
param = (params[0] != 0.0);
}
}


}
if(defaultValue != overrideValue)
{
Expand Down

0 comments on commit 2d4a934

Please sign in to comment.