-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: remove spaces in adjacency matrix expression #472
Conversation
@faustus123 @nathanwbrei I am very surprised that JANA2 changes default values set in the C++ in a SetDefaultParameter call. Can't we even trust default values anymore? [2023-02-08 21:29:43.387] [EcalBarrelSciGlassProtoClusters] [error] (abs(tower_1 - tower_2) + (abs((sector_1 - sector_2) * 5 + row_1 - row_2) == 1) + (abs((sector_1 - sector_2) * 5 + row_1 - row_2) == (24 * 5 - 1))) == 1
[WARN] Parameter 'BEMC:EcalBarrelSciGlassProtoClusters:adjacencyMatrix' loses equality with itself after stringification
[2023-02-08 21:29:43.387] [EcalBarrelSciGlassProtoClusters] [error] (abs(tower_1 |
Ha! You're right. This is a bug where we need to handle strings differently than other data types. Spaces in strings are not being handled properly. The issue is due to parameters being passed through We will need to add a template specialization for strings types that skips the conversion using |
I'd like to merge this soon. Anyone can review and approve? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a reasonable and simple workaround.
Hello @wdconinc , |
Briefly, what does this PR introduce?
When there are spaces in the adjacency matrix string expression's default value, JANA2 chops at the first space. This results in many warnings, i.e. https://github.com/eic/EICrecon/actions/runs/4121127389/jobs/7116665443.
The issue seems to be in the
SetDefaultParameter
call, since modifyingu_adjacencyMatrix
in the algorithm didn't have any impact. At that point the string has already been chopped.What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No.