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

Codify some of the implicitly assumed conventions #439

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

tmadlener
Copy link
Collaborator

BEGINRELEASENOTES

  • Introduce the FrameCategories.h header that puts a few of the conventions and otherwise hardcoded strings into variables / functions.

ENDRELEASENOTES

Should make it easier to keep the various implicit decisions that were made consistent with each other and avoid situations with too many magic values. See also discussion in AIDASoft/DD4hep#1140

@jmcarcell
Copy link
Member

There are some other tests that could use this, the legacy ones (I guess you don't care about those), but also read_frame_root_multiple.cpp. Also https://github.com/AIDASoft/podio/blob/master/tests/read_frame_auxiliary.h#L61 which is used in some non-legacy tests

@tmadlener
Copy link
Collaborator Author

tmadlener commented Jul 18, 2023

Fixed the usage in the non-legacy tests. for the legacy tests it doesn't really make sense, I think.

As discussed during the meeting today we will merge this now to unblock a few things that depend on this and to bring the nightlies (of Key4hep) back to a working state.

* either commonly used category names, or category names that form a
* convention.
*/
namespace Category {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why namespace over enum?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly because this way I can directly use it in everything that expects a string, rather than having to have some conversion from an enum value to a string. Additionally, I didn't find a use case yet where an actual enum was necessary, so I wen't with the minimal solution here.

@tmadlener tmadlener merged commit 954ca26 into AIDASoft:master Jul 18, 2023
17 of 18 checks passed
@tmadlener tmadlener deleted the category-conventions branch July 18, 2023 11:16
hegner pushed a commit to hegner/podio that referenced this pull request Jul 27, 2023
tmadlener added a commit to tmadlener/podio that referenced this pull request Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants