Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RNTupleReadOptions.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleReadOptions.hxx
2/// \author Jakob Blomer <jblomer@cern.ch>
3/// \date 2024-02-22
4
5/*************************************************************************
6 * Copyright (C) 1995-2024, 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
13#ifndef ROOT_RNTupleReadOptions
14#define ROOT_RNTupleReadOptions
15
16namespace ROOT {
17
19
20namespace Internal {
21
23public:
24 static unsigned int GetClusterBunchSize(const RNTupleReadOptions &options);
25 static void SetClusterBunchSize(RNTupleReadOptions &options, unsigned int val);
26};
27
28} // namespace Internal
29
30// clang-format off
31/**
32\class ROOT::RNTupleReadOptions
33\ingroup NTuple
34\brief Common user-tunable settings for reading RNTuples
35
36All page source classes need to support the common options.
37
38<table>
39<tr>
40<th>Option name</th>
41<th>Type</th>
42<th>Default</th>
43<th>Description</th>
44</tr>
45
46<tr>
47<td>`ClusterCache`</td>
48<td>EClusterCache</td>
49<td>EClusterCache::kDefault</td>
50<td>
51Controls if the prefetcher (including the prefetcher thread) is used
52</td>
53</tr>
54
55<tr>
56<td>`UseImplicitMT`</td>
57<td>EImplicitMT</td>
58<td>EImplicitMT::kDefault</td>
59<td>
60Allows to disable parallel page compression and decompression even if ROOT uses implicit MT.
61This is useful, e.g., in the context of RDataFrame where the threads are fully managed by RDataFrame.
62</td>
63</tr>
64
65<tr>
66<td>`EnableMetrics`</td>
67<td>`bool`</td>
68<td>`false`</td>
69<td>
70If `true`, the RNTupleReader will track metrics straight from its construction, as
71if calling RNTupleReader::EnableMetrics() before having created the object.
72</td>
73</tr>
74</table>
75*/
76// clang-format on
79
80public:
81 enum class EClusterCache {
85 };
86
87 enum class EImplicitMT {
90 };
91
92private:
94 /// The number of cluster to be prefetched in a single batch; this option is transitional and will be replaced
95 /// by an option that allows to control the amount of memory that the prefetcher uses.
96 unsigned int fClusterBunchSize = 1;
98 bool fEnableMetrics = false;
99
100public:
103
106
107 bool GetEnableMetrics() const { return fEnableMetrics; }
108 void SetEnableMetrics(bool val) { fEnableMetrics = val; }
109}; // class RNTupleReadOptions
110
111namespace Internal {
112
114{
115 return options.fClusterBunchSize;
116}
117
119{
120 options.fClusterBunchSize = val;
121}
122
123} // namespace Internal
124} // namespace ROOT
125
126#endif
@ kDefault
Definition TSystem.h:243
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...