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
skip empty lines in JetCorrectorParameters ctor #32387
skip empty lines in JetCorrectorParameters ctor #32387
Conversation
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-32387/20253
|
A new Pull Request was created by @missirol (Marino Missiroli) for master. It involves the following packages: CondFormats/JetMETObjects @ggovi, @cmsbuild, @santocch can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
+1 |
Comparison results are now available Comparison Summary:
|
+1 |
merge |
PR description:
While testing with the class
JetCorrectorDBWriter
, I encountered a seg-fault coming fromJetCorrectorParameters
.What led to the crash was the fact that the input
.txt
file I was using had an empty line in it (afaik, empty lines are absent in standard JEC txt files, thus no crashes).This PR applies a quick fix, skipping empty lines in
JetCorrectorParameters
, and making the sw a bit more robust; a more sophisticated fix is left to experts of this package [*].No changes expected.
FYI: @lathomas @kirschen @juska @glatino @pallabidas @sparedes
[*] The core issue is that the ctor of
JetCorrectorParameters::Record
does not throw an error if the input string has an invalid format (e.g. empty); in those cases, themMin
/mMax
vectors are not filled, and accessingxMin(i)
later on here leads to a crash.PR validation:
Validated with private tests.