Common: allow to write c-style arrays in TreeStream#14098
Common: allow to write c-style arrays in TreeStream#14098shahor02 merged 1 commit intoAliceO2Group:devfrom
Conversation
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
|
REQUEST FOR PRODUCTION RELEASES: This will add The following labels are available |
shahor02
left a comment
There was a problem hiding this comment.
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 ?
|
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. |
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 :).