Logo ROOT  
Reference Guide
RNTupleOptions.hxx
Go to the documentation of this file.
1/// \file ROOT/RNTupleOptions.hxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2019-08-25
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-2019, 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_RNTupleOptions
17#define ROOT7_RNTupleOptions
18
19#include <Compression.h>
20#include <ROOT/RNTupleUtil.hxx>
21
22namespace ROOT {
23namespace Experimental {
24
25// clang-format off
26/**
27\class ROOT::Experimental::ENTupleContainerFormat
28\ingroup NTuple
29\brief Describes the options for wrapping RNTuple data in files
30*/
31// clang-format on
33 kTFile, // ROOT TFile
34 kBare, // A thin envelope supporting a single RNTuple only
35};
36
37
38// clang-format off
39/**
40\class ROOT::Experimental::RNTupleWriteOptions
41\ingroup NTuple
42\brief Common user-tunable settings for storing ntuples
43
44All page sink classes need to support the common options.
45*/
46// clang-format on
52 bool fUseBufferedWrite = true;
53
54public:
55 virtual ~RNTupleWriteOptions() = default;
56 virtual std::unique_ptr<RNTupleWriteOptions> Clone() const
57 { return std::make_unique<RNTupleWriteOptions>(*this); }
58
59 int GetCompression() const { return fCompression; }
60 void SetCompression(int val) { fCompression = val; }
61 void SetCompression(RCompressionSetting::EAlgorithm algorithm, int compressionLevel) {
62 fCompression = CompressionSettings(algorithm, compressionLevel);
63 }
64
67
70
73
74 bool GetUseBufferedWrite() const { return fUseBufferedWrite; }
75 void SetUseBufferedWrite(bool val) { fUseBufferedWrite = val; }
76};
77
78// clang-format off
79/**
80\class ROOT::Experimental::RNTupleWriteOptionsDaos
81\ingroup NTuple
82\brief DAOS-specific user-tunable settings for storing ntuples
83*/
84// clang-format on
86 std::string fObjectClass{"SX"};
87
88public:
89 virtual ~RNTupleWriteOptionsDaos() = default;
90 std::unique_ptr<RNTupleWriteOptions> Clone() const override
91 { return std::make_unique<RNTupleWriteOptionsDaos>(*this); }
92
93 const std::string &GetObjectClass() const { return fObjectClass; }
94 /// Set the object class used to generate OIDs that relate to user data. Any
95 /// `OC_xxx` constant defined in `daos_obj_class.h` may be used here without
96 /// the OC_ prefix.
97 void SetObjectClass(const std::string &val) { fObjectClass = val; }
98};
99
100// clang-format off
101/**
102\class ROOT::Experimental::RNTupleReadOptions
103\ingroup NTuple
104\brief Common user-tunable settings for reading ntuples
105
106All page source classes need to support the common options.
107*/
108// clang-format on
110public:
115 };
116
117private:
119
120public:
123};
124
125} // namespace Experimental
126} // namespace ROOT
127
128#endif
@ kDefault
Definition: TSystem.h:229
Common user-tunable settings for reading ntuples.
DAOS-specific user-tunable settings for storing ntuples.
const std::string & GetObjectClass() const
void SetObjectClass(const std::string &val)
Set the object class used to generate OIDs that relate to user data.
std::unique_ptr< RNTupleWriteOptions > Clone() const override
Common user-tunable settings for storing ntuples.
void SetContainerFormat(ENTupleContainerFormat val)
void SetNEntriesPerCluster(NTupleSize_t val)
ENTupleContainerFormat GetContainerFormat() const
virtual std::unique_ptr< RNTupleWriteOptions > Clone() const
void SetNElementsPerPage(NTupleSize_t val)
void SetCompression(RCompressionSetting::EAlgorithm algorithm, int compressionLevel)
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Definition: RNTupleUtil.hxx:77
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
int CompressionSettings(RCompressionSetting::EAlgorithm algorithm, int compressionLevel)
@ kUseAnalysis
Use the default analysis setting; fast reading but poor compression ratio.
Definition: Compression.h:52