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