Skip to content
Snippets Groups Projects
Commit 1bb652b5 authored by Anthony Lim's avatar Anthony Lim
Browse files

refs #23031 added errors to convertfitfunc

parent ece48750
No related branches found
No related tags found
No related merge requests found
...@@ -249,21 +249,21 @@ IFunction_sptr ConvertFitFunctionForMuonTFAsymmetry::extractUserFunction( ...@@ -249,21 +249,21 @@ IFunction_sptr ConvertFitFunctionForMuonTFAsymmetry::extractUserFunction(
// N(1+g) + exp // N(1+g) + exp
auto TFFunc = boost::dynamic_pointer_cast<CompositeFunction>(TFFuncIn); auto TFFunc = boost::dynamic_pointer_cast<CompositeFunction>(TFFuncIn);
if (TFFunc == nullptr) { if (TFFunc == nullptr) {
std::runtime_error("Input function is not of the correct form"); throw std::runtime_error("Input function is not of the correct form");
} }
// getFunction(0) -> N(1+g) // getFunction(0) -> N(1+g)
TFFunc = TFFunc =
boost::dynamic_pointer_cast<CompositeFunction>(TFFunc->getFunction(0)); boost::dynamic_pointer_cast<CompositeFunction>(TFFunc->getFunction(0));
if (TFFunc == nullptr) { if (TFFunc == nullptr) {
std::runtime_error("Input function is not of the correct form"); throw std::runtime_error("Input function is not of the correct form");
} }
// getFunction(1) -> 1+g // getFunction(1) -> 1+g
TFFunc = TFFunc =
boost::dynamic_pointer_cast<CompositeFunction>(TFFunc->getFunction(1)); boost::dynamic_pointer_cast<CompositeFunction>(TFFunc->getFunction(1));
if (TFFunc == nullptr) { if (TFFunc == nullptr) {
std::runtime_error("Input function is not of the correct form"); throw std::runtime_error("Input function is not of the correct form");
} }
// getFunction(1) -> g // getFunction(1) -> g
return TFFunc->getFunction(1); return TFFunc->getFunction(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment