ROOT
Version v6.34
master
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
►
ROOT
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
RNTupleView.cxx
Go to the documentation of this file.
1
/// \file RNTupleView.cxx
2
/// \ingroup NTuple ROOT7
3
/// \author Jakob Blomer <jblomer@cern.ch>
4
/// \date 2024-10-28
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-2024, 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
#include <
ROOT/RError.hxx
>
17
#include <
ROOT/RFieldBase.hxx
>
18
#include <
ROOT/RNTupleDescriptor.hxx
>
19
#include <
ROOT/RNTupleView.hxx
>
20
#include <
ROOT/RPageStorage.hxx
>
21
22
ROOT::Experimental::RNTupleGlobalRange
23
ROOT::Experimental::Internal::GetFieldRange
(
const
RFieldBase
&
field
,
const
RPageSource
&
pageSource
)
24
{
25
const
auto
&desc =
pageSource
.GetSharedDescriptorGuard().GetRef();
26
27
auto
fnGetPrincipalColumnId
= [&desc](
DescriptorId_t
fieldId
) ->
DescriptorId_t
{
28
auto
columnIterable
= desc.GetColumnIterable(
fieldId
);
29
return
(
columnIterable
.size() > 0) ?
columnIterable
.
begin
()->GetPhysicalId() :
kInvalidDescriptorId
;
30
};
31
32
auto
columnId
=
fnGetPrincipalColumnId
(
field
.GetOnDiskId());
33
if
(
columnId
==
kInvalidDescriptorId
) {
34
for
(
const
auto
&
f
:
field
) {
35
columnId
=
fnGetPrincipalColumnId
(
f
.GetOnDiskId());
36
if
(
columnId
!=
kInvalidDescriptorId
)
37
break
;
38
}
39
}
40
41
if
(
columnId
==
kInvalidDescriptorId
) {
42
return
RNTupleGlobalRange
(
kInvalidNTupleIndex
,
kInvalidNTupleIndex
);
43
}
44
45
auto
arraySize = std::max(std::uint64_t(1), desc.GetFieldDescriptor(
field
.GetOnDiskId()).GetNRepetitions());
46
return
RNTupleGlobalRange
(0, desc.GetNElements(
columnId
) / arraySize);
47
}
RError.hxx
RFieldBase.hxx
RNTupleDescriptor.hxx
RNTupleView.hxx
RPageStorage.hxx
f
#define f(i)
Definition
RSha256.hxx:104
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Experimental::Internal::RPageSource
Abstract interface to read data from an ntuple.
Definition
RPageStorage.hxx:550
ROOT::Experimental::RFieldBase
A field translates read and write calls from/to underlying columns to/from tree values.
Definition
RFieldBase.hxx:67
ROOT::Experimental::RNTupleGlobalRange
Used to loop over indexes (entries or collections) between start and end.
Definition
RNTupleView.hxx:41
ROOT::RRangeCast::begin
const_iterator begin() const
Definition
RRangeCast.hxx:145
ROOT::Experimental::Internal::GetFieldRange
RNTupleGlobalRange GetFieldRange(const RFieldBase &field, const RPageSource &pageSource)
Helper to get the iteration space of the given field that needs to be connected to the given page sou...
Definition
RNTupleView.cxx:23
ROOT::Experimental::kInvalidNTupleIndex
constexpr NTupleSize_t kInvalidNTupleIndex
Definition
RNTupleUtil.hxx:118
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:168
ROOT::Experimental::kInvalidDescriptorId
constexpr DescriptorId_t kInvalidDescriptorId
Definition
RNTupleUtil.hxx:169
tree
ntuple
v7
src
RNTupleView.cxx
ROOT v6-34 - Reference Guide Generated on Fri Mar 28 2025 05:10:33 (GVA Time) using Doxygen 1.10.0