Logo ROOT  
Reference Guide
RNTupleDescriptor.hxx
Go to the documentation of this file.
1 /// \file ROOT/RNTupleDescriptor.hxx
2 /// \ingroup NTuple ROOT7
3 /// \author Jakob Blomer <jblomer@cern.ch>
4 /// \date 2018-07-19
5 /// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6 /// is welcome!
7 
8 /*************************************************************************
9  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
10  * All rights reserved. *
11  * *
12  * For the licensing terms see $ROOTSYS/LICENSE. *
13  * For the list of contributors see $ROOTSYS/README/CREDITS. *
14  *************************************************************************/
15 
16 #ifndef ROOT7_RNTupleDescriptor
17 #define ROOT7_RNTupleDescriptor
18 
19 #include <ROOT/RColumnModel.hxx>
20 #include <ROOT/RError.hxx>
21 #include <ROOT/RNTupleUtil.hxx>
22 #include <ROOT/RStringView.hxx>
23 
24 #include <algorithm>
25 #include <chrono>
26 #include <functional>
27 #include <memory>
28 #include <ostream>
29 #include <vector>
30 #include <string>
31 #include <unordered_map>
32 
33 namespace ROOT {
34 namespace Experimental {
35 
36 class RDanglingFieldDescriptor;
37 class RNTupleDescriptorBuilder;
38 class RNTupleModel;
39 
40 // clang-format off
41 /**
42 \class ROOT::Experimental::RFieldDescriptor
43 \ingroup NTuple
44 \brief Meta-data stored for every field of an ntuple
45 */
46 // clang-format on
50 
51 private:
53  /// The version of the C++-type-to-column translation mechanics
55  /// The version of the C++ type itself
57  /// The leaf name, not including parent fields
58  std::string fFieldName;
59  /// Free text set by the user
60  std::string fFieldDescription;
61  /// The C++ type that was used when writing the field
62  std::string fTypeName;
63  /// The number of elements per entry for fixed-size arrays
64  std::uint64_t fNRepetitions = 0;
65  /// The structural information carried by this field in the data model tree
67  /// Establishes sub field relationships, such as classes and collections
69  /// The pointers in the other direction from parent to children. They are serialized, too, to keep the
70  /// order of sub fields.
71  std::vector<DescriptorId_t> fLinkIds;
72 
73 public:
74  RFieldDescriptor() = default;
75  RFieldDescriptor(const RFieldDescriptor &other) = delete;
76  RFieldDescriptor &operator =(const RFieldDescriptor &other) = delete;
77  RFieldDescriptor(RFieldDescriptor &&other) = default;
79 
80  /// In order to handle changes to the serialization routine in future ntuple versions
81  static constexpr std::uint16_t kFrameVersionCurrent = 0;
82  static constexpr std::uint16_t kFrameVersionMin = 0;
83 
84  bool operator==(const RFieldDescriptor &other) const;
85  /// Get a copy of the descriptor
86  RFieldDescriptor Clone() const;
87 
88  DescriptorId_t GetId() const { return fFieldId; }
91  std::string GetFieldName() const { return fFieldName; }
92  std::string GetFieldDescription() const { return fFieldDescription; }
93  std::string GetTypeName() const { return fTypeName; }
94  std::uint64_t GetNRepetitions() const { return fNRepetitions; }
96  DescriptorId_t GetParentId() const { return fParentId; }
97  const std::vector<DescriptorId_t> &GetLinkIds() const { return fLinkIds; }
98 };
99 
100 
101 // clang-format off
102 /**
103 \class ROOT::Experimental::RColumnDescriptor
104 \ingroup NTuple
105 \brief Meta-data stored for every column of an ntuple
106 */
107 // clang-format on
110 
111 private:
113  /// Versions can change, e.g., when new column types are added
115  /// Contains the column type and whether it is sorted
117  /// Every column belongs to one and only one field
119  /// A field can be serialized into several columns, which are numbered from zero to $n$
120  std::uint32_t fIndex;
121 
122 public:
123  /// In order to handle changes to the serialization routine in future ntuple versions
124  static constexpr std::uint16_t kFrameVersionCurrent = 0;
125  static constexpr std::uint16_t kFrameVersionMin = 0;
126 
127  RColumnDescriptor() = default;
128  RColumnDescriptor(const RColumnDescriptor &other) = delete;
132 
133  bool operator==(const RColumnDescriptor &other) const;
134 
135  DescriptorId_t GetId() const { return fColumnId; }
136  RNTupleVersion GetVersion() const { return fVersion; }
137  RColumnModel GetModel() const { return fModel; }
138  std::uint32_t GetIndex() const { return fIndex; }
139  DescriptorId_t GetFieldId() const { return fFieldId; }
140 };
141 
142 
143 // clang-format off
144 /**
145 \class ROOT::Experimental::RClusterDescriptor
146 \ingroup NTuple
147 \brief Meta-data for a set of ntuple clusters
148 
149 The cluster descriptor might carry information of only a subset of available clusters, for instance if multiple
150 files are chained and not all of them have been processed yet.
151 */
152 // clang-format on
155 
156 public:
157  /// Generic information about the physical location of data. Values depend on the concrete storage type. E.g.,
158  /// for a local file fUrl might be unsused and fPosition might be a file offset. Objects on storage can be compressed
159  /// and therefore we need to store their actual size.
160  struct RLocator {
161  std::int64_t fPosition = 0;
162  std::uint32_t fBytesOnStorage = 0;
163  std::string fUrl;
164 
165  bool operator==(const RLocator &other) const {
166  return fPosition == other.fPosition && fBytesOnStorage == other.fBytesOnStorage && fUrl == other.fUrl;
167  }
168  };
169 
170  /// The window of element indexes of a particular column in a particular cluster
171  struct RColumnRange {
173  /// A 64bit element index
175  /// A 32bit value for the number of column elements in the cluster
177  /// The usual format for ROOT compression settings (see Compression.h).
178  /// The pages of a particular column in a particular cluster are all compressed with the same settings.
179  std::int64_t fCompressionSettings = 0;
180 
181  // TODO(jblomer): we perhaps want to store summary information, such as average, min/max, etc.
182  // Should this be done on the field level?
183 
184  bool operator==(const RColumnRange &other) const {
185  return fColumnId == other.fColumnId && fFirstElementIndex == other.fFirstElementIndex &&
187  }
188 
189  bool Contains(NTupleSize_t index) const {
190  return (fFirstElementIndex <= index && (fFirstElementIndex + fNElements) > index);
191  }
192  };
193 
194  /// Records the parition of data into pages for a particular column in a particular cluster
195  struct RPageRange {
196  /// We do not need to store the element size / uncompressed page size because we know to which column
197  /// the page belongs
198  struct RPageInfo {
199  /// The sum of the elements of all the pages must match the corresponding fNElements field in fColumnRanges
201  /// The meaning of fLocator depends on the storage backend.
203 
204  bool operator==(const RPageInfo &other) const {
205  return fNElements == other.fNElements && fLocator == other.fLocator;
206  }
207  };
208 
209  RPageRange() = default;
210  RPageRange(const RPageRange &other) = delete;
211  RPageRange &operator =(const RPageRange &other) = delete;
212  RPageRange(RPageRange &&other) = default;
213  RPageRange &operator =(RPageRange &&other) = default;
214 
216  std::vector<RPageInfo> fPageInfos;
217 
218  bool operator==(const RPageRange &other) const {
219  return fColumnId == other.fColumnId && fPageInfos == other.fPageInfos;
220  }
221  };
222 
223 private:
225  /// Future versions of the cluster descriptor might add more meta-data, e.g. a semantic checksum
227  /// Clusters can be swapped by adjusting the entry offsets
230  /// For pre-fetching / caching an entire contiguous cluster
232 
233  std::unordered_map<DescriptorId_t, RColumnRange> fColumnRanges;
234  std::unordered_map<DescriptorId_t, RPageRange> fPageRanges;
235 
236 public:
237  /// In order to handle changes to the serialization routine in future ntuple versions
238  static constexpr std::uint16_t kFrameVersionCurrent = 0;
239  static constexpr std::uint16_t kFrameVersionMin = 0;
240 
241  RClusterDescriptor() = default;
242  RClusterDescriptor(const RClusterDescriptor &other) = delete;
246 
247  bool operator==(const RClusterDescriptor &other) const;
248 
249  DescriptorId_t GetId() const { return fClusterId; }
250  RNTupleVersion GetVersion() const { return fVersion; }
252  ClusterSize_t GetNEntries() const { return fNEntries; }
253  RLocator GetLocator() const { return fLocator; }
254  const RColumnRange &GetColumnRange(DescriptorId_t columnId) const { return fColumnRanges.at(columnId); }
255  const RPageRange &GetPageRange(DescriptorId_t columnId) const { return fPageRanges.at(columnId); }
256 };
257 
258 
259 // clang-format off
260 /**
261 \class ROOT::Experimental::RNTupleDescriptor
262 \ingroup NTuple
263 \brief The on-storage meta-data of an ntuple
264 
265 Represents the on-disk (on storage) information about an ntuple. The meta-data consists of a header and one or
266 several footers. The header carries the ntuple schema, i.e. the fields and the associated columns and their
267 relationships. The footer(s) carry information about one or several clusters. For every cluster, a footer stores
268 its location and size, and for every column the range of element indexes as well as a list of pages and page
269 locations.
270 
271 The descriptor provide machine-independent (de-)serialization of headers and footers, and it provides lookup routines
272 for ntuple objects (pages, clusters, ...). It is supposed to be usable by all RPageStorage implementations.
273 
274 The serialization does not use standard ROOT streamers in order to not let it depend on libCore. The serialization uses
275 the concept of frames: header, footer, and substructures have a preamble with version numbers and the size of the
276 writte struct. This allows for forward and backward compatibility when the meta-data evolves.
277 */
278 // clang-format on
281 
282 private:
283  /// The ntuple name needs to be unique in a given storage location (file)
284  std::string fName;
285  /// Free text from the user
286  std::string fDescription;
287  /// The origin of the data
288  std::string fAuthor;
289  /// The current responsible for storing the data
290  std::string fCustodian;
291  /// The time stamp of the ntuple data (immutable)
292  std::chrono::system_clock::time_point fTimeStampData;
293  /// The time stamp of writing the data to storage, which gets updated when re-written
294  std::chrono::system_clock::time_point fTimeStampWritten;
295  /// The version evolves with the ntuple summary meta-data
297  /// Every NTuple gets a unique identifier
299  /// Column sets that are created as derived sets from existing NTuples share the same group id.
300  /// NTuples in the same group have the same number of entries and are supposed to contain associated data.
302 
303  std::unordered_map<DescriptorId_t, RFieldDescriptor> fFieldDescriptors;
304  std::unordered_map<DescriptorId_t, RColumnDescriptor> fColumnDescriptors;
305  /// May contain only a subset of all the available clusters, e.g. the clusters of the current file
306  /// from a chain of files
307  std::unordered_map<DescriptorId_t, RClusterDescriptor> fClusterDescriptors;
308 
309 public:
310  // clang-format off
311  /**
312  \class ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange
313  \ingroup NTuple
314  \brief Used to loop over a field's associated columns
315  */
316  // clang-format on
318  private:
319  /// The associated NTuple for this range.
321  /// The descriptor ids of the columns ordered by index id
322  std::vector<DescriptorId_t> fColumns = {};
323  public:
324  class RIterator {
325  private:
326  /// The enclosing range's NTuple.
328  /// The enclosing range's descriptor id list.
329  const std::vector<DescriptorId_t> &fColumns;
330  std::size_t fIndex = 0;
331  public:
332  using iterator_category = std::forward_iterator_tag;
335  using difference_type = std::ptrdiff_t;
337  using reference = const RColumnDescriptor &;
338 
339  RIterator(const RNTupleDescriptor &ntuple, const std::vector<DescriptorId_t> &columns, std::size_t index)
340  : fNTuple(ntuple), fColumns(columns), fIndex(index) {}
341  iterator operator++() { ++fIndex; return *this; }
343  bool operator!=(const iterator &rh) const { return fIndex != rh.fIndex; }
344  bool operator==(const iterator &rh) const { return fIndex == rh.fIndex; }
345  };
346 
348  : fNTuple(ntuple)
349  {
350  for (unsigned int i = 0; true; ++i) {
351  auto columnId = ntuple.FindColumnId(field.GetId(), i);
352  if (columnId == kInvalidDescriptorId)
353  break;
354  fColumns.emplace_back(columnId);
355  }
356  }
358  RIterator end() { return RIterator(fNTuple, fColumns, fColumns.size()); }
359  };
360 
361  // clang-format off
362  /**
363  \class ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange
364  \ingroup NTuple
365  \brief Used to loop over a field's child fields
366  */
367  // clang-format on
369  private:
370  /// The associated NTuple for this range.
372  /// The descriptor ids of the child fields. These may be sorted using
373  /// a comparison function.
374  std::vector<DescriptorId_t> fFieldChildren = {};
375  public:
376  class RIterator {
377  private:
378  /// The enclosing range's NTuple.
380  /// The enclosing range's descriptor id list.
381  const std::vector<DescriptorId_t>& fFieldChildren;
382  std::size_t fIndex = 0;
383  public:
384  using iterator_category = std::forward_iterator_tag;
387  using difference_type = std::ptrdiff_t;
389  using reference = const RFieldDescriptor&;
390 
391  RIterator(const RNTupleDescriptor& ntuple, const std::vector<DescriptorId_t>& fieldChildren,
392  std::size_t index) : fNTuple(ntuple), fFieldChildren(fieldChildren), fIndex(index) {}
393  iterator operator++() { ++fIndex; return *this; }
397  );
398  }
399  bool operator!=(const iterator& rh) const { return fIndex != rh.fIndex; }
400  bool operator==(const iterator& rh) const { return fIndex == rh.fIndex; }
401  };
403  : fNTuple(ntuple), fFieldChildren(field.GetLinkIds()) {}
404  /// Sort the range using an arbitrary comparison function.
406  const std::function<bool(DescriptorId_t, DescriptorId_t)>& comparator)
407  : fNTuple(ntuple), fFieldChildren(field.GetLinkIds())
408  {
409  std::sort(fFieldChildren.begin(), fFieldChildren.end(), comparator);
410  }
412  return RIterator(fNTuple, fFieldChildren, 0);
413  }
416  }
417  };
418 
419  /// In order to handle changes to the serialization routine in future ntuple versions
420  static constexpr std::uint16_t kFrameVersionCurrent = 0;
421  static constexpr std::uint16_t kFrameVersionMin = 0;
422  /// The preamble is sufficient to get the length of the header
423  static constexpr unsigned int kNBytesPreamble = 8;
424  /// The last few bytes after the footer store the length of footer and header
425  static constexpr unsigned int kNBytesPostscript = 16;
426 
427  RNTupleDescriptor() = default;
428  RNTupleDescriptor(const RNTupleDescriptor &other) = delete;
432 
433  bool operator ==(const RNTupleDescriptor &other) const;
434 
435  /// We deliberately do not use ROOT's built-in serialization in order to allow for use of RNTuple's without libCore
436  /// Serializes the global ntuple information as well as the column and field schemata
437  /// Returns the number of bytes and fills buffer if it is not nullptr.
438  /// TODO(jblomer): instead of runtime testing for nullptr, there should be a template for the case where
439  /// only the size of the buffer is required.
440  std::uint32_t SerializeHeader(void* buffer) const;
441  /// Serializes cluster meta data. Returns the number of bytes and fills buffer if it is not nullptr.
442  std::uint32_t SerializeFooter(void* buffer) const;
443  /// Given kNBytesPostscript bytes, extract the header and footer lengths in bytes
444  static void LocateMetadata(const void *postscript, std::uint32_t &szHeader, std::uint32_t &szFooter);
445 
446  std::uint32_t GetHeaderSize() const {
447  return SerializeHeader(nullptr);
448  }
449  std::uint32_t GetFooterSize() const {
450  return SerializeFooter(nullptr);
451  }
452 
454  return fFieldDescriptors.at(fieldId);
455  }
457  return fColumnDescriptors.at(columnId);
458  }
460  return fClusterDescriptors.at(clusterId);
461  }
462 
464  return RFieldDescriptorRange(*this, fieldDesc);
465  }
467  const std::function<bool(DescriptorId_t, DescriptorId_t)>& comparator) const
468  {
469  return RFieldDescriptorRange(*this, fieldDesc, comparator);
470  }
472  return GetFieldRange(GetFieldDescriptor(fieldId));
473  }
475  const std::function<bool(DescriptorId_t, DescriptorId_t)>& comparator) const
476  {
477  return GetFieldRange(GetFieldDescriptor(fieldId), comparator);
478  }
480  return GetFieldRange(GetFieldZeroId());
481  }
483  const std::function<bool(DescriptorId_t, DescriptorId_t)>& comparator) const
484  {
485  return GetFieldRange(GetFieldZeroId(), comparator);
486  }
487 
489  {
490  return RColumnDescriptorRange(*this, fieldDesc);
491  }
493  {
494  return RColumnDescriptorRange(*this, GetFieldDescriptor(fieldId));
495  }
496 
497  std::string GetName() const { return fName; }
498  std::string GetDescription() const { return fDescription; }
499  std::string GetAuthor() const { return fAuthor; }
500  std::string GetCustodian() const { return fCustodian; }
501  std::chrono::system_clock::time_point GetTimeStampData() const { return fTimeStampData; }
502  std::chrono::system_clock::time_point GetTimeStampWritten() const { return fTimeStampWritten; }
503  RNTupleVersion GetVersion() const { return fVersion; }
504  RNTupleUuid GetOwnUuid() const { return fOwnUuid; }
505  RNTupleUuid GetGroupUuid() const { return fGroupUuid; }
506 
507  std::size_t GetNFields() const { return fFieldDescriptors.size(); }
508  std::size_t GetNColumns() const { return fColumnDescriptors.size(); }
509  std::size_t GetNClusters() const { return fClusterDescriptors.size(); }
510 
511  // The number of entries as seen with the currently loaded cluster meta-data; there might be more
512  NTupleSize_t GetNEntries() const;
513  NTupleSize_t GetNElements(DescriptorId_t columnId) const;
514 
515  /// Returns the logical parent of all top-level NTuple data fields.
517  DescriptorId_t FindFieldId(std::string_view fieldName, DescriptorId_t parentId) const;
518  /// Searches for a top-level field
520  DescriptorId_t FindColumnId(DescriptorId_t fieldId, std::uint32_t columnIndex) const;
524 
525  /// Walks up the parents of the field ID and returns a field name of the form a.b.c.d
526  /// In case of invalid field ID, an empty string is returned.
527  std::string GetQualifiedFieldName(DescriptorId_t fieldId) const;
528 
529  /// Re-create the C++ model from the stored meta-data
530  std::unique_ptr<RNTupleModel> GenerateModel() const;
531  void PrintInfo(std::ostream &output) const;
532 };
533 
534 namespace Detail {
535  class RFieldBase;
536 }
537 
538 // clang-format off
539 /**
540 \class ROOT::Experimental::RDanglingFieldDescriptor
541 \ingroup NTuple
542 \brief A helper class for piece-wise construction of an RFieldDescriptor
543 
544 Dangling field descriptors describe a single field in isolation. They are
545 missing the necessary relationship information (parent field, any child fields)
546 required to describe a real NTuple field.
547 
548 Dangling field descriptors can only become actual descriptors when added to an
549 RNTupleDescriptorBuilder instance and then linked to other fields.
550 */
551 // clang-format on
553 private:
555 public:
556  /// Make an empty dangling field descriptor.
558  /// Make a new RDanglingFieldDescriptor based off an existing descriptor.
559  /// Relationship information is lost during the conversion to a
560  /// dangling descriptor:
561  /// * Parent id is reset to an invalid id.
562  /// * Field children ids are forgotten.
563  ///
564  /// These properties must be set using RNTupleDescriptorBuilder::AddFieldLink().
565  explicit RDanglingFieldDescriptor(const RFieldDescriptor& fieldDesc);
566 
567  /// Make a new RDanglingFieldDescriptor based off a live NTuple field.
569 
571  fField.fFieldId = fieldId;
572  return *this;
573  }
575  fField.fFieldVersion = fieldVersion;
576  return *this;
577  }
579  fField.fTypeVersion = typeVersion;
580  return *this;
581  }
582  RDanglingFieldDescriptor& FieldName(const std::string& fieldName) {
583  fField.fFieldName = fieldName;
584  return *this;
585  }
586  RDanglingFieldDescriptor& FieldDescription(const std::string& fieldDescription) {
587  fField.fFieldDescription = fieldDescription;
588  return *this;
589  }
590  RDanglingFieldDescriptor& TypeName(const std::string& typeName) {
591  fField.fTypeName = typeName;
592  return *this;
593  }
594  RDanglingFieldDescriptor& NRepetitions(std::uint64_t nRepetitions) {
595  fField.fNRepetitions = nRepetitions;
596  return *this;
597  }
599  fField.fStructure = structure;
600  return *this;
601  }
602  /// Attempt to make a field descriptor. This may fail if the dangling field
603  /// was not given enough information to make a proper descriptor.
605 };
606 
607 // clang-format off
608 /**
609 \class ROOT::Experimental::RNTupleDescriptorBuilder
610 \ingroup NTuple
611 \brief A helper class for piece-wise construction of an RNTupleDescriptor
612 
613 Used by RPageStorage implementations in order to construct the RNTupleDescriptor from the various header parts.
614 */
615 // clang-format on
617 private:
619 
620 public:
621  /// Checks whether invariants hold:
622  /// * NTuple name is valid
623  /// * Fields have valid parent and child ids
625  const RNTupleDescriptor& GetDescriptor() const { return fDescriptor; }
627 
628  void SetNTuple(const std::string_view name, const std::string_view description, const std::string_view author,
629  const RNTupleVersion &version, const RNTupleUuid &uuid);
630 
631  void AddField(const RFieldDescriptor& fieldDesc);
633 
634  void AddColumn(DescriptorId_t columnId, DescriptorId_t fieldId,
635  const RNTupleVersion &version, const RColumnModel &model, std::uint32_t index);
636 
637  void SetFromHeader(void* headerBuffer);
638 
639  void AddCluster(DescriptorId_t clusterId, RNTupleVersion version,
640  NTupleSize_t firstEntryIndex, ClusterSize_t nEntries);
642  void AddClusterColumnRange(DescriptorId_t clusterId, const RClusterDescriptor::RColumnRange &columnRange);
644 
645  void AddClustersFromFooter(void* footerBuffer);
646 };
647 
648 } // namespace Experimental
649 } // namespace ROOT
650 
651 #endif
ROOT::Experimental::RClusterDescriptor::fLocator
RLocator fLocator
For pre-fetching / caching an entire contiguous cluster.
Definition: RNTupleDescriptor.hxx:231
ROOT::Experimental::RNTupleDescriptor::fOwnUuid
RNTupleUuid fOwnUuid
Every NTuple gets a unique identifier.
Definition: RNTupleDescriptor.hxx:298
ROOT::Experimental::RClusterDescriptor::GetColumnRange
const RColumnRange & GetColumnRange(DescriptorId_t columnId) const
Definition: RNTupleDescriptor.hxx:254
ROOT::Experimental::RDanglingFieldDescriptor::TypeVersion
RDanglingFieldDescriptor & TypeVersion(const RNTupleVersion &typeVersion)
Definition: RNTupleDescriptor.hxx:578
ROOT::Experimental::RClusterDescriptor::RClusterDescriptor
RClusterDescriptor()=default
ROOT::Experimental::RNTupleDescriptor::fName
std::string fName
The ntuple name needs to be unique in a given storage location (file)
Definition: RNTupleDescriptor.hxx:284
ROOT::Experimental::Detail::RFieldBase
Definition: RField.hxx:73
ROOT::Experimental::RNTupleDescriptor::GetNFields
std::size_t GetNFields() const
Definition: RNTupleDescriptor.hxx:507
ROOT::Experimental::RNTupleDescriptor::GetTimeStampWritten
std::chrono::system_clock::time_point GetTimeStampWritten() const
Definition: RNTupleDescriptor.hxx:502
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RColumnDescriptorRange
RColumnDescriptorRange(const RNTupleDescriptor &ntuple, const RFieldDescriptor &field)
Definition: RNTupleDescriptor.hxx:347
ROOT::Experimental::RNTupleDescriptor::fAuthor
std::string fAuthor
The origin of the data.
Definition: RNTupleDescriptor.hxx:288
ROOT::Experimental::RNTupleDescriptor::GetTopLevelFields
RFieldDescriptorRange GetTopLevelFields(const std::function< bool(DescriptorId_t, DescriptorId_t)> &comparator) const
Definition: RNTupleDescriptor.hxx:482
ROOT::Experimental::RClusterDescriptor::RColumnRange
The window of element indexes of a particular column in a particular cluster.
Definition: RNTupleDescriptor.hxx:171
ROOT::Experimental::RClusterDescriptor::RPageRange::fPageInfos
std::vector< RPageInfo > fPageInfos
Definition: RNTupleDescriptor.hxx:216
ROOT::Experimental::RFieldDescriptor::GetTypeVersion
RNTupleVersion GetTypeVersion() const
Definition: RNTupleDescriptor.hxx:90
ROOT::Experimental::RClusterDescriptor::operator=
RClusterDescriptor & operator=(const RClusterDescriptor &other)=delete
ROOT::Experimental::RNTupleDescriptor::GetTopLevelFields
RFieldDescriptorRange GetTopLevelFields() const
Definition: RNTupleDescriptor.hxx:479
ROOT::Experimental::RClusterDescriptor::RPageRange::operator==
bool operator==(const RPageRange &other) const
Definition: RNTupleDescriptor.hxx:218
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::begin
RIterator begin()
Definition: RNTupleDescriptor.hxx:411
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::fNTuple
const RNTupleDescriptor & fNTuple
The associated NTuple for this range.
Definition: RNTupleDescriptor.hxx:320
ROOT::Experimental::RFieldDescriptor::fLinkIds
std::vector< DescriptorId_t > fLinkIds
The pointers in the other direction from parent to children.
Definition: RNTupleDescriptor.hxx:71
ROOT::Experimental::RFieldDescriptor::fParentId
DescriptorId_t fParentId
Establishes sub field relationships, such as classes and collections.
Definition: RNTupleDescriptor.hxx:68
ROOT::Experimental::RFieldDescriptor::operator==
bool operator==(const RFieldDescriptor &other) const
Definition: RNTupleDescriptor.cxx:476
ROOT::Experimental::RNTupleDescriptor::GetAuthor
std::string GetAuthor() const
Definition: RNTupleDescriptor.hxx:499
ROOT::Experimental::RFieldDescriptor::operator=
RFieldDescriptor & operator=(const RFieldDescriptor &other)=delete
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageRange
RPageRange()=default
ROOT::Experimental::RNTupleDescriptorBuilder::fDescriptor
RNTupleDescriptor fDescriptor
Definition: RNTupleDescriptor.hxx:618
ROOT::Experimental::RDanglingFieldDescriptor
A helper class for piece-wise construction of an RFieldDescriptor.
Definition: RNTupleDescriptor.hxx:552
ROOT::Experimental::RNTupleDescriptor::FindPrevClusterId
DescriptorId_t FindPrevClusterId(DescriptorId_t clusterId) const
Definition: RNTupleDescriptor.cxx:751
ROOT::Experimental::RClusterDescriptor::GetLocator
RLocator GetLocator() const
Definition: RNTupleDescriptor.hxx:253
ROOT::Experimental::DescriptorId_t
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
Definition: RNTupleUtil.hxx:91
ROOT::Experimental::RColumnDescriptor::fModel
RColumnModel fModel
Contains the column type and whether it is sorted.
Definition: RNTupleDescriptor.hxx:116
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: RNTupleDescriptor.hxx:384
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::operator*
reference operator*()
Definition: RNTupleDescriptor.hxx:394
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange
Used to loop over a field's child fields.
Definition: RNTupleDescriptor.hxx:368
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RFieldDescriptorRange
RFieldDescriptorRange(const RNTupleDescriptor &ntuple, const RFieldDescriptor &field, const std::function< bool(DescriptorId_t, DescriptorId_t)> &comparator)
Sort the range using an arbitrary comparison function.
Definition: RNTupleDescriptor.hxx:405
ROOT::Experimental::RNTupleDescriptor::operator==
bool operator==(const RNTupleDescriptor &other) const
Definition: RNTupleDescriptor.cxx:535
output
static void output(int code)
Definition: gifencode.c:226
string_view
basic_string_view< char > string_view
Definition: libcpp_string_view.h:785
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange
Used to loop over a field's associated columns.
Definition: RNTupleDescriptor.hxx:317
ROOT::Experimental::RFieldDescriptor::GetId
DescriptorId_t GetId() const
Definition: RNTupleDescriptor.hxx:88
ROOT::Experimental::RNTupleDescriptor::fFieldDescriptors
std::unordered_map< DescriptorId_t, RFieldDescriptor > fFieldDescriptors
Definition: RNTupleDescriptor.hxx:303
ROOT::Experimental::RFieldDescriptor::GetLinkIds
const std::vector< DescriptorId_t > & GetLinkIds() const
Definition: RNTupleDescriptor.hxx:97
ROOT::Experimental::RClusterDescriptor::RColumnRange::fNElements
ClusterSize_t fNElements
A 32bit value for the number of column elements in the cluster.
Definition: RNTupleDescriptor.hxx:176
ROOT::Experimental::RFieldDescriptor::fFieldName
std::string fFieldName
The leaf name, not including parent fields.
Definition: RNTupleDescriptor.hxx:58
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::operator*
reference operator*()
Definition: RNTupleDescriptor.hxx:342
ROOT::Experimental::RDanglingFieldDescriptor::FromField
static RDanglingFieldDescriptor FromField(const Detail::RFieldBase &field)
Make a new RDanglingFieldDescriptor based off a live NTuple field.
Definition: RNTupleDescriptor.cxx:951
ROOT::Experimental::RNTupleDescriptorBuilder
A helper class for piece-wise construction of an RNTupleDescriptor.
Definition: RNTupleDescriptor.hxx:616
ROOT::Experimental::RClusterDescriptor::fPageRanges
std::unordered_map< DescriptorId_t, RPageRange > fPageRanges
Definition: RNTupleDescriptor.hxx:234
ROOT::Experimental::RNTupleDescriptor::GetNEntries
NTupleSize_t GetNEntries() const
Definition: RNTupleDescriptor.cxx:647
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::difference_type
std::ptrdiff_t difference_type
Definition: RNTupleDescriptor.hxx:387
ROOT::Experimental::RClusterDescriptor::RLocator::fPosition
std::int64_t fPosition
Definition: RNTupleDescriptor.hxx:161
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: RNTupleDescriptor.hxx:332
ROOT::Experimental::RNTupleDescriptor::GetFooterSize
std::uint32_t GetFooterSize() const
Definition: RNTupleDescriptor.hxx:449
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageInfo
We do not need to store the element size / uncompressed page size because we know to which column the...
Definition: RNTupleDescriptor.hxx:198
ROOT::Experimental::RClusterDescriptor::RColumnRange::fColumnId
DescriptorId_t fColumnId
Definition: RNTupleDescriptor.hxx:172
ROOT::Experimental::RNTupleDescriptor::fDescription
std::string fDescription
Free text from the user.
Definition: RNTupleDescriptor.hxx:286
ROOT::Experimental::RNTupleDescriptorBuilder::AddCluster
void AddCluster(DescriptorId_t clusterId, RNTupleVersion version, NTupleSize_t firstEntryIndex, ClusterSize_t nEntries)
Definition: RNTupleDescriptor.cxx:1023
ROOT::Experimental::RNTupleDescriptorBuilder::AddFieldLink
RResult< void > AddFieldLink(DescriptorId_t fieldId, DescriptorId_t linkId)
Definition: RNTupleDescriptor.cxx:985
ROOT::Experimental::RColumnDescriptor::operator==
bool operator==(const RColumnDescriptor &other) const
Definition: RNTupleDescriptor.cxx:509
ROOT::Experimental::NTupleSize_t
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Definition: RNTupleUtil.hxx:55
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::RIterator
RIterator(const RNTupleDescriptor &ntuple, const std::vector< DescriptorId_t > &fieldChildren, std::size_t index)
Definition: RNTupleDescriptor.hxx:391
ROOT::Experimental::RDanglingFieldDescriptor::MakeDescriptor
RResult< RFieldDescriptor > MakeDescriptor() const
Attempt to make a field descriptor.
Definition: RNTupleDescriptor.cxx:963
ROOT::Experimental::RClusterDescriptor::RColumnRange::fFirstElementIndex
NTupleSize_t fFirstElementIndex
A 64bit element index.
Definition: RNTupleDescriptor.hxx:174
ROOT::Experimental::ENTupleStructure
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
Definition: RNTupleUtil.hxx:45
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::RIterator
RIterator(const RNTupleDescriptor &ntuple, const std::vector< DescriptorId_t > &columns, std::size_t index)
Definition: RNTupleDescriptor.hxx:339
ROOT::Experimental::RNTupleDescriptor::GetHeaderSize
std::uint32_t GetHeaderSize() const
Definition: RNTupleDescriptor.hxx:446
ROOT::Experimental::RNTupleDescriptor::GetNColumns
std::size_t GetNColumns() const
Definition: RNTupleDescriptor.hxx:508
ROOT::Experimental::RNTupleDescriptor::RNTupleDescriptor
RNTupleDescriptor(RNTupleDescriptor &&other)=default
ROOT::Experimental::RClusterDescriptor
Meta-data for a set of ntuple clusters.
Definition: RNTupleDescriptor.hxx:153
ROOT::Experimental::RClusterDescriptor::RLocator::fBytesOnStorage
std::uint32_t fBytesOnStorage
Definition: RNTupleDescriptor.hxx:162
ROOT::Experimental::RColumnDescriptor::fIndex
std::uint32_t fIndex
A field can be serialized into several columns, which are numbered from zero to $n$.
Definition: RNTupleDescriptor.hxx:120
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::end
RIterator end()
Definition: RNTupleDescriptor.hxx:414
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::fIndex
std::size_t fIndex
Definition: RNTupleDescriptor.hxx:330
ROOT::Experimental::RFieldDescriptor::Clone
RFieldDescriptor Clone() const
Get a copy of the descriptor.
Definition: RNTupleDescriptor.cxx:490
ROOT::Experimental::RFieldDescriptor::fNRepetitions
std::uint64_t fNRepetitions
The number of elements per entry for fixed-size arrays.
Definition: RNTupleDescriptor.hxx:64
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::operator++
iterator operator++()
Definition: RNTupleDescriptor.hxx:341
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::fNTuple
const RNTupleDescriptor & fNTuple
The enclosing range's NTuple.
Definition: RNTupleDescriptor.hxx:327
ROOT::Experimental::RNTupleDescriptor::GenerateModel
std::unique_ptr< RNTupleModel > GenerateModel() const
Re-create the C++ model from the stored meta-data.
Definition: RNTupleDescriptor.cxx:763
ROOT::Experimental::RColumnDescriptor::fColumnId
DescriptorId_t fColumnId
Definition: RNTupleDescriptor.hxx:112
ROOT::Experimental::RNTupleUuid
std::string RNTupleUuid
Every NTuple is identified by a UUID. TODO(jblomer): should this be a TUUID?
Definition: RNTupleUtil.hxx:120
ROOT::Experimental::RNTupleDescriptor::GetColumnRange
RColumnDescriptorRange GetColumnRange(DescriptorId_t fieldId) const
Definition: RNTupleDescriptor.hxx:492
RFieldBase
A field translates read and write calls from/to underlying columns to/from tree values.
Definition: RField.hxx:59
ROOT::Experimental::RNTupleDescriptor::fGroupUuid
RNTupleUuid fGroupUuid
Column sets that are created as derived sets from existing NTuples share the same group id.
Definition: RNTupleDescriptor.hxx:301
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::fNTuple
const RNTupleDescriptor & fNTuple
The enclosing range's NTuple.
Definition: RNTupleDescriptor.hxx:379
ROOT::Experimental::RColumnDescriptor::GetId
DescriptorId_t GetId() const
Definition: RNTupleDescriptor.hxx:135
ROOT::Experimental::RFieldDescriptor::kFrameVersionMin
static constexpr std::uint16_t kFrameVersionMin
Definition: RNTupleDescriptor.hxx:82
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageInfo::fLocator
RLocator fLocator
The meaning of fLocator depends on the storage backend.
Definition: RNTupleDescriptor.hxx:202
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::begin
RIterator begin()
Definition: RNTupleDescriptor.hxx:357
ROOT::Experimental::RColumnDescriptor::fVersion
RNTupleVersion fVersion
Versions can change, e.g., when new column types are added.
Definition: RNTupleDescriptor.hxx:114
ROOT::Experimental::RNTupleDescriptor::FindColumnId
DescriptorId_t FindColumnId(DescriptorId_t fieldId, std::uint32_t columnIndex) const
Definition: RNTupleDescriptor.cxx:713
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::fColumns
const std::vector< DescriptorId_t > & fColumns
The enclosing range's descriptor id list.
Definition: RNTupleDescriptor.hxx:329
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::fFieldChildren
const std::vector< DescriptorId_t > & fFieldChildren
The enclosing range's descriptor id list.
Definition: RNTupleDescriptor.hxx:381
ROOT::Experimental::RNTupleDescriptor
The on-storage meta-data of an ntuple.
Definition: RNTupleDescriptor.hxx:279
ROOT::Experimental::RFieldDescriptor::RFieldDescriptor
RFieldDescriptor()=default
ROOT::Experimental::RNTupleVersion
For forward and backward compatibility, attach version information to the consitituents of the file f...
Definition: RNTupleUtil.hxx:127
ROOT::Experimental::RNTupleDescriptor::SerializeFooter
std::uint32_t SerializeFooter(void *buffer) const
Serializes cluster meta data. Returns the number of bytes and fills buffer if it is not nullptr.
Definition: RNTupleDescriptor.cxx:587
ROOT::Experimental::RNTupleDescriptor::RNTupleDescriptor
RNTupleDescriptor()=default
ROOT::Experimental::RClusterDescriptor::fFirstEntryIndex
NTupleSize_t fFirstEntryIndex
Clusters can be swapped by adjusting the entry offsets.
Definition: RNTupleDescriptor.hxx:228
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::fIndex
std::size_t fIndex
Definition: RNTupleDescriptor.hxx:382
ROOT::Experimental::RNTupleDescriptor::fTimeStampWritten
std::chrono::system_clock::time_point fTimeStampWritten
The time stamp of writing the data to storage, which gets updated when re-written.
Definition: RNTupleDescriptor.hxx:294
ROOT::Experimental::RColumnDescriptor::GetModel
RColumnModel GetModel() const
Definition: RNTupleDescriptor.hxx:137
ROOT::Experimental::RNTupleDescriptor::fColumnDescriptors
std::unordered_map< DescriptorId_t, RColumnDescriptor > fColumnDescriptors
Definition: RNTupleDescriptor.hxx:304
ROOT::Experimental::RClusterDescriptor::GetPageRange
const RPageRange & GetPageRange(DescriptorId_t columnId) const
Definition: RNTupleDescriptor.hxx:255
ROOT::Experimental::RResult
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
Definition: RError.hxx:196
ROOT::Experimental::kInvalidClusterIndex
constexpr ClusterSize_t kInvalidClusterIndex(std::uint32_t(-1))
ROOT::Experimental::RColumnDescriptor::GetFieldId
DescriptorId_t GetFieldId() const
Definition: RNTupleDescriptor.hxx:139
ROOT::Experimental::RDanglingFieldDescriptor::NRepetitions
RDanglingFieldDescriptor & NRepetitions(std::uint64_t nRepetitions)
Definition: RNTupleDescriptor.hxx:594
ROOT::Experimental::RClusterDescriptor::fColumnRanges
std::unordered_map< DescriptorId_t, RColumnRange > fColumnRanges
Definition: RNTupleDescriptor.hxx:233
ROOT::Experimental::RColumnDescriptor::RColumnDescriptor
RColumnDescriptor()=default
ROOT::Experimental::RNTupleDescriptor::operator=
RNTupleDescriptor & operator=(RNTupleDescriptor &&other)=default
ROOT::Experimental::RResult< void >
RResult<void> has no data member and no Inspect() method but instead a Success() factory method.
Definition: RError.hxx:258
ROOT::Experimental::RClusterDescriptor::GetNEntries
ClusterSize_t GetNEntries() const
Definition: RNTupleDescriptor.hxx:252
ROOT::Experimental::RColumnDescriptor
Meta-data stored for every column of an ntuple.
Definition: RNTupleDescriptor.hxx:108
kInvalid
@ kInvalid
Definition: TSystem.h:79
ROOT::Experimental::RColumnDescriptor::RColumnDescriptor
RColumnDescriptor(const RColumnDescriptor &other)=delete
ROOT::Experimental::RDanglingFieldDescriptor::FieldName
RDanglingFieldDescriptor & FieldName(const std::string &fieldName)
Definition: RNTupleDescriptor.hxx:582
ROOT::Experimental::RClusterDescriptor::RClusterDescriptor
RClusterDescriptor(RClusterDescriptor &&other)=default
ROOT::Experimental::RClusterDescriptor::RLocator::fUrl
std::string fUrl
Definition: RNTupleDescriptor.hxx:163
ROOT::Experimental::RNTupleDescriptor::GetColumnDescriptor
const RColumnDescriptor & GetColumnDescriptor(DescriptorId_t columnId) const
Definition: RNTupleDescriptor.hxx:456
ROOT::Experimental::RFieldDescriptor::GetFieldVersion
RNTupleVersion GetFieldVersion() const
Definition: RNTupleDescriptor.hxx:89
ROOT::Experimental::RFieldDescriptor::fStructure
ENTupleStructure fStructure
The structural information carried by this field in the data model tree.
Definition: RNTupleDescriptor.hxx:66
ROOT::Experimental::RColumnDescriptor::fFieldId
DescriptorId_t fFieldId
Every column belongs to one and only one field.
Definition: RNTupleDescriptor.hxx:118
ROOT::Experimental::RNTupleDescriptor::GetFieldRange
RFieldDescriptorRange GetFieldRange(DescriptorId_t fieldId, const std::function< bool(DescriptorId_t, DescriptorId_t)> &comparator) const
Definition: RNTupleDescriptor.hxx:474
ROOT::Experimental::RNTupleDescriptorBuilder::AddClusterColumnRange
void AddClusterColumnRange(DescriptorId_t clusterId, const RClusterDescriptor::RColumnRange &columnRange)
Definition: RNTupleDescriptor.cxx:1040
ROOT::Experimental::RColumnDescriptor::operator=
RColumnDescriptor & operator=(const RColumnDescriptor &other)=delete
ROOT::Experimental::RClusterDescriptor::fVersion
RNTupleVersion fVersion
Future versions of the cluster descriptor might add more meta-data, e.g. a semantic checksum.
Definition: RNTupleDescriptor.hxx:226
ROOT::Experimental::RFieldDescriptor::RFieldDescriptor
RFieldDescriptor(RFieldDescriptor &&other)=default
ROOT::Experimental::RColumnDescriptor::RColumnDescriptor
RColumnDescriptor(RColumnDescriptor &&other)=default
ROOT::Experimental::RNTupleDescriptorBuilder::AddClustersFromFooter
void AddClustersFromFooter(void *footerBuffer)
Definition: RNTupleDescriptor.cxx:872
RColumnModel.hxx
ROOT::Experimental::RDanglingFieldDescriptor::RDanglingFieldDescriptor
RDanglingFieldDescriptor()=default
Make an empty dangling field descriptor.
ROOT::Experimental::RColumnDescriptor::kFrameVersionMin
static constexpr std::uint16_t kFrameVersionMin
Definition: RNTupleDescriptor.hxx:125
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::fFieldChildren
std::vector< DescriptorId_t > fFieldChildren
The descriptor ids of the child fields.
Definition: RNTupleDescriptor.hxx:374
RStringView.hxx
ROOT::Experimental::kInvalidNTupleIndex
constexpr NTupleSize_t kInvalidNTupleIndex
Definition: RNTupleUtil.hxx:56
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::operator++
iterator operator++()
Definition: RNTupleDescriptor.hxx:393
ROOT::Experimental::RDanglingFieldDescriptor::FieldDescription
RDanglingFieldDescriptor & FieldDescription(const std::string &fieldDescription)
Definition: RNTupleDescriptor.hxx:586
ROOT::Experimental::RNTupleDescriptor::FindFieldId
DescriptorId_t FindFieldId(std::string_view fieldName, DescriptorId_t parentId) const
Definition: RNTupleDescriptor.cxx:668
ROOT::Experimental::RFieldDescriptor::fTypeName
std::string fTypeName
The C++ type that was used when writing the field.
Definition: RNTupleDescriptor.hxx:62
ROOT::Experimental::RClusterDescriptor::GetVersion
RNTupleVersion GetVersion() const
Definition: RNTupleDescriptor.hxx:250
ROOT::Experimental::RNTupleDescriptor::PrintInfo
void PrintInfo(std::ostream &output) const
Definition: RNTupleDescriptorFmt.cxx:98
ROOT::R::function
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:151
ROOT::Experimental::RClusterDescriptor::fNEntries
ClusterSize_t fNEntries
Definition: RNTupleDescriptor.hxx:229
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageRange
RPageRange(const RPageRange &other)=delete
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::fNTuple
const RNTupleDescriptor & fNTuple
The associated NTuple for this range.
Definition: RNTupleDescriptor.hxx:371
ROOT::Experimental::RDanglingFieldDescriptor::fField
RFieldDescriptor fField
Definition: RNTupleDescriptor.hxx:554
ROOT::Experimental::RNTupleDescriptor::GetTimeStampData
std::chrono::system_clock::time_point GetTimeStampData() const
Definition: RNTupleDescriptor.hxx:501
ROOT::Experimental::RColumnDescriptor::GetIndex
std::uint32_t GetIndex() const
Definition: RNTupleDescriptor.hxx:138
ROOT::Experimental::RClusterDescriptor::RColumnRange::fCompressionSettings
std::int64_t fCompressionSettings
The usual format for ROOT compression settings (see Compression.h).
Definition: RNTupleDescriptor.hxx:179
ROOT::Experimental::RNTupleDescriptorBuilder::MoveDescriptor
RNTupleDescriptor MoveDescriptor()
Definition: RNTupleDescriptor.cxx:796
ROOT::Experimental::RFieldDescriptor::GetFieldName
std::string GetFieldName() const
Definition: RNTupleDescriptor.hxx:91
ROOT::Experimental::RNTupleDescriptor::FindNextClusterId
DescriptorId_t FindNextClusterId(DescriptorId_t clusterId) const
Definition: RNTupleDescriptor.cxx:737
ROOT::Experimental::RNTupleDescriptor::GetOwnUuid
RNTupleUuid GetOwnUuid() const
Definition: RNTupleDescriptor.hxx:504
ROOT::Experimental::RColumnModel
Holds the static meta-data of a column in a tree.
Definition: RColumnModel.hxx:61
ROOT::Experimental::RNTupleDescriptor::LocateMetadata
static void LocateMetadata(const void *postscript, std::uint32_t &szHeader, std::uint32_t &szFooter)
Given kNBytesPostscript bytes, extract the header and footer lengths in bytes.
Definition: RNTupleDescriptor.cxx:635
ROOT::Experimental::RNTupleDescriptorBuilder::AddField
void AddField(const RFieldDescriptor &fieldDesc)
Definition: RNTupleDescriptor.cxx:980
ROOT::Experimental::RClusterDescriptor::RClusterDescriptor
RClusterDescriptor(const RClusterDescriptor &other)=delete
RNTupleUtil.hxx
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator
Definition: RNTupleDescriptor.hxx:376
ROOT::Experimental::RDanglingFieldDescriptor::Structure
RDanglingFieldDescriptor & Structure(const ENTupleStructure &structure)
Definition: RNTupleDescriptor.hxx:598
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageInfo::fNElements
ClusterSize_t fNElements
The sum of the elements of all the pages must match the corresponding fNElements field in fColumnRang...
Definition: RNTupleDescriptor.hxx:200
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::fColumns
std::vector< DescriptorId_t > fColumns
The descriptor ids of the columns ordered by index id.
Definition: RNTupleDescriptor.hxx:322
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageRange
RPageRange(RPageRange &&other)=default
ROOT::Experimental::RDanglingFieldDescriptor::TypeName
RDanglingFieldDescriptor & TypeName(const std::string &typeName)
Definition: RNTupleDescriptor.hxx:590
ROOT::Experimental::RNTupleDescriptor::GetQualifiedFieldName
std::string GetQualifiedFieldName(DescriptorId_t fieldId) const
Walks up the parents of the field ID and returns a field name of the form a.b.c.d In case of invalid ...
Definition: RNTupleDescriptor.cxx:685
ROOT::Experimental::RClusterSize
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...
Definition: RNTupleUtil.hxx:58
ROOT::Experimental::RNTupleDescriptor::GetFieldRange
RFieldDescriptorRange GetFieldRange(DescriptorId_t fieldId) const
Definition: RNTupleDescriptor.hxx:471
ROOT::Experimental::RFieldDescriptor::fFieldVersion
RNTupleVersion fFieldVersion
The version of the C++-type-to-column translation mechanics.
Definition: RNTupleDescriptor.hxx:54
ROOT::Experimental::RNTupleDescriptor::kNBytesPreamble
static constexpr unsigned int kNBytesPreamble
The preamble is sufficient to get the length of the header.
Definition: RNTupleDescriptor.hxx:423
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RFieldDescriptorRange
RFieldDescriptorRange(const RNTupleDescriptor &ntuple, const RFieldDescriptor &field)
Definition: RNTupleDescriptor.hxx:402
ROOT::Experimental::RNTupleDescriptor::GetNClusters
std::size_t GetNClusters() const
Definition: RNTupleDescriptor.hxx:509
ROOT::Experimental::RFieldDescriptor::RFieldDescriptor
RFieldDescriptor(const RFieldDescriptor &other)=delete
ROOT::Experimental::RFieldDescriptor::GetNRepetitions
std::uint64_t GetNRepetitions() const
Definition: RNTupleDescriptor.hxx:94
ROOT::Experimental::RNTupleDescriptor::GetName
std::string GetName() const
Definition: RNTupleDescriptor.hxx:497
ROOT::Experimental::RNTupleDescriptorBuilder::SetNTuple
void SetNTuple(const std::string_view name, const std::string_view description, const std::string_view author, const RNTupleVersion &version, const RNTupleUuid &uuid)
Definition: RNTupleDescriptor.cxx:931
ROOT::Experimental::RNTupleDescriptor::operator=
RNTupleDescriptor & operator=(const RNTupleDescriptor &other)=delete
ROOT::Experimental::RNTupleDescriptor::fCustodian
std::string fCustodian
The current responsible for storing the data.
Definition: RNTupleDescriptor.hxx:290
ROOT::Experimental::RNTupleDescriptor::kFrameVersionMin
static constexpr std::uint16_t kFrameVersionMin
Definition: RNTupleDescriptor.hxx:421
ROOT::Experimental::RClusterDescriptor::kFrameVersionMin
static constexpr std::uint16_t kFrameVersionMin
Definition: RNTupleDescriptor.hxx:239
ROOT::Experimental::RFieldDescriptor::fFieldId
DescriptorId_t fFieldId
Definition: RNTupleDescriptor.hxx:52
ROOT::Experimental::RClusterDescriptor::kFrameVersionCurrent
static constexpr std::uint16_t kFrameVersionCurrent
In order to handle changes to the serialization routine in future ntuple versions.
Definition: RNTupleDescriptor.hxx:238
ROOT::Experimental::RNTupleDescriptor::fClusterDescriptors
std::unordered_map< DescriptorId_t, RClusterDescriptor > fClusterDescriptors
May contain only a subset of all the available clusters, e.g.
Definition: RNTupleDescriptor.hxx:307
ROOT::Experimental::RFieldDescriptor
Meta-data stored for every field of an ntuple.
Definition: RNTupleDescriptor.hxx:47
ROOT::Experimental::RFieldDescriptor::GetParentId
DescriptorId_t GetParentId() const
Definition: RNTupleDescriptor.hxx:96
ROOT::Experimental::RNTupleDescriptor::GetVersion
RNTupleVersion GetVersion() const
Definition: RNTupleDescriptor.hxx:503
ROOT::Experimental::RNTupleDescriptor::SerializeHeader
std::uint32_t SerializeHeader(void *buffer) const
We deliberately do not use ROOT's built-in serialization in order to allow for use of RNTuple's witho...
Definition: RNTupleDescriptor.cxx:551
ROOT::Experimental::RClusterDescriptor::RLocator::operator==
bool operator==(const RLocator &other) const
Definition: RNTupleDescriptor.hxx:165
ROOT::Experimental::RClusterDescriptor::RLocator
Generic information about the physical location of data.
Definition: RNTupleDescriptor.hxx:160
ROOT::Experimental::RNTupleDescriptor::GetFieldRange
RFieldDescriptorRange GetFieldRange(const RFieldDescriptor &fieldDesc, const std::function< bool(DescriptorId_t, DescriptorId_t)> &comparator) const
Definition: RNTupleDescriptor.hxx:466
ROOT::Experimental::RColumnDescriptor::kFrameVersionCurrent
static constexpr std::uint16_t kFrameVersionCurrent
In order to handle changes to the serialization routine in future ntuple versions.
Definition: RNTupleDescriptor.hxx:124
ROOT::Experimental::RClusterDescriptor::RColumnRange::Contains
bool Contains(NTupleSize_t index) const
Definition: RNTupleDescriptor.hxx:189
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::operator==
bool operator==(const iterator &rh) const
Definition: RNTupleDescriptor.hxx:400
ROOT::Experimental::RNTupleDescriptor::GetFieldRange
RFieldDescriptorRange GetFieldRange(const RFieldDescriptor &fieldDesc) const
Definition: RNTupleDescriptor.hxx:463
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::difference_type
std::ptrdiff_t difference_type
Definition: RNTupleDescriptor.hxx:335
ROOT::Experimental::RNTupleDescriptor::fVersion
RNTupleVersion fVersion
The version evolves with the ntuple summary meta-data.
Definition: RNTupleDescriptor.hxx:296
name
char name[80]
Definition: TGX11.cxx:110
ROOT::Experimental::RFieldDescriptor::fFieldDescription
std::string fFieldDescription
Free text set by the user.
Definition: RNTupleDescriptor.hxx:60
ROOT::Experimental::RNTupleDescriptorBuilder::SetClusterLocator
void SetClusterLocator(DescriptorId_t clusterId, RClusterDescriptor::RLocator locator)
Definition: RNTupleDescriptor.cxx:1034
ROOT::Experimental::RDanglingFieldDescriptor::FieldVersion
RDanglingFieldDescriptor & FieldVersion(const RNTupleVersion &fieldVersion)
Definition: RNTupleDescriptor.hxx:574
ROOT::Experimental::RNTupleDescriptorBuilder::AddClusterPageRange
void AddClusterPageRange(DescriptorId_t clusterId, RClusterDescriptor::RPageRange &&pageRange)
Definition: RNTupleDescriptor.cxx:1046
ROOT::Experimental::RClusterDescriptor::operator==
bool operator==(const RClusterDescriptor &other) const
Definition: RNTupleDescriptor.cxx:521
ROOT::Experimental::RFieldDescriptor::GetStructure
ENTupleStructure GetStructure() const
Definition: RNTupleDescriptor.hxx:95
ROOT::Experimental::RNTupleDescriptorBuilder::GetDescriptor
const RNTupleDescriptor & GetDescriptor() const
Definition: RNTupleDescriptor.hxx:625
RError.hxx
ROOT::Experimental::RNTupleDescriptor::GetGroupUuid
RNTupleUuid GetGroupUuid() const
Definition: RNTupleDescriptor.hxx:505
make_cnn_model.model
model
Definition: make_cnn_model.py:6
ROOT::Experimental::RFieldDescriptor::GetFieldDescription
std::string GetFieldDescription() const
Definition: RNTupleDescriptor.hxx:92
ROOT::Experimental::kInvalidDescriptorId
constexpr DescriptorId_t kInvalidDescriptorId
Definition: RNTupleUtil.hxx:92
ROOT::Experimental::RColumnDescriptor::GetVersion
RNTupleVersion GetVersion() const
Definition: RNTupleDescriptor.hxx:136
ROOT::Experimental::RNTupleDescriptor::GetColumnRange
RColumnDescriptorRange GetColumnRange(const RFieldDescriptor &fieldDesc) const
Definition: RNTupleDescriptor.hxx:488
ROOT::Experimental::RNTupleDescriptorBuilder::AddColumn
void AddColumn(DescriptorId_t columnId, DescriptorId_t fieldId, const RNTupleVersion &version, const RColumnModel &model, std::uint32_t index)
Definition: RNTupleDescriptor.cxx:1010
ROOT::Experimental::RFieldDescriptor::kFrameVersionCurrent
static constexpr std::uint16_t kFrameVersionCurrent
In order to handle changes to the serialization routine in future ntuple versions.
Definition: RNTupleDescriptor.hxx:81
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::operator!=
bool operator!=(const iterator &rh) const
Definition: RNTupleDescriptor.hxx:343
ROOT::Experimental::RClusterDescriptor::fClusterId
DescriptorId_t fClusterId
Definition: RNTupleDescriptor.hxx:224
ROOT::Experimental::RClusterDescriptor::RPageRange::operator=
RPageRange & operator=(const RPageRange &other)=delete
ROOT::Experimental::RClusterDescriptor::RColumnRange::operator==
bool operator==(const RColumnRange &other) const
Definition: RNTupleDescriptor.hxx:184
ROOT::Experimental::RNTupleDescriptor::GetNElements
NTupleSize_t GetNElements(DescriptorId_t columnId) const
Definition: RNTupleDescriptor.cxx:656
ROOT::Experimental::RFieldDescriptor::fTypeVersion
RNTupleVersion fTypeVersion
The version of the C++ type itself.
Definition: RNTupleDescriptor.hxx:56
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator::operator==
bool operator==(const iterator &rh) const
Definition: RNTupleDescriptor.hxx:344
ROOT::Experimental::RNTupleDescriptorBuilder::SetFromHeader
void SetFromHeader(void *headerBuffer)
Definition: RNTupleDescriptor.cxx:803
ROOT::Experimental::RNTupleDescriptorBuilder::EnsureValidDescriptor
RResult< void > EnsureValidDescriptor() const
Checks whether invariants hold:
Definition: RNTupleDescriptor.cxx:778
ROOT::Experimental::RClusterDescriptor::RPageRange::fColumnId
DescriptorId_t fColumnId
Definition: RNTupleDescriptor.hxx:215
ROOT::Experimental::RNTupleDescriptor::GetClusterDescriptor
const RClusterDescriptor & GetClusterDescriptor(DescriptorId_t clusterId) const
Definition: RNTupleDescriptor.hxx:459
ROOT::Experimental::RClusterDescriptor::RPageRange::RPageInfo::operator==
bool operator==(const RPageInfo &other) const
Definition: RNTupleDescriptor.hxx:204
ROOT::Experimental::RClusterDescriptor::RPageRange
Records the parition of data into pages for a particular column in a particular cluster.
Definition: RNTupleDescriptor.hxx:195
ROOT::Experimental::RNTupleDescriptor::kFrameVersionCurrent
static constexpr std::uint16_t kFrameVersionCurrent
In order to handle changes to the serialization routine in future ntuple versions.
Definition: RNTupleDescriptor.hxx:420
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::end
RIterator end()
Definition: RNTupleDescriptor.hxx:358
ROOT::Experimental::RNTupleDescriptor::GetCustodian
std::string GetCustodian() const
Definition: RNTupleDescriptor.hxx:500
ROOT::Experimental::RNTupleDescriptor::FindClusterId
DescriptorId_t FindClusterId(DescriptorId_t columnId, NTupleSize_t index) const
Definition: RNTupleDescriptor.cxx:724
ROOT::Experimental::RFieldDescriptor::GetTypeName
std::string GetTypeName() const
Definition: RNTupleDescriptor.hxx:93
ROOT::Experimental::RNTupleDescriptor::fTimeStampData
std::chrono::system_clock::time_point fTimeStampData
The time stamp of the ntuple data (immutable)
Definition: RNTupleDescriptor.hxx:292
ROOT::Experimental::RNTupleDescriptor::GetDescription
std::string GetDescription() const
Definition: RNTupleDescriptor.hxx:498
ROOT::Experimental::RNTupleDescriptor::RNTupleDescriptor
RNTupleDescriptor(const RNTupleDescriptor &other)=delete
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
ROOT::Experimental::RDanglingFieldDescriptor::FieldId
RDanglingFieldDescriptor & FieldId(DescriptorId_t fieldId)
Definition: RNTupleDescriptor.hxx:570
ROOT::Experimental::RClusterDescriptor::GetId
DescriptorId_t GetId() const
Definition: RNTupleDescriptor.hxx:249
ROOT::Experimental::RNTupleDescriptor::RFieldDescriptorRange::RIterator::operator!=
bool operator!=(const iterator &rh) const
Definition: RNTupleDescriptor.hxx:399
ROOT::Experimental::RNTupleDescriptor::RColumnDescriptorRange::RIterator
Definition: RNTupleDescriptor.hxx:324
ROOT::Experimental::RNTupleDescriptor::GetFieldDescriptor
const RFieldDescriptor & GetFieldDescriptor(DescriptorId_t fieldId) const
Definition: RNTupleDescriptor.hxx:453
ROOT::Experimental::RNTupleDescriptor::GetFieldZeroId
DescriptorId_t GetFieldZeroId() const
Returns the logical parent of all top-level NTuple data fields.
Definition: RNTupleDescriptor.cxx:699
ROOT::Experimental::RNTupleDescriptor::kNBytesPostscript
static constexpr unsigned int kNBytesPostscript
The last few bytes after the footer store the length of footer and header.
Definition: RNTupleDescriptor.hxx:425
ROOT::Experimental::RClusterDescriptor::GetFirstEntryIndex
NTupleSize_t GetFirstEntryIndex() const
Definition: RNTupleDescriptor.hxx:251