15#ifndef ROOT_RNTupleDescriptor
16#define ROOT_RNTupleDescriptor
39#include <unordered_map>
40#include <unordered_set>
48class RColumnElementBase;
51class RNTupleDescriptor;
54class RColumnDescriptorBuilder;
55class RClusterDescriptorBuilder;
56class RClusterGroupDescriptorBuilder;
57class RExtraTypeInfoDescriptorBuilder;
58class RFieldDescriptorBuilder;
59class RNTupleDescriptorBuilder;
70namespace Experimental {
110class RNTupleAttrSetDescriptorIterable;
173 std::unique_ptr<ROOT::RFieldBase>
211 double fMin = 0, fMax = 0;
231 std::int64_t fFirstElementIndex = 0U;
233 std::uint32_t fIndex = 0;
236 std::uint16_t fRepresentationIndex = 0;
239 std::uint16_t fBitsOnStorage = 0;
265 bool IsAliasColumn()
const {
return fPhysicalColumnId != fLogicalColumnId; }
306 bool fIsSuppressed =
false;
344 return fPhysicalColumnId ==
other.fPhysicalColumnId && fFirstElementIndex ==
other.fFirstElementIndex &&
345 fNElements ==
other.fNElements && fCompressionSettings ==
other.fCompressionSettings &&
346 fIsSuppressed ==
other.fIsSuppressed;
351 return (fFirstElementIndex <=
index && (fFirstElementIndex + fNElements) >
index);
367 std::uint32_t fNElements = std::uint32_t(-1);
371 bool fHasChecksum =
false;
382 return fNElements ==
other.fNElements && fLocator ==
other.fLocator;
477 const std::vector<RPageInfo> &
GetPageInfos()
const {
return fPageInfos; }
482 return fPhysicalColumnId ==
other.fPhysicalColumnId && fPageInfos ==
other.fPageInfos;
514 RColumnRangeIterable GetColumnRangeIterable()
const;
517 return fColumnRanges.find(
physicalId) != fColumnRanges.end();
519 std::uint64_t GetNBytesOnStorage()
const;
529 using Iter_t = std::unordered_map<ROOT::DescriptorId_t, RColumnRange>::const_iterator;
588 std::uint64_t fPageListLength = 0;
590 std::uint64_t fMinEntry = 0;
592 std::uint64_t fEntrySpan = 0;
594 std::uint32_t fNClusters = 0;
613 const std::vector<ROOT::DescriptorId_t> &
GetClusterIds()
const {
return fClusterIds; }
643 std::uint32_t fTypeVersion = 0;
704 std::uint64_t fNPhysicalColumns = 0;
716 std::uint16_t fVersionEpoch = 0;
717 std::uint16_t fVersionMajor = 0;
718 std::uint16_t fVersionMinor = 0;
719 std::uint16_t fVersionPatch = 0;
721 std::uint64_t fOnDiskHeaderSize = 0;
722 std::uint64_t fOnDiskHeaderXxHash3 = 0;
723 std::uint64_t fOnDiskFooterSize = 0;
725 std::uint64_t fNEntries = 0;
726 std::uint64_t fNClusters = 0;
735 std::uint64_t fGeneration = 0;
756 static constexpr unsigned int kFeatureFlagTest = 137;
770 bool fReconstructProjections =
false;
775 bool fForwardCompatible =
false;
777 bool fCreateBare =
false;
780 bool fEmulateUnknownTypes =
false;
814 return fFieldDescriptors.at(
fieldId);
818 return fColumnDescriptors.at(
columnId);
826 return fClusterDescriptors.at(
clusterId);
830 RFieldDescriptorIterable
834 RFieldDescriptorIterable
838 RFieldDescriptorIterable GetTopLevelFields()
const;
839 RFieldDescriptorIterable
842 RColumnDescriptorIterable GetColumnIterable()
const;
846 RClusterGroupDescriptorIterable GetClusterGroupIterable()
const;
848 RClusterDescriptorIterable GetClusterIterable()
const;
850 RExtraTypeInfoDescriptorIterable GetExtraTypeInfoIterable()
const;
854 const std::string &
GetName()
const {
return fName; }
857 std::size_t
GetNFields()
const {
return fFieldDescriptors.size(); }
892 std::vector<std::uint64_t> GetFeatureFlags()
const;
906 std::unique_ptr<ROOT::RNTupleModel> CreateModel(
const RCreateModelOptions &options = RCreateModelOptions())
const;
907 void PrintInfo(std::ostream &
output)
const;
922 std::vector<ROOT::DescriptorId_t> fColumns = {};
931 std::size_t fIndex = 0;
967 size_t size() {
return fColumns.size(); }
983 std::vector<ROOT::DescriptorId_t> fFieldChildren = {};
992 std::size_t fIndex = 0;
1024 : fNTuple(
ntuple), fFieldChildren(
field.GetLinkIds())
1030 : fNTuple(
ntuple), fFieldChildren(
field.GetLinkIds())
1032 std::sort(fFieldChildren.begin(), fFieldChildren.end(),
comparator);
1055 using Iter_t = std::unordered_map<ROOT::DescriptorId_t, RClusterGroupDescriptor>::const_iterator;
1109 using Iter_t = std::unordered_map<ROOT::DescriptorId_t, RClusterDescriptor>::const_iterator;
1159 using Iter_t = std::vector<RExtraTypeInfoDescriptor>::const_iterator;
1194namespace Experimental {
1211 using Iter_t = std::vector<RNTupleAttrSetDescriptor>::const_iterator;
1270 std::uint32_t fNLogicalColumns = 0;
1271 std::uint32_t fNPhysicalColumns = 0;
1278 fFieldIdsOrder.emplace_back(
fieldDesc.GetId());
1279 fFieldIdsLookup.insert(
fieldDesc.GetId());
1289 fNPhysicalColumns++;
1290 if (fFieldIdsLookup.count(
columnDesc.GetFieldId()) == 0) {
1291 fExtendedColumnRepresentations.emplace_back(
columnDesc.GetLogicalId());
1301 return fExtendedColumnRepresentations;
1307 std::vector<ROOT::DescriptorId_t> GetTopLevelFields(
const RNTupleDescriptor &desc)
const;
1311 return fFieldIdsLookup.find(
fieldId) != fFieldIdsLookup.end();
1315 return std::find(fExtendedColumnRepresentations.begin(), fExtendedColumnRepresentations.end(),
columnId) !=
1316 fExtendedColumnRepresentations.end();
1320namespace Experimental::Internal {
1712 void SetVersionForWriting();
1714 void SetNTuple(
const std::string_view
name,
const std::string_view
description);
1715 void SetFeature(
unsigned int flag);
1740 void BeginHeaderExtension();
1759 void ShiftAliasColumns(std::uint32_t
offset);
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Bool_t operator==(const TDatime &d1, const TDatime &d2)
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
The available trivial, native content types of a column.
RNTupleAttrSetDescriptorBuilder & AnchorLocator(const RNTupleLocator &loc)
RNTupleAttrSetDescriptorBuilder & SchemaVersion(std::uint16_t major, std::uint16_t minor)
ROOT::Experimental::RNTupleAttrSetDescriptor fDesc
RNTupleAttrSetDescriptorBuilder & Name(std::string_view name)
RNTupleAttrSetDescriptorBuilder & AnchorLength(std::uint32_t length)
pointer operator->() const
std::forward_iterator_tag iterator_category
reference operator*() const
std::ptrdiff_t difference_type
Iter_t fIter
The wrapped vector iterator.
bool operator!=(const iterator &rh) const
std::vector< RNTupleAttrSetDescriptor >::const_iterator Iter_t
bool operator==(const iterator &rh) const
Used to loop over all the Attribute Sets linked to an RNTuple.
const RNTupleDescriptor & fNTuple
The associated RNTuple for this range.
RNTupleAttrSetDescriptorIterable(const RNTupleDescriptor &ntuple)
Metadata stored for every Attribute Set linked to an RNTuple.
RNTupleAttrSetDescriptor & operator=(const RNTupleAttrSetDescriptor &other)=delete
std::uint16_t GetSchemaVersionMinor() const
bool operator==(const RNTupleAttrSetDescriptor &other) const
RNTupleAttrSetDescriptor()=default
std::uint16_t fSchemaVersionMajor
RNTupleAttrSetDescriptor Clone() const
std::uint32_t fAnchorLength
uncompressed size of the linked anchor
RNTupleLocator fAnchorLocator
RNTupleAttrSetDescriptor(const RNTupleAttrSetDescriptor &other)=delete
const std::string & GetName() const
RNTupleAttrSetDescriptor & operator=(RNTupleAttrSetDescriptor &&other)=default
const RNTupleLocator & GetAnchorLocator() const
std::uint16_t fSchemaVersionMinor
bool operator!=(const RNTupleAttrSetDescriptor &other) const
RNTupleAttrSetDescriptor(RNTupleAttrSetDescriptor &&other)=default
std::uint16_t GetSchemaVersionMajor() const
std::uint32_t GetAnchorLength() const
A helper class for piece-wise construction of an RClusterDescriptor.
RClusterDescriptor fCluster
RClusterDescriptorBuilder & NEntries(std::uint64_t nEntries)
const RClusterDescriptor::RColumnRange & GetColumnRange(ROOT::DescriptorId_t physicalId)
RClusterDescriptorBuilder & ClusterId(ROOT::DescriptorId_t clusterId)
RClusterDescriptorBuilder & FirstEntryIndex(std::uint64_t firstEntryIndex)
A helper class for piece-wise construction of an RClusterGroupDescriptor.
RClusterGroupDescriptorBuilder & EntrySpan(std::uint64_t entrySpan)
RClusterGroupDescriptorBuilder & PageListLocator(const RNTupleLocator &pageListLocator)
RClusterGroupDescriptorBuilder()=default
RClusterGroupDescriptorBuilder & PageListLength(std::uint64_t pageListLength)
RClusterGroupDescriptorBuilder & MinEntry(std::uint64_t minEntry)
RClusterGroupDescriptor fClusterGroup
void AddSortedClusters(const std::vector< ROOT::DescriptorId_t > &clusterIds)
RClusterGroupDescriptorBuilder & ClusterGroupId(ROOT::DescriptorId_t clusterGroupId)
RClusterGroupDescriptorBuilder & NClusters(std::uint32_t nClusters)
A helper class for piece-wise construction of an RColumnDescriptor.
ROOT::DescriptorId_t GetRepresentationIndex() const
RColumnDescriptorBuilder & SetSuppressedDeferred()
RColumnDescriptorBuilder & LogicalColumnId(ROOT::DescriptorId_t logicalColumnId)
RColumnDescriptorBuilder & FieldId(ROOT::DescriptorId_t fieldId)
RColumnDescriptorBuilder & BitsOnStorage(std::uint16_t bitsOnStorage)
RColumnDescriptorBuilder & ValueRange(double min, double max)
RColumnDescriptorBuilder()=default
Make an empty column descriptor builder.
RColumnDescriptorBuilder & ValueRange(std::optional< RColumnDescriptor::RValueRange > valueRange)
RColumnDescriptorBuilder & Type(ROOT::ENTupleColumnType type)
RColumnDescriptorBuilder & PhysicalColumnId(ROOT::DescriptorId_t physicalColumnId)
RColumnDescriptorBuilder & FirstElementIndex(std::uint64_t firstElementIdx)
RColumnDescriptorBuilder & Index(std::uint32_t index)
RColumnDescriptorBuilder & RepresentationIndex(std::uint16_t representationIndex)
ROOT::DescriptorId_t GetFieldId() const
A column element encapsulates the translation between basic C++ types and their column representation...
A helper class for piece-wise construction of an RFieldDescriptor.
RFieldDescriptorBuilder & NRepetitions(std::uint64_t nRepetitions)
RFieldDescriptorBuilder & Structure(const ROOT::ENTupleStructure &structure)
RFieldDescriptorBuilder()=default
Make an empty dangling field descriptor.
RFieldDescriptorBuilder & TypeAlias(const std::string &typeAlias)
RFieldDescriptorBuilder & ProjectionSourceId(ROOT::DescriptorId_t id)
RFieldDescriptorBuilder & TypeVersion(std::uint32_t typeVersion)
ROOT::DescriptorId_t GetParentId() const
RFieldDescriptorBuilder & TypeChecksum(const std::optional< std::uint32_t > typeChecksum)
RFieldDescriptorBuilder & ParentId(ROOT::DescriptorId_t id)
RFieldDescriptorBuilder & FieldDescription(const std::string &fieldDescription)
RFieldDescriptorBuilder & FieldVersion(std::uint32_t fieldVersion)
RFieldDescriptorBuilder & FieldName(const std::string &fieldName)
RFieldDescriptorBuilder & FieldId(ROOT::DescriptorId_t fieldId)
RFieldDescriptorBuilder & TypeName(const std::string &typeName)
A helper class for piece-wise construction of an RNTupleDescriptor.
const RNTupleDescriptor & GetDescriptor() const
void SetOnDiskHeaderSize(std::uint64_t size)
void SetOnDiskHeaderXxHash3(std::uint64_t xxhash3)
void AddToOnDiskFooterSize(std::uint64_t size)
The real footer size also include the page list envelopes.
RNTupleDescriptor fDescriptor
std::forward_iterator_tag iterator_category
pointer operator->() const
std::unordered_map< ROOT::DescriptorId_t, RColumnRange >::const_iterator Iter_t
bool operator!=(const iterator &rh) const
std::ptrdiff_t difference_type
Iter_t fIter
The wrapped map iterator.
bool operator==(const iterator &rh) const
reference operator*() const
const RClusterDescriptor & fDesc
RColumnRangeIterable(const RClusterDescriptor &desc)
The window of element indexes of a particular column in a particular cluster.
void SetCompressionSettings(std::optional< std::uint32_t > comp)
bool IsSuppressed() const
void SetPhysicalColumnId(ROOT::DescriptorId_t id)
ROOT::DescriptorId_t GetPhysicalColumnId() const
void SetIsSuppressed(bool suppressed)
bool operator==(const RColumnRange &other) const
void SetFirstElementIndex(ROOT::NTupleSize_t idx)
void SetNElements(ROOT::NTupleSize_t n)
std::optional< std::uint32_t > GetCompressionSettings() const
std::optional< std::uint32_t > fCompressionSettings
The usual format for ROOT compression settings (see Compression.h).
ROOT::NTupleSize_t GetNElements() const
ROOT::NTupleSize_t GetFirstElementIndex() const
RColumnRange(ROOT::DescriptorId_t physicalColumnId, ROOT::NTupleSize_t firstElementIndex, ROOT::NTupleSize_t nElements, std::optional< std::uint32_t > compressionSettings, bool suppressed=false)
void IncrementFirstElementIndex(ROOT::NTupleSize_t by)
bool Contains(ROOT::NTupleSize_t index) const
void IncrementNElements(ROOT::NTupleSize_t by)
Metadata for RNTuple clusters.
ROOT::NTupleSize_t GetNEntries() const
ROOT::NTupleSize_t fFirstEntryIndex
Clusters can be swapped by adjusting the entry offsets of the cluster and all ranges.
RClusterDescriptor & operator=(const RClusterDescriptor &other)=delete
ROOT::DescriptorId_t GetId() const
const RPageRange & GetPageRange(ROOT::DescriptorId_t physicalId) const
RClusterDescriptor(RClusterDescriptor &&other)=default
RClusterDescriptor()=default
std::unordered_map< ROOT::DescriptorId_t, RColumnRange > fColumnRanges
ROOT::NTupleSize_t fNEntries
ROOT::DescriptorId_t fClusterId
bool ContainsColumn(ROOT::DescriptorId_t physicalId) const
RClusterDescriptor & operator=(RClusterDescriptor &&other)=default
const RColumnRange & GetColumnRange(ROOT::DescriptorId_t physicalId) const
ROOT::NTupleSize_t GetFirstEntryIndex() const
std::unordered_map< ROOT::DescriptorId_t, RPageRange > fPageRanges
RClusterDescriptor(const RClusterDescriptor &other)=delete
Clusters are bundled in cluster groups.
RNTupleLocator fPageListLocator
The page list that corresponds to the cluster group.
RClusterGroupDescriptor & operator=(const RClusterGroupDescriptor &other)=delete
std::vector< ROOT::DescriptorId_t > fClusterIds
The cluster IDs can be empty if the corresponding page list is not loaded.
ROOT::DescriptorId_t GetId() const
RClusterGroupDescriptor(RClusterGroupDescriptor &&other)=default
std::uint64_t fMinEntry
The minimum first entry number of the clusters in the cluster group.
bool HasClusterDetails() const
A cluster group is loaded in two stages.
std::uint32_t fNClusters
Number of clusters is always known even if the cluster IDs are not (yet) populated.
RClusterGroupDescriptor & operator=(RClusterGroupDescriptor &&other)=default
std::uint32_t GetNClusters() const
const std::vector< ROOT::DescriptorId_t > & GetClusterIds() const
std::uint64_t fPageListLength
Uncompressed size of the page list.
std::uint64_t GetPageListLength() const
std::uint64_t GetMinEntry() const
std::uint64_t GetEntrySpan() const
RClusterGroupDescriptor()=default
RNTupleLocator GetPageListLocator() const
RClusterGroupDescriptor(const RClusterGroupDescriptor &other)=delete
ROOT::DescriptorId_t fClusterGroupId
std::uint64_t fEntrySpan
Number of entries that are (partially for sharded clusters) covered by this cluster group.
Metadata stored for every column of an RNTuple.
bool IsSuppressedDeferredColumn() const
std::optional< RValueRange > GetValueRange() const
ROOT::DescriptorId_t fPhysicalColumnId
Usually identical to the logical column ID, except for alias columns where it references the shadowed...
RColumnDescriptor()=default
ROOT::DescriptorId_t fLogicalColumnId
The actual column identifier, which is the link to the corresponding field.
RColumnDescriptor(const RColumnDescriptor &other)=delete
std::uint64_t GetFirstElementIndex() const
ROOT::DescriptorId_t fFieldId
Every column belongs to one and only one field.
std::int64_t fFirstElementIndex
The absolute value specifies the index for the first stored element for this column.
ROOT::DescriptorId_t GetFieldId() const
RColumnDescriptor(RColumnDescriptor &&other)=default
std::uint32_t fIndex
A field can be serialized into several columns, which are numbered from zero to $n$.
RColumnDescriptor & operator=(RColumnDescriptor &&other)=default
std::uint32_t GetIndex() const
std::uint16_t fBitsOnStorage
The size in bits of elements of this column.
std::uint16_t fRepresentationIndex
A field may use multiple column representations, which are numbered from zero to $m$.
bool IsAliasColumn() const
ROOT::ENTupleColumnType fType
The on-disk column type.
ROOT::ENTupleColumnType GetType() const
ROOT::DescriptorId_t GetPhysicalId() const
std::uint16_t GetRepresentationIndex() const
std::optional< RValueRange > fValueRange
Optional value range (used e.g. by quantized real fields)
bool IsDeferredColumn() const
std::uint16_t GetBitsOnStorage() const
RColumnDescriptor & operator=(const RColumnDescriptor &other)=delete
ROOT::DescriptorId_t GetLogicalId() const
Base class for all ROOT issued exceptions.
A field translates read and write calls from/to underlying columns to/from tree values.
Metadata stored for every field of an RNTuple.
const std::string & GetTypeAlias() const
std::unique_ptr< ROOT::RFieldBase > CreateField(const RNTupleDescriptor &ntplDesc, const ROOT::RCreateFieldOptions &options={}) const
In general, we create a field simply from the C++ type name.
std::uint32_t fFieldVersion
The version of the C++-type-to-column translation mechanics.
ROOT::DescriptorId_t fFieldId
RFieldDescriptor Clone() const
Get a copy of the descriptor.
ROOT::DescriptorId_t GetId() const
std::uint64_t fNRepetitions
The number of elements per entry for fixed-size arrays.
std::uint32_t GetFieldVersion() const
const std::vector< ROOT::DescriptorId_t > & GetLogicalColumnIds() const
std::uint32_t fColumnCardinality
The number of columns in the column representations of the field.
ROOT::DescriptorId_t fProjectionSourceId
For projected fields, the source field ID.
bool IsCustomEnum(const RNTupleDescriptor &desc) const R__DEPRECATED(6
ROOT::ENTupleStructure GetStructure() const
bool operator==(const RFieldDescriptor &other) const
RFieldDescriptor(const RFieldDescriptor &other)=delete
bool IsCustomClass() const R__DEPRECATED(6
std::uint32_t GetColumnCardinality() const
bool IsStdAtomic() const R__DEPRECATED(6
std::string fFieldDescription
Free text set by the user.
RFieldDescriptor & operator=(const RFieldDescriptor &other)=delete
RFieldDescriptor & operator=(RFieldDescriptor &&other)=default
const std::vector< ROOT::DescriptorId_t > & GetLinkIds() const
ROOT::DescriptorId_t fParentId
Establishes sub field relationships, such as classes and collections.
ROOT::DescriptorId_t GetParentId() const
std::string fTypeAlias
A typedef or using directive that resolved to the type name during field creation.
ROOT::ENTupleStructure fStructure
The structural information carried by this field in the data model tree.
std::uint64_t GetNRepetitions() const
RFieldDescriptor(RFieldDescriptor &&other)=default
bool IsProjectedField() const
std::vector< ROOT::DescriptorId_t > fLinkIds
The pointers in the other direction from parent to children.
std::string fFieldName
The leaf name, not including parent fields.
const std::string & GetFieldDescription() const
std::optional< std::uint32_t > GetTypeChecksum() const
ROOT::DescriptorId_t GetProjectionSourceId() const
std::uint32_t fTypeVersion
The version of the C++ type itself.
std::string fTypeName
The C++ type that was used when writing the field.
std::uint32_t GetTypeVersion() const
const std::string & GetFieldName() const
RFieldDescriptor()=default
std::vector< ROOT::DescriptorId_t > fLogicalColumnIds
The ordered list of columns attached to this field: first by representation index then by column inde...
const std::string & GetTypeName() const
std::optional< std::uint32_t > fTypeChecksum
For custom classes, we store the ROOT TClass reported checksum to facilitate the use of I/O rules tha...
std::forward_iterator_tag iterator_category
std::unordered_map< ROOT::DescriptorId_t, RClusterDescriptor >::const_iterator Iter_t
Iter_t fIter
The wrapped map iterator.
pointer operator->() const
reference operator*() const
bool operator!=(const iterator &rh) const
std::ptrdiff_t difference_type
bool operator==(const iterator &rh) const
Used to loop over all the clusters of an RNTuple (in unspecified order)
const RNTupleDescriptor & fNTuple
The associated RNTuple for this range.
RClusterDescriptorIterable(const RNTupleDescriptor &ntuple)
pointer operator->() const
bool operator==(const iterator &rh) const
std::ptrdiff_t difference_type
std::forward_iterator_tag iterator_category
std::unordered_map< ROOT::DescriptorId_t, RClusterGroupDescriptor >::const_iterator Iter_t
bool operator!=(const iterator &rh) const
Iter_t fIter
The wrapped map iterator.
reference operator*() const
Used to loop over all the cluster groups of an RNTuple (in unspecified order)
const RNTupleDescriptor & fNTuple
The associated RNTuple for this range.
RClusterGroupDescriptorIterable(const RNTupleDescriptor &ntuple)
bool operator==(const iterator &rh) const
pointer operator->() const
std::ptrdiff_t difference_type
reference operator*() const
const RNTupleDescriptor & fNTuple
The enclosing range's RNTuple.
bool operator!=(const iterator &rh) const
const std::vector< ROOT::DescriptorId_t > & fColumns
The enclosing range's descriptor id list.
std::forward_iterator_tag iterator_category
RIterator(const RNTupleDescriptor &ntuple, const std::vector< ROOT::DescriptorId_t > &columns, std::size_t index)
Used to loop over a field's associated columns.
const RNTupleDescriptor & fNTuple
The associated RNTuple for this range.
pointer operator->() const
RIterator(const RNTupleDescriptor &ntuple, const std::vector< ROOT::DescriptorId_t > &fieldChildren, std::size_t index)
bool operator==(const iterator &rh) const
bool operator!=(const iterator &rh) const
const std::vector< ROOT::DescriptorId_t > & fFieldChildren
The enclosing range's descriptor id list.
const RNTupleDescriptor & fNTuple
The enclosing range's RNTuple.
std::ptrdiff_t difference_type
reference operator*() const
std::forward_iterator_tag iterator_category
Used to loop over a field's child fields.
const RNTupleDescriptor & fNTuple
The associated RNTuple for this range.
RFieldDescriptorIterable(const RNTupleDescriptor &ntuple, const RFieldDescriptor &field, const std::function< bool(ROOT::DescriptorId_t, ROOT::DescriptorId_t)> &comparator)
Sort the range using an arbitrary comparison function.
RFieldDescriptorIterable(const RNTupleDescriptor &ntuple, const RFieldDescriptor &field)
The on-storage metadata of an RNTuple.
std::uint64_t GetGeneration() const
RNTupleDescriptor(RNTupleDescriptor &&other)=default
const RClusterGroupDescriptor & GetClusterGroupDescriptor(ROOT::DescriptorId_t clusterGroupId) const
const RColumnDescriptor & GetColumnDescriptor(ROOT::DescriptorId_t columnId) const
std::set< unsigned int > fFeatureFlags
std::unordered_map< ROOT::DescriptorId_t, RClusterGroupDescriptor > fClusterGroupDescriptors
const RFieldDescriptor & GetFieldDescriptor(ROOT::DescriptorId_t fieldId) const
RNTupleDescriptor & operator=(RNTupleDescriptor &&other)=default
std::vector< Experimental::RNTupleAttrSetDescriptor > fAttributeSets
List of AttributeSets linked to this RNTuple.
std::size_t GetNExtraTypeInfos() const
std::uint64_t GetOnDiskFooterSize() const
std::size_t GetNActiveClusters() const
const std::string & GetName() const
std::uint64_t fOnDiskFooterSize
Like fOnDiskHeaderSize, contains both cluster summaries and page locations.
ROOT::NTupleSize_t GetNEntries() const
We know the number of entries from adding the cluster summaries.
ROOT::DescriptorId_t GetFieldZeroId() const
Returns the logical parent of all top-level RNTuple data fields.
std::unordered_map< ROOT::DescriptorId_t, RClusterDescriptor > fClusterDescriptors
Potentially a subset of all the available clusters.
std::size_t GetNAttributeSets() const
std::size_t GetNClusters() const
std::size_t GetNPhysicalColumns() const
const RHeaderExtension * GetHeaderExtension() const
Return header extension information; if the descriptor does not have a header extension,...
std::uint64_t fOnDiskHeaderXxHash3
Set by the descriptor builder when deserialized.
const RClusterDescriptor & GetClusterDescriptor(ROOT::DescriptorId_t clusterId) const
std::string fName
The RNTuple name needs to be unique in a given storage location (file)
RNTupleDescriptor(const RNTupleDescriptor &other)=delete
std::uint64_t fOnDiskHeaderSize
Set by the descriptor builder when deserialized.
RNTupleDescriptor()=default
std::uint64_t GetOnDiskHeaderXxHash3() const
std::vector< ROOT::DescriptorId_t > fSortedClusterGroupIds
References cluster groups sorted by entry range and thus allows for binary search.
std::unordered_map< ROOT::DescriptorId_t, RColumnDescriptor > fColumnDescriptors
std::unordered_map< ROOT::DescriptorId_t, RFieldDescriptor > fFieldDescriptors
std::size_t GetNFields() const
bool HasFeature(unsigned int flag) const
std::uint64_t GetOnDiskHeaderSize() const
std::string fDescription
Free text from the user.
std::vector< RExtraTypeInfoDescriptor > fExtraTypeInfoDescriptors
std::size_t GetNLogicalColumns() const
RNTupleDescriptor & operator=(const RNTupleDescriptor &other)=delete
std::size_t GetNClusterGroups() const
RNTupleDescriptor CloneSchema() const
Creates a descriptor containing only the schema information about this RNTuple, i....
const std::string & GetDescription() const
std::unique_ptr< RHeaderExtension > fHeaderExtension
const RFieldDescriptor & GetFieldZero() const
Generic information about the physical location of data.
RNTupleDescriptor CloneDescriptorSchema(const RNTupleDescriptor &desc)
bool IsCustomEnumFieldDesc(const RNTupleDescriptor &desc, const RFieldDescriptor &fieldDesc)
Tells if the field describes a user-defined enum type.
std::vector< ROOT::Internal::RNTupleClusterBoundaries > GetClusterBoundaries(const RNTupleDescriptor &desc)
Return the cluster boundaries for each cluster in this RNTuple.
bool IsStdAtomicFieldDesc(const RFieldDescriptor &fieldDesc)
Tells if the field describes a std::atomic<T> type.
EExtraTypeInfoIds
Used in RExtraTypeInfoDescriptor.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
constexpr NTupleSize_t kInvalidNTupleIndex
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId
ENTupleStructure
The fields in the RNTuple data model tree can carry different structural information about the type s...
ROOT::NTupleSize_t fFirstEntry
ROOT::NTupleSize_t fLastEntryPlusOne
Additional information about a page in an in-memory RPageRange.
RPageInfoExtended(const RPageInfo &pageInfo, ROOT::NTupleSize_t firstElementIndex, ROOT::NTupleSize_t pageNumber)
void SetFirstElementIndex(ROOT::NTupleSize_t firstInPage)
RPageInfoExtended()=default
ROOT::NTupleSize_t GetPageNumber() const
void SetPageNumber(ROOT::NTupleSize_t pageNumber)
ROOT::NTupleSize_t GetFirstElementIndex() const
Information about a single page in the context of a cluster's page range.
void SetLocator(const RNTupleLocator &locator)
RNTupleLocator & GetLocator()
std::uint32_t GetNElements() const
bool operator==(const RPageInfo &other) const
const RNTupleLocator & GetLocator() const
RNTupleLocator fLocator
The meaning of fLocator depends on the storage backend.
void SetHasChecksum(bool hasChecksum)
void SetNElements(std::uint32_t n)
RPageInfo(std::uint32_t nElements, const RNTupleLocator &locator, bool hasChecksum)
bool operator==(RValueRange other) const
RValueRange(double min, double max)
RValueRange(std::pair< double, double > range)
bool operator!=(RValueRange other) const
Modifiers passed to CreateModel()
void SetCreateBare(bool v)
bool GetCreateBare() const
void SetEmulateUnknownTypes(bool v)
void SetReconstructProjections(bool v)
bool GetEmulateUnknownTypes() const
bool GetReconstructProjections() const
bool GetForwardCompatible() const
void SetForwardCompatible(bool v)