Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RNTupleAttrUtils.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleAttrUtils.hxx
2/// \author Giacomo Parolini <giacomo.parolini@cern.ch>
3/// \date 2026-03-10
4/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
5/// is welcome!
6
7#ifndef ROOT7_RNTuple_Attr_Utils
8#define ROOT7_RNTuple_Attr_Utils
9
10#include <cstddef>
11#include <cstdint>
12
14
15/*
16Attribute RNTuples have a fixed Model schema that looks like this:
17
18 +-----------+
19 | MetaModel |
20 +-----+-----+
21 |
22 +--------------+---------------+
23 | | |
24+------+------+ +-----+------+ +------+------+
25| _rangeStart | | _rangeLen | | _userData |
26+-------------+ +------------+ +------+------+
27 |
28 +-----+-----+
29 | UserModel |
30 +-----------+
31
32Where "_userData" is an untyped record field containing all the user-defined Model's fields
33as its children.
34
35The order and name of the meta Model's fields is defined by the schema version.
36*/
37
38inline const std::uint16_t kSchemaVersionMajor = 1;
39inline const std::uint16_t kSchemaVersionMinor = 0;
40
41enum : std::size_t {
45
47};
48inline constexpr const char *kMetaFieldNames[] = {"_rangeStart", "_rangeLen", "_userData"};
49static_assert(kMetaFieldIndex_Count == sizeof(kMetaFieldNames) / sizeof(kMetaFieldNames[0]));
50
51} // namespace ROOT::Experimental::Internal::RNTupleAttributes
52
53#endif