-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
reco::FormulaEvaluator segFaults if function string is not hard-coded/pre-defined #21851
Comments
A new Issue was created by @kirschen . @davidlange6, @Dr15Jones, @smuzaffar, @fabiocos can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
@kirschen |
assign analysis,reconstruction |
@kirschen |
Hi, sorry for the delay. Yes, I can take care of the small PR throwing an exception if none of the predefined functions are found in the next couple of days. |
Will link it here, then. |
@kirschen |
Issue is more generically resolved with this PR: that gives a useful exception with the initial expression reported here |
@kirschen : you can close this issue |
Thanks, all! |
Dear experts,
in preparation for a new JEC-release, the parametrization has been extended by a TMath::Exp-expression. However, the the reco::FormulaEvaluator segFaults with this extension.
After inspecting
https://github.com/cms-sw/cmssw/blob/master/CommonTools/Utils/src/FormulaEvaluator.cc#L562-L575
and following, it seems like any new function needs to be announced to the reco::FormulaEvaluator, i.e. if we are to introduce any new function, we should inject it to reco::FormulaEvaluator as early as possible. For now, we replaced "TMath::Exp" by "exp" in our parametrization to make it work.
Would it be possible to catch "undefined" parametrizations instead of segfaulting to make it obvious what goes wrong? Maybe just replace the return in
https://github.com/cms-sw/cmssw/blob/master/CommonTools/Utils/src/FormulaEvaluator.cc#L660
by an error?
Thanks,
Henning for the JERC-group
FYI: Previous "JetMET"-issues with reco::FormulaEvaluator e.g. #16716 (@Dr15Jones @slava77 )
The text was updated successfully, but these errors were encountered: