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

Avoid using comparison to stringified integers when using enums in configuration of algorithms #1517

Open
sebouh137 opened this issue Jun 28, 2024 · 2 comments
Assignees

Comments

@sebouh137
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Yes. If enums are used as parameters of algorithms, JANA converts the parameters to integers and then into strings. It is therefore necessary to create code like this, as merged in PR #1502 , which compares string parameters to string representations of integers, like this:

Describe the solution you'd like
Something that causes these enum constants to be converted to human-intelligible strings instead of string representations of integers

Describe alternatives you've considered
N/A

Additional context
N/A

@wdconinc
Copy link
Contributor

@nathanwbrei Maybe you're interested in this. Despite a dedicated ostream operator which should make this satisfy is_serializable with precendence over the underlying_type, we are still seeing enums go to integer string representation.

@nathanwbrei
Copy link
Contributor

I'm definitely interested. I've created a corresponding issue in the JANA tracker here: JeffersonLab/JANA2#318

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants