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.

Format Option Type Default Description
All fMode std::string "RECREATE" Creation mode for the output TFile
fCompressionAlgorithm ROOT::RCompressionSetting::EAlgorithm Zstd Compression algorithm for the output dataset
fCompressionLevel int 5 Compression level for the output dataset
fOutputFormat ROOT::RDF::ESnapshotOutputFormat TTree Which output data format to use
fLazy bool False Whether to immediately start the event loop when Snapshot() is called
fOverwriteIfExists bool False If fMode is "UPDATE", overwrite the object with the same name in the output file already present
fVector2RVec bool True Store std::vector-type columns as ROOT::RVec in the output
fIncludeInVariations bool False Include columns that result from a Vary() action in the output
TTree fAutoFlush int 0 AutoFlush setting for the output (see TTree::SetAutoFlush())
fSplitLevel int 99 Split level of the output branches
fBasketSize int -1 Output basket size (a value of -1 means the TTree default of 32000 B used)
RNTuple fApproxZippedClusterSize std::size_t 128 MiB Approximate output compressed cluster size
fMaxUnzippedClusterSize std::size_t 1280 MiB Maximum uncompressed output cluster size
fInitialUnzippedPageSize std::size_t 256 B Initial output page size before compression
fMaxUnzippedPageSize std::size_t 1 MiB Maximum allowed output page size before compression
fEnablePageChecksums bool True Enable checksumming for output pages
fEnableSamePageMerging bool True Enable 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
 Compression algorithm of output file.
 
int fCompressionLevel = 5
 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 204 of file RSnapshotOptions.hxx.

◆ fAutoFlush

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

*(TTree only)* AutoFlush value for output tree

Definition at line 196 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 201 of file RSnapshotOptions.hxx.

◆ fCompressionAlgorithm

ECAlgo ROOT::RDF::RSnapshotOptions::fCompressionAlgorithm
Initial value:

Compression algorithm of output file.

Definition at line 187 of file RSnapshotOptions.hxx.

◆ fCompressionLevel

int ROOT::RDF::RSnapshotOptions::fCompressionLevel = 5

Compression level of output file.

Definition at line 189 of file RSnapshotOptions.hxx.

◆ fEnablePageChecksums

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

*(RNTuple only)* Enable checksumming for pages

Definition at line 212 of file RSnapshotOptions.hxx.

◆ fEnableSamePageMerging

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

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

Definition at line 214 of file RSnapshotOptions.hxx.

◆ fIncludeVariations

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

Include columns that result from a Vary() action.

Definition at line 193 of file RSnapshotOptions.hxx.

◆ fInitialUnzippedPageSize

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

*(RNTuple only)* Initial page size before compression

Definition at line 208 of file RSnapshotOptions.hxx.

◆ fLazy

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

Do not start the event loop when Snapshot is called.

Definition at line 190 of file RSnapshotOptions.hxx.

◆ fMaxUnzippedClusterSize

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

*(RNTuple only)* Maximum uncompressed cluster size

Definition at line 206 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 210 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 191 of file RSnapshotOptions.hxx.

◆ fSplitLevel

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

*(TTree only)* Split level of output tree

Definition at line 198 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 192 of file RSnapshotOptions.hxx.

Collaboration diagram for ROOT::RDF::RSnapshotOptions:
[legend]

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