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

Ability to create configurable param from a given external struct #13733

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

sawenzel
Copy link
Collaborator

This commit provides the new feature of being able to create configurable param instances from a given external C++ struct.

For example, a C++ struct struct A { double x; } can be used to define a correspondig configurable parameter via

class MyConfigParamA : o2::conf::ConfigurableParamPromoter<MyConfigParamA, A> {}

This allows to:

  • have "template" structs to create multiple params of the same structure
  • separate data from configkey functionality
  • extract data copies from underlying configurable parameters

The application thereof is demonstrated for GeneratorPythia8Param.

A unit test is added to check the new functionality.

Copy link
Contributor

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1

jackal1-66
jackal1-66 previously approved these changes Nov 25, 2024
This commit provides the new feature of being able to create
configurable param instances from a given external C++ struct.

For example, a C++ struct `struct A { double x; }` can be used to define
a correspondig configurable parameter via

```
class MyConfigParamA : o2::conf::ConfigurableParamPromoter<MyConfigParamA, A> {}
```

This allows to:
- have "template" structs to create multiple params of the same structure
- separate data from configkey functionality
- extract data copies from underlying configurable parameters

The application thereof is demonstrated for GeneratorPythia8Param.

A unit test is added to check the new functionality.
@sawenzel sawenzel merged commit 6321af7 into AliceO2Group:dev Nov 26, 2024
12 of 13 checks passed
@sawenzel sawenzel deleted the swenzel/configParamTemplates branch November 26, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants