Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected exception in ALC interface #12618

Closed
raquelalvarezbanos opened this issue May 18, 2015 · 1 comment · Fixed by #12912
Closed

Unexpected exception in ALC interface #12618

raquelalvarezbanos opened this issue May 18, 2015 · 1 comment · Fixed by #12912
Assignees
Labels
Muon Issues and pull requests related to muons

Comments

@raquelalvarezbanos
Copy link
Contributor

This issue was originally TRAC 11780

In the peak fitting step, if you fit two peaks, then remove one of them from the function browser and hit the fit button again, an unexpected exception is thrown:

"Unknown function parameter"

This also happens in the BaselineModelling step.

@raquelalvarezbanos raquelalvarezbanos added the Muon Issues and pull requests related to muons label Jun 3, 2015
@raquelalvarezbanos raquelalvarezbanos self-assigned this Jun 3, 2015
@raquelalvarezbanos
Copy link
Contributor Author

Looking deeper into this I've realized that there is a bug in FunctionBrowser rather than in ALC. I've checked that it also affects the MDF interface, as it uses a FunctionBrowser too. The problem is that when the user adds more than one function to the browser, a CompositeFunction is created (and an index fi is assigned to each function), but this CompositeFunction is not destroyed when only one function remains, so the remaining function keeps the f0 index, which causes the "Unknown function parameter" error, as the function parameters should still be referred to as f0.parameters.

I think the best way to solve this is to add an if statement in FunctionBrowser::removeFunction() to check the number of functions remaining in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Muon Issues and pull requests related to muons
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant