Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ROOT::RDF::RSnapshotOptions Struct Reference

A collection of options to steer the creation of the dataset on disk through Snapshot().

Some settings are output format-dependent. Please refer to the table below for an overview of all options, and to which output format they apply.

Note that for RNTuple, the defaults correspond to those set in RNTupleWriteOptions.

FormatOptionTypeDefaultDescription
AllfModestd::string"RECREATE"Creation mode for the output TFile
fCompressionAlgorithmROOT::RCompressionSetting::EAlgorithmZstdCompression algorithm for the output dataset, defaults to ROOT::RCompressionSetting::EAlgorithm::EValues::kUndefined. This is converted to ZLIB by default for TTree and ZSTD by default for RNTuple
fCompressionLevelint5Compression level for the output dataset, defaults to 0 (uncompressed). If the default value of fCompressionAlgorithm is not modified, the compression level is changed to 1 by default for TTree and 5 by default for RNTuple
fOutputFormatROOT::RDF::ESnapshotOutputFormatTTreeWhich output data format to use
fLazyboolFalseWhether to immediately start the event loop when Snapshot() is called
fOverwriteIfExistsboolFalseIf fMode is "UPDATE", overwrite the object with the same name in the output file already present
fVector2RVecboolTrueStore std::vector-type columns as ROOT::RVec in the output
fIncludeInVariationsboolFalseInclude columns that result from a Vary() action in the output
TTreefAutoFlushint0AutoFlush setting for the output (see TTree::SetAutoFlush())
fSplitLevelint99Split level of the output branches
fBasketSizeint-1Output basket size (a value of -1 means the TTree default of 32000 B used)
RNTuplefApproxZippedClusterSizestd::size_t128 MiBApproximate output compressed cluster size
fMaxUnzippedClusterSizestd::size_t1280 MiBMaximum uncompressed output cluster size
fInitialUnzippedPageSizestd::size_t256 BInitial output page size before compression
fMaxUnzippedPageSizestd::size_t1 MiBMaximum allowed output page size before compression
fEnablePageChecksumsboolTrueEnable checksumming for output pages
fEnableSamePageMergingboolTrueEnable identical-page deduplication (requires page checksumming enabled)

Definition at line 157 of file RSnapshotOptions.hxx.

Public Types

using ECAlgo = ROOT::RCompressionSetting::EAlgorithm::EValues

Public Member Functions

 RSnapshotOptions ()=default
 RSnapshotOptions (std::string_view mode, ECAlgo comprAlgo, int comprLevel, int autoFlush, int splitLevel, bool lazy, bool overwriteIfExists=false, bool vector2RVec=true, int basketSize=-1, std::size_t approxZippedClusterSize=128 *1024 *1024, std::size_t maxUnzippedClusterSize=10 *128 *1024 *1024, std::size_t maxUnzippedPageSize=1024 *1024, std::size_t initUnzippedPageSize=256, bool enablePageChecksums=true, bool enableSamePageMerging=true, ESnapshotOutputFormat outputFormat=ESnapshotOutputFormat::kDefault)

Public Attributes

std::size_t fApproxZippedClusterSize = 128 * 1024 * 1024
 (RNTuple only) Approximate target compressed cluster size
int fAutoFlush = 0
 (TTree only) AutoFlush value for output tree
int fBasketSize = -1
 (TTree only) Set a custom basket size option.
ECAlgo fCompressionAlgorithm = ECAlgo::kUndefined
 Compression algorithm of output file.
int fCompressionLevel = 0
 Compression level of output file.
bool fEnablePageChecksums = true
 (RNTuple only) Enable checksumming for pages
bool fEnableSamePageMerging = true
 (RNTuple only) Enable identical-page deduplication. Requires page checksumming
bool fIncludeVariations = false
 Include columns that result from a Vary() action.
std::size_t fInitialUnzippedPageSize = 256
 (RNTuple only) Initial page size before compression
bool fLazy = false
 Do not start the event loop when Snapshot is called.
std::size_t fMaxUnzippedClusterSize = 10 * fApproxZippedClusterSize
 (RNTuple only) Maximum uncompressed cluster size
std::size_t fMaxUnzippedPageSize = 1024 * 1024
 (RNTuple only) Maximum allowed page size before compression
std::string fMode = "RECREATE"
 Mode of creation of output file.
ESnapshotOutputFormat fOutputFormat = ESnapshotOutputFormat::kDefault
 Which data format to write to.
bool fOverwriteIfExists = false
 If fMode is "UPDATE", overwrite object in output file if it already exists.
int fSplitLevel = 99
 (TTree only) Split level of output tree
bool fVector2RVec = true
 If set to true will convert std::vector columns to RVec when saving to disk.

#include <ROOT/RSnapshotOptions.hxx>

Member Typedef Documentation

◆ ECAlgo

Constructor & Destructor Documentation

◆ RSnapshotOptions() [1/2]

ROOT::RDF::RSnapshotOptions::RSnapshotOptions ( )
default

◆ RSnapshotOptions() [2/2]

ROOT::RDF::RSnapshotOptions::RSnapshotOptions ( std::string_view mode,
ECAlgo comprAlgo,
int comprLevel,
int autoFlush,
int splitLevel,
bool lazy,
bool overwriteIfExists = false,
bool vector2RVec = true,
int basketSize = -1,
std::size_t approxZippedClusterSize = 128 * 1024 * 1024,
std::size_t maxUnzippedClusterSize = 10 * 128 * 1024 * 1024,
std::size_t maxUnzippedPageSize = 1024 * 1024,
std::size_t initUnzippedPageSize = 256,
bool enablePageChecksums = true,
bool enableSamePageMerging = true,
ESnapshotOutputFormat outputFormat = ESnapshotOutputFormat::kDefault )
inline

Definition at line 160 of file RSnapshotOptions.hxx.

Member Data Documentation

◆ fApproxZippedClusterSize

std::size_t ROOT::RDF::RSnapshotOptions::fApproxZippedClusterSize = 128 * 1024 * 1024

(RNTuple only) Approximate target compressed cluster size

Definition at line 203 of file RSnapshotOptions.hxx.

◆ fAutoFlush

int ROOT::RDF::RSnapshotOptions::fAutoFlush = 0

(TTree only) AutoFlush value for output tree

Definition at line 195 of file RSnapshotOptions.hxx.

◆ fBasketSize

int ROOT::RDF::RSnapshotOptions::fBasketSize = -1

(TTree only) Set a custom basket size option.

For more details, see https://root.cern/manual/trees/#baskets-clusters-and-the-tree-header

Definition at line 200 of file RSnapshotOptions.hxx.

◆ fCompressionAlgorithm

ECAlgo ROOT::RDF::RSnapshotOptions::fCompressionAlgorithm = ECAlgo::kUndefined

Compression algorithm of output file.

Definition at line 187 of file RSnapshotOptions.hxx.

◆ fCompressionLevel

int ROOT::RDF::RSnapshotOptions::fCompressionLevel = 0

Compression level of output file.

Definition at line 188 of file RSnapshotOptions.hxx.

◆ fEnablePageChecksums

bool ROOT::RDF::RSnapshotOptions::fEnablePageChecksums = true

(RNTuple only) Enable checksumming for pages

Definition at line 211 of file RSnapshotOptions.hxx.

◆ fEnableSamePageMerging

bool ROOT::RDF::RSnapshotOptions::fEnableSamePageMerging = true

(RNTuple only) Enable identical-page deduplication. Requires page checksumming

Definition at line 213 of file RSnapshotOptions.hxx.

◆ fIncludeVariations

bool ROOT::RDF::RSnapshotOptions::fIncludeVariations = false

Include columns that result from a Vary() action.

Definition at line 192 of file RSnapshotOptions.hxx.

◆ fInitialUnzippedPageSize

std::size_t ROOT::RDF::RSnapshotOptions::fInitialUnzippedPageSize = 256

(RNTuple only) Initial page size before compression

Definition at line 207 of file RSnapshotOptions.hxx.

◆ fLazy

bool ROOT::RDF::RSnapshotOptions::fLazy = false

Do not start the event loop when Snapshot is called.

Definition at line 189 of file RSnapshotOptions.hxx.

◆ fMaxUnzippedClusterSize

std::size_t ROOT::RDF::RSnapshotOptions::fMaxUnzippedClusterSize = 10 * fApproxZippedClusterSize

(RNTuple only) Maximum uncompressed cluster size

Definition at line 205 of file RSnapshotOptions.hxx.

◆ fMaxUnzippedPageSize

std::size_t ROOT::RDF::RSnapshotOptions::fMaxUnzippedPageSize = 1024 * 1024

(RNTuple only) Maximum allowed page size before compression

Definition at line 209 of file RSnapshotOptions.hxx.

◆ fMode

std::string ROOT::RDF::RSnapshotOptions::fMode = "RECREATE"

Mode of creation of output file.

Definition at line 185 of file RSnapshotOptions.hxx.

◆ fOutputFormat

ESnapshotOutputFormat ROOT::RDF::RSnapshotOptions::fOutputFormat = ESnapshotOutputFormat::kDefault

Which data format to write to.

Definition at line 186 of file RSnapshotOptions.hxx.

◆ fOverwriteIfExists

bool ROOT::RDF::RSnapshotOptions::fOverwriteIfExists = false

If fMode is "UPDATE", overwrite object in output file if it already exists.

Definition at line 190 of file RSnapshotOptions.hxx.

◆ fSplitLevel

int ROOT::RDF::RSnapshotOptions::fSplitLevel = 99

(TTree only) Split level of output tree

Definition at line 197 of file RSnapshotOptions.hxx.

◆ fVector2RVec

bool ROOT::RDF::RSnapshotOptions::fVector2RVec = true

If set to true will convert std::vector columns to RVec when saving to disk.

Definition at line 191 of file RSnapshotOptions.hxx.


The documentation for this struct was generated from the following file: