A model is usually immutable after passing it to an RNTupleWriter
.
However, for the rare cases that require changing the model after the fact, RUpdater
provides limited support for incremental updates, e.g. addition of new fields.
See RNTupleWriter::CreateModelUpdater()
for an example.
Definition at line 145 of file RNTupleModel.hxx.
Public Member Functions | |
RUpdater (RNTupleWriter &writer) | |
~RUpdater () | |
void | AddField (std::unique_ptr< RFieldBase > field) |
RResult< void > | AddProjectedField (std::unique_ptr< RFieldBase > field, std::function< std::string(const std::string &)> mapping) |
void | BeginUpdate () |
Begin a new set of alterations to the underlying model. | |
void | CommitUpdate () |
Commit changes since the last call to BeginUpdate() . | |
template<typename T , typename... ArgsT> | |
std::shared_ptr< T > | MakeField (const NameWithDescription_t &fieldNameDesc, ArgsT &&...args) |
Private Attributes | |
std::uint64_t | fNewModelId = 0 |
The model ID after committing. | |
Internal::RNTupleModelChangeset | fOpenChangeset |
RNTupleWriter & | fWriter |
#include <ROOT/RNTupleModel.hxx>
|
explicit |
Definition at line 139 of file RNTupleModel.cxx.
|
inline |
Definition at line 153 of file RNTupleModel.hxx.
void ROOT::Experimental::RNTupleModel::RUpdater::AddField | ( | std::unique_ptr< RFieldBase > | field | ) |
Definition at line 164 of file RNTupleModel.cxx.
ROOT::Experimental::RResult< void > ROOT::Experimental::RNTupleModel::RUpdater::AddProjectedField | ( | std::unique_ptr< RFieldBase > | field, |
std::function< std::string(const std::string &)> | mapping | ||
) |
Definition at line 172 of file RNTupleModel.cxx.
void ROOT::Experimental::RNTupleModel::RUpdater::BeginUpdate | ( | ) |
Begin a new set of alterations to the underlying model.
As a side effect, all REntry
instances related to the model are invalidated.
Definition at line 144 of file RNTupleModel.cxx.
void ROOT::Experimental::RNTupleModel::RUpdater::CommitUpdate | ( | ) |
Commit changes since the last call to BeginUpdate()
.
All the invalidated REntry
s remain invalid. CreateEntry()
or CreateBareEntry()
can be used to create an REntry
that matching the new model. Upon completion, BeginUpdate()
can be called again to begin a new set of changes.
Definition at line 152 of file RNTupleModel.cxx.
|
inline |
Definition at line 163 of file RNTupleModel.hxx.
|
private |
The model ID after committing.
Definition at line 149 of file RNTupleModel.hxx.
|
private |
Definition at line 148 of file RNTupleModel.hxx.
|
private |
Definition at line 147 of file RNTupleModel.hxx.