Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
RNTupleReadOptions.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleReadOptions.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2024-02-22
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#ifndef ROOT7_RNTupleReadOptions
17#define ROOT7_RNTupleReadOptions
18
19namespace ROOT {
20
21class RNTupleReadOptions;
22
23namespace Internal {
24
26public:
27 static unsigned int GetClusterBunchSize(const RNTupleReadOptions &options);
28 static void SetClusterBunchSize(RNTupleReadOptions &options, unsigned int val);
29};
30
31} // namespace Internal
32
33// clang-format off
34/**
35\class ROOT::RNTupleReadOptions
36\ingroup NTuple
37\brief Common user-tunable settings for reading RNTuples
38
39All page source classes need to support the common options.
40
41<table>
42<tr>
43<th>Option name</th>
44<th>Type</th>
45<th>Default</th>
46<th>Description</th>
47</tr>
48
49<tr>
50<td>`ClusterCache`</td>
51<td>EClusterCache</td>
52<td>EClusterCache::kDefault</td>
53<td>
54Controls if the prefetcher (including the prefetcher thread) is used
55</td>
56</tr>
57
58<tr>
59<td>`UseImplicitMT`</td>
60<td>EImplicitMT</td>
61<td>EImplicitMT::kDefault</td>
62<td>
63Allows to disable parallel page compression and decompression even if ROOT uses implicit MT.
64This is useful, e.g., in the context of RDataFrame where the threads are fully managed by RDataFrame.
65</td>
66</tr>
67
68<tr>
69<td>`EnableMetrics`</td>
70<td>`bool`</td>
71<td>`false`</td>
72<td>
73If `true`, the RNTupleReader will track metrics straight from its construction, as
74if calling RNTupleReader::EnableMetrics() before having created the object.
75</td>
76</tr>
77</table>
78*/
79// clang-format on
82
83public:
84 enum class EClusterCache {
85 kOff,
86 kOn,
87 kDefault = kOn,
88 };
89
90 enum class EImplicitMT {
91 kOff,
93 };
94
95private:
97 /// The number of cluster to be prefetched in a single batch; this option is transitional and will be replaced
98 /// by an option that allows to control the amount of memory that the prefetcher uses.
99 unsigned int fClusterBunchSize = 1;
101 bool fEnableMetrics = false;
102
103public:
106
109
110 bool GetEnableMetrics() const { return fEnableMetrics; }
111 void SetEnableMetrics(bool val) { fEnableMetrics = val; }
112}; // class RNTupleReadOptions
113
114namespace Internal {
115
117{
118 return options.fClusterBunchSize;
119}
120
122{
123 options.fClusterBunchSize = val;
124}
125
126} // namespace Internal
127
128namespace Experimental {
129// TODO(gparolini): remove before branching ROOT v6.36
130using RNTupleReadOptions [[deprecated("ROOT::Experimental::RNTupleReadOptions moved to ROOT::RNTupleReadOptions")]] =
132} // namespace Experimental
133
134} // namespace ROOT
135
136#endif
static void SetClusterBunchSize(RNTupleReadOptions &options, unsigned int val)
static unsigned int GetClusterBunchSize(const RNTupleReadOptions &options)
Common user-tunable settings for reading RNTuples.
EClusterCache GetClusterCache() const
void SetClusterCache(EClusterCache val)
void SetUseImplicitMT(EImplicitMT val)
EImplicitMT GetUseImplicitMT() const
unsigned int fClusterBunchSize
The number of cluster to be prefetched in a single batch; this option is transitional and will be rep...
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...