[ntuple] add tutorial for RNTuple attributes#21993
[ntuple] add tutorial for RNTuple attributes#21993dpiparo merged 1 commit intoroot-project:masterfrom
Conversation
0e27bff to
1bc7fdf
Compare
jblomer
left a comment
There was a problem hiding this comment.
In principle looks good to me, but I think we should make the example a little closer to HEP vocabulary. E.g., as main data, store a struct Event (even if empty). The attribute set could be one of the examples we give in the presentation (e.g. a set named Provenance and then we add a different run number for every 10 entries or so).
1bc7fdf to
8a31b38
Compare
Test Results 22 files 22 suites 3d 5h 39m 59s ⏱️ For more details on these failures, see this check. Results for commit 8a31b38. |
|
All failures due to SOFIE custom CMake. |
hahnjo
left a comment
There was a problem hiding this comment.
I think the tutorial should be mentioned in tutorials/io/ntuple/index.md
| // fields in the attribute model; all the main RNTuple data you filled in before committing the range | ||
| // will have those values as metadata associated to it. | ||
| // | ||
| // Beginning an attribute range is done like this (note that attrEntry is an REntry, so filling |
There was a problem hiding this comment.
attrEntry isn't used in the tutorial?
| // in the attribute values uses the same interface of the regular values): | ||
| auto attrRange = attrSet->BeginRange(); | ||
|
|
||
| // Here you can assign values to your attributes. In this case we only have 1 attribute (the string "myAttr"), |
There was a problem hiding this comment.
Probably this was changed from myAttr to runNumber?
|
|
||
| std::cout << "\nOpened attribute set '" << attrSet->GetDescriptor().GetName() << "' with description: \"" | ||
| << attrSet->GetDescriptor().GetDescription() << "\"\n"; | ||
| // Loop over the main entries and, for each, print its associated attribute "myAttr" |
There was a problem hiding this comment.
print its associated run number?
No description provided.