15#ifndef ROOT_RNTupleMerger
16#define ROOT_RNTupleMerger
36class RNTupleMergeStrategySlow;
37struct RNTupleSlowMergeData;
53 static const char *
const kMergingModeStr[] = {
"Filter",
"Strict",
"Union"};
54 return kMergingModeStr[
static_cast<int>(
mode)];
165 std::unique_ptr<ROOT::RNTupleModel>
fModel;
170 RNTupleMerger(std::unique_ptr<ROOT::Internal::RPagePersistentSink> destination,
171 std::unique_ptr<ROOT::RNTupleModel> model);
175 explicit RNTupleMerger(std::unique_ptr<ROOT::Internal::RPagePersistentSink> destination);
Option_t Option_t TPoint TPoint const char mode
RNTupleMergeActions & operator=(const RNTupleMergeActions &)=delete
virtual ENTupleMergeActionResult OnFill(ROOT::REntry &, const RNTupleMergeActionContext &)
Invoked every time an entry is merged from a source RNTuple to the destination RNTuple.
RNTupleMergeActions(RNTupleMergeActions &&)=default
RNTupleMergeActions(const RNTupleMergeActions &)=delete
RNTupleMergeActions()=default
RNTupleMergeActions & operator=(RNTupleMergeActions &&)=default
virtual ENTupleMergeActionResult OnSourceEnd(ROOT::REntry &, const RNTupleMergeActionContext &)
virtual ENTupleMergeActionResult BeforeCommit(ROOT::REntry &, const RNTupleMergeActionContext &)
Invoked at the end of the merge process, right before committing the dataset.
virtual ~RNTupleMergeActions()=default
Given a set of RPageSources merge them into an RPagePersistentSink, optionally changing their compres...
std::unique_ptr< ROOT::RNTupleModel > fModel
RNTupleMerger(std::unique_ptr< ROOT::Internal::RPagePersistentSink > destination, std::unique_ptr< ROOT::RNTupleModel > model)
Creates a RNTupleMerger with the given destination.
std::unique_ptr< ROOT::Internal::RPagePersistentSink > fDestination
RResult< void > Merge(std::span< ROOT::Internal::RPageSource * > sources, const RNTupleMergeOptions &mergeOpts=RNTupleMergeOptions())
Merge a given set of sources into the destination.
The REntry is a collection of values in an RNTuple corresponding to a complete row in the data set.
Representation of an RNTuple data set in a ROOT file.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
ENTupleMergeVersionBehavior
@ kAbortOnHigherVersion
The merger will refuse to merge RNTuples with higher versions than the latest supported by this ROOT ...
@ kWarnOnHigherVersion
The merger will emit a warning when merging RNTuples with higher version than the latest supported by...
const char * ToString(ENTupleMergingMode mode)
@ kAbort
The merger will abort merging as soon as an error is encountered.
@ kSkip
Upon errors, the merger will skip the current source and continue.
@ kStrict
The merger will refuse to merge any 2 RNTuples whose schema doesn't match exactly.
@ kUnion
The merger will update the output model to include all columns from all sources.
@ kFilter
The merger will discard all columns that aren't present in the prototype model (i....
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Information regarding the current slow merge process that gets passed to the RNTupleMergeActions.
ROOT::NTupleSize_t fSourceEntryIndex
ROOT::NTupleSize_t fDestinationEntryIndex
Set of merging options to pass to RNTupleMerger.
ENTupleMergeVersionBehavior fVersionBehavior
Determines how the Merge function behaves depending on the RNTuple sources' version.
bool fExtraVerbose
If true, the merger will emit further diagnostics and information.
std::optional< std::uint32_t > fCompressionSettings
If fCompressionSettings is empty (the default), the merger will not change the compression of any of ...
ENTupleMergingMode fMergingMode
Determines how the merging treats sources with different models (.
ENTupleMergeErrBehavior fErrBehavior
Determines how the Merge function behaves upon merging errors.