Logo ROOT   6.18/05
Reference Guide
RNTupleDescriptor.cxx
Go to the documentation of this file.
1/// \file RNTupleDescriptor.cxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2018-10-04
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
17#include <ROOT/RNTupleUtil.hxx>
18#include <ROOT/RStringView.hxx>
19
21 fDescriptor.fName = std::string(name);
22 fDescriptor.fVersion = version;
23}
24
26 DescriptorId_t fieldId, const RNTupleVersion &fieldVersion, const RNTupleVersion &typeVersion,
27 std::string_view fieldName, std::string_view typeName, ENTupleStructure structure)
28{
30 f.fFieldId = fieldId;
31 f.fFieldVersion = fieldVersion;
32 f.fTypeVersion = typeVersion;
33 f.fFieldName = std::string(fieldName);
34 f.fTypeName = std::string(typeName);
35 f.fStructure = structure;
36 fDescriptor.fFieldDescriptors[fieldId] = f;
37}
38
40{
41 fDescriptor.fFieldDescriptors[fieldId].fParentId = parentId;
42}
43
45{
46 fDescriptor.fFieldDescriptors[fieldId].fLinkIds.push_back(linkId);
47}
48
50 DescriptorId_t columnId, DescriptorId_t fieldId, const RNTupleVersion &version, const RColumnModel &model)
51{
53 c.fColumnId = columnId;
54 c.fFieldId = fieldId;
55 c.fVersion = version;
56 c.fModel = model;
57 fDescriptor.fColumnDescriptors[columnId] = c;
58}
59
61{
62 fDescriptor.fColumnDescriptors[columnId].fOffsetId = offsetId;
63}
64
66{
67 fDescriptor.fColumnDescriptors[columnId].fLinkIds.push_back(linkId);
68}
69
71 DescriptorId_t clusterId, RNTupleVersion version, NTupleSize_t firstEntryIndex, ClusterSize_t nEntries)
72{
74 c.fClusterId = clusterId;
75 c.fVersion = version;
76 c.fFirstEntryIndex = firstEntryIndex;
77 c.fNEntries = nEntries;
78 fDescriptor.fClusterDescriptors[clusterId] = c;
79}
80
82 DescriptorId_t clusterId, const RClusterDescriptor::RColumnInfo &columnInfo)
83{
84 fDescriptor.fClusterDescriptors[clusterId].fColumnInfos[columnInfo.fColumnId] = columnInfo;
85}
86
#define f(i)
Definition: RSha256.hxx:104
#define c(i)
Definition: RSha256.hxx:101
char name[80]
Definition: TGX11.cxx:109
Holds the static meta-data of a column in a tree.
void AddCluster(DescriptorId_t clusterId, RNTupleVersion version, NTupleSize_t firstEntryIndex, ClusterSize_t nEntries)
void AddColumnLink(DescriptorId_t columnId, DescriptorId_t linkId)
void AddFieldLink(DescriptorId_t fieldId, DescriptorId_t linkId)
void AddColumn(DescriptorId_t columnId, DescriptorId_t fieldId, const RNTupleVersion &version, const RColumnModel &model)
void AddField(DescriptorId_t fieldId, const RNTupleVersion &fieldVersion, const RNTupleVersion &typeVersion, std::string_view fieldName, std::string_view typeName, ENTupleStructure structure)
void AddClusterColumnInfo(DescriptorId_t clusterId, const RClusterDescriptor::RColumnInfo &columnInfo)
void SetFieldParent(DescriptorId_t fieldId, DescriptorId_t parentId)
void SetColumnOffset(DescriptorId_t columnId, DescriptorId_t offsetId)
void SetNTuple(std::string_view name, const RNTupleVersion &version)
For forward and backward compatibility, attach version information to the consitituents of the file f...
Definition: RNTupleUtil.hxx:73
basic_string_view< char > string_view
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Definition: RNTupleUtil.hxx:44
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
Definition: RNTupleUtil.hxx:33
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
Definition: RNTupleUtil.hxx:65
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...
Definition: RNTupleUtil.hxx:47