Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RNTupleMerger.cxx File Reference
#include <ROOT/RError.hxx>
#include <ROOT/RNTuple.hxx>
#include <ROOT/RNTupleDescriptor.hxx>
#include <ROOT/RNTupleMerger.hxx>
#include <ROOT/RNTupleModel.hxx>
#include <ROOT/RNTupleTypes.hxx>
#include <ROOT/RNTupleUtils.hxx>
#include <ROOT/RPageAllocator.hxx>
#include <ROOT/RPageStorageFile.hxx>
#include <ROOT/RPageStorage.hxx>
#include <ROOT/RClusterPool.hxx>
#include <ROOT/RNTupleSerialize.hxx>
#include <ROOT/RNTupleZip.hxx>
#include <ROOT/RColumnElementBase.hxx>
#include <TROOT.h>
#include <TFileMergeInfo.h>
#include <TFile.h>
#include <TKey.h>
#include <algorithm>
#include <deque>
#include <initializer_list>
#include <unordered_map>
#include <vector>

Classes

class  RCluster
 An in-memory subset of the packed and compressed pages of a cluster. More...
class  RColumnElementBase
 A column element encapsulates the translation between basic C++ types and their column representation. More...
struct  ROOT::Experimental::Internal::RColumnMergeInfo
struct  ROOT::Experimental::Internal::RNTupleMergeData
class  RNTupleModel
 The RNTupleModel encapulates the schema of an RNTuple. More...
class  RPageSourceFile
 Storage provider that reads ntuple pages from a file. More...
class  RPageStorage
 Common functionality of an ntuple storage for both reading and writing. More...
struct  ROOT::Experimental::Internal::RSealedPageMergeData

Namespaces

namespace  ROOT
namespace  ROOT::Experimental
 Namespace for ROOT features in testing.
namespace  ROOT::Experimental::Internal

Macros

#define SKIP_OR_ABORT(errMsg)

Enumerations

enum class  ENTupleColumnType

Functions

static void AddColumnsFromField (std::vector< RColumnMergeInfo > &columns, const ROOT::RNTupleDescriptor &srcDesc, RNTupleMergeData &mergeData, const ROOT::RFieldDescriptor &srcFieldDesc, const ROOT::RFieldDescriptor &dstFieldDesc, const std::string &prefix="")
static bool BeginsWithDelimitedWord (const TString &str, const char *word)
static std::optional< std::type_index > ColumnInMemoryType (std::string_view fieldType, ENTupleColumnType onDiskType)
static ROOT::RResult< RDescriptorsComparison > CompareDescriptorStructure (const ROOT::RNTupleDescriptor &dst, const ROOT::RNTupleDescriptor &src)
 Compares the top level fields of dst and src and determines whether they can be merged or not.
static ROOT::RResult< void > ExtendDestinationModel (std::span< const ROOT::RFieldDescriptor * > newFields, ROOT::RNTupleModel &dstModel, RNTupleMergeData &mergeData, std::vector< RCommonField > &commonFields)
static RColumnInfoGroup GatherColumnInfos (const RDescriptorsComparison &descCmp, const ROOT::RNTupleDescriptor &srcDesc, RNTupleMergeData &mergeData)
static ROOT::RResult< void > GenerateZeroPagesForColumns (size_t nEntriesToGenerate, std::span< const RColumnMergeInfo > columns, RSealedPageMergeData &sealedPageData, ROOT::Internal::RPageAllocator &pageAlloc, const ROOT::RNTupleDescriptor &dstDescriptor, const RNTupleMergeData &mergeData)
static bool IsSplitOrUnsplitVersionOf (ENTupleColumnType a, ENTupleColumnType b)
template<typename T>
std::unique_ptr< T[]> MakeUninitArray (std::size_t size)
 Make an array of default-initialized elements.
static ROOT::RLogChannelNTupleMergeLog ()
std::ostream & ROOT::Experimental::Internal::operator<< (std::ostream &os, const std::optional< ROOT::RColumnDescriptor::RValueRange > &x)
static std::optional< ENTupleMergeErrBehaviorParseOptionErrBehavior (const TString &opts)
static std::optional< ENTupleMergingModeParseOptionMergingMode (const TString &opts)
static std::optional< ENTupleMergeVersionBehaviorParseOptionVersionBehavior (const TString &opts)
template<typename T>
static std::optional< T > ParseStringOption (const TString &opts, const char *pattern, std::initializer_list< std::pair< const char *, T > > validValues)
static void PrefillColumnMap (const ROOT::RNTupleDescriptor &desc, const ROOT::RFieldDescriptor &fieldDesc, ColumnIdMap_t &colIdMap, const std::string &prefix="")

Detailed Description

Author
Jakob Blomer jblom.nosp@m.er@c.nosp@m.ern.c.nosp@m.h, Max Orok maxwe.nosp@m.llor.nosp@m.ok@gm.nosp@m.ail..nosp@m.com, Alaettin Serhan Mete amete.nosp@m.@anl.nosp@m..gov, Giacomo Parolini giaco.nosp@m.mo.p.nosp@m.aroli.nosp@m.ni@c.nosp@m.ern.c.nosp@m.h
Date
2020-07-08
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition in file RNTupleMerger.cxx.

Macro Definition Documentation

◆ SKIP_OR_ABORT

#define SKIP_OR_ABORT ( errMsg)
Value:
do { \
if (mergeOpts.fErrBehavior == ENTupleMergeErrBehavior::kSkip) { \
R__LOG_WARNING(NTupleMergeLog()) << "Skipping RNTuple due to: " << (errMsg); \
continue; \
} else { \
return R__FAIL(errMsg); \
} \
} while (0)
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
Definition RError.hxx:299
static ROOT::RLogChannel & NTupleMergeLog()

Enumeration Type Documentation

◆ ENTupleColumnType

enum class ROOT::ENTupleColumnType
strong

Definition at line 63 of file RNTupleTypes.hxx.

Function Documentation

◆ AddColumnsFromField()

void AddColumnsFromField ( std::vector< RColumnMergeInfo > & columns,
const ROOT::RNTupleDescriptor & srcDesc,
RNTupleMergeData & mergeData,
const ROOT::RFieldDescriptor & srcFieldDesc,
const ROOT::RFieldDescriptor & dstFieldDesc,
const std::string & prefix = "" )
static

Definition at line 1089 of file RNTupleMerger.cxx.

◆ BeginsWithDelimitedWord()

bool BeginsWithDelimitedWord ( const TString & str,
const char * word )
static

Definition at line 62 of file RNTupleMerger.cxx.

◆ ColumnInMemoryType()

std::optional< std::type_index > ColumnInMemoryType ( std::string_view fieldType,
ENTupleColumnType onDiskType )
static

Definition at line 1054 of file RNTupleMerger.cxx.

◆ CompareDescriptorStructure()

ROOT::RResult< RDescriptorsComparison > CompareDescriptorStructure ( const ROOT::RNTupleDescriptor & dst,
const ROOT::RNTupleDescriptor & src )
static

Compares the top level fields of dst and src and determines whether they can be merged or not.

In addition, returns the differences between dst and src's structures

Definition at line 474 of file RNTupleMerger.cxx.

◆ ExtendDestinationModel()

ROOT::RResult< void > ExtendDestinationModel ( std::span< const ROOT::RFieldDescriptor * > newFields,
ROOT::RNTupleModel & dstModel,
RNTupleMergeData & mergeData,
std::vector< RCommonField > & commonFields )
staticnodiscard

Definition at line 675 of file RNTupleMerger.cxx.

◆ GatherColumnInfos()

RColumnInfoGroup GatherColumnInfos ( const RDescriptorsComparison & descCmp,
const ROOT::RNTupleDescriptor & srcDesc,
RNTupleMergeData & mergeData )
static

Definition at line 1168 of file RNTupleMerger.cxx.

◆ GenerateZeroPagesForColumns()

ROOT::RResult< void > GenerateZeroPagesForColumns ( size_t nEntriesToGenerate,
std::span< const RColumnMergeInfo > columns,
RSealedPageMergeData & sealedPageData,
ROOT::Internal::RPageAllocator & pageAlloc,
const ROOT::RNTupleDescriptor & dstDescriptor,
const RNTupleMergeData & mergeData )
staticnodiscard

Definition at line 744 of file RNTupleMerger.cxx.

◆ IsSplitOrUnsplitVersionOf()

bool IsSplitOrUnsplitVersionOf ( ENTupleColumnType a,
ENTupleColumnType b )
static

Definition at line 444 of file RNTupleMerger.cxx.

◆ MakeUninitArray()

template<typename T>
std::unique_ptr< T[]> ROOT::Internal::MakeUninitArray ( std::size_t size)

Make an array of default-initialized elements.

This is useful for buffers that do not need to be initialized.

With C++20, this function can be replaced by std::make_unique_for_overwrite<T[]>.

Definition at line 42 of file RNTupleUtils.hxx.

◆ NTupleMergeLog()

ROOT::RLogChannel & NTupleMergeLog ( )
static

Definition at line 54 of file RNTupleMerger.cxx.

◆ ParseOptionErrBehavior()

std::optional< ENTupleMergeErrBehavior > ParseOptionErrBehavior ( const TString & opts)
static

Definition at line 100 of file RNTupleMerger.cxx.

◆ ParseOptionMergingMode()

std::optional< ENTupleMergingMode > ParseOptionMergingMode ( const TString & opts)
static

Definition at line 90 of file RNTupleMerger.cxx.

◆ ParseOptionVersionBehavior()

std::optional< ENTupleMergeVersionBehavior > ParseOptionVersionBehavior ( const TString & opts)
static

Definition at line 109 of file RNTupleMerger.cxx.

◆ ParseStringOption()

template<typename T>
std::optional< T > ParseStringOption ( const TString & opts,
const char * pattern,
std::initializer_list< std::pair< const char *, T > > validValues )
static

Definition at line 73 of file RNTupleMerger.cxx.

◆ PrefillColumnMap()

void PrefillColumnMap ( const ROOT::RNTupleDescriptor & desc,
const ROOT::RFieldDescriptor & fieldDesc,
ColumnIdMap_t & colIdMap,
const std::string & prefix = "" )
static

Definition at line 1187 of file RNTupleMerger.cxx.