Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RNTupleBrowseUtils.cxx
Go to the documentation of this file.
1/// \file RNTupleBrowseUtils.cxx
2/// \author Jakob Blomer <jblomer@cern.ch>
3/// \date 2025-07-25
4
5/*************************************************************************
6 * Copyright (C) 1995-2025, Rene Brun and Fons Rademakers. *
7 * All rights reserved. *
8 * *
9 * For the licensing terms see $ROOTSYS/LICENSE. *
10 * For the list of contributors see $ROOTSYS/README/CREDITS. *
11 *************************************************************************/
12
15
17{
18 const auto &fieldDesc = desc.GetFieldDescriptor(fieldId);
19 if (fieldDesc.GetLinkIds().empty())
20 return fieldId;
21
22 DescriptorId_t result = fieldId;
23 if (fieldDesc.GetStructure() == ENTupleStructure::kCollection) {
24 // Variable-length collection: vector, map, set, collection proxy etc.
25 result = fieldDesc.GetLinkIds()[0];
26 } else if (fieldDesc.GetNRepetitions() > 0) {
27 // Fixed-size array
28 result = fieldDesc.GetLinkIds()[0];
29 } else if (fieldDesc.GetTypeName().rfind("std::atomic<", 0) == 0) {
30 result = fieldDesc.GetLinkIds()[0];
31 }
32
33 return (result != fieldId) ? GetNextBrowsableField(result, desc) : fieldId;
34}
The on-storage metadata of an RNTuple.
const RFieldDescriptor & GetFieldDescriptor(ROOT::DescriptorId_t fieldId) const
DescriptorId_t GetNextBrowsableField(DescriptorId_t fieldId, const RNTupleDescriptor &desc)
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.