Skip to content

Conversation

@f3sch
Copy link
Collaborator

@f3sch f3sch commented Mar 22, 2025

Allows to use trivial fixed-size c-arrays in streamers as does root.
An example is given in the added test.
Pining @shahor02 for review since you are explicitly mentioned as author in the file :).

Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
@f3sch f3sch requested a review from sawenzel as a code owner March 22, 2025 01:59
@github-actions
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-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

Copy link
Collaborator

@shahor02 shahor02 left a comment

Choose a reason for hiding this comment

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

Very elegant, thanks! I guess you have tested it? Do I understand correctly that a pointer is distinguished from the C-style array just be that size specifier in the name ?

@f3sch
Copy link
Collaborator Author

f3sch commented Mar 22, 2025

Your understanding is correct, I think this also the only way one could distinguish a pointer from an array to that of an object. What I did not yet manage is to make it work for classes having streamers but I guess there root anyways provides trivially std::array definitions. As for testing besides the added unit test, I have another git-branch where I use this to dump some arrays of integers and floats but also tracks and so on, which works fine. Thanks for the review.

@shahor02 shahor02 merged commit 97aeb5f into AliceO2Group:dev Mar 22, 2025
13 of 14 checks passed
@f3sch f3sch deleted the common/treestream_c_arr branch March 22, 2025 12:07
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