An RNTuple that gets filled with entries (data) and writes them to storage.
An output ntuple can be filled with entries. The caller has to make sure that the data that gets filled into an ntuple is not modified for the time of the Fill() call. The fill call serializes the C++ object into the column format and writes data into the corresponding column page buffers. Writing of the buffers to storage is deferred and can be triggered by Flush() or by destructing the ntuple. On I/O errors, an exception is thrown.
Definition at line 368 of file RNTuple.hxx.
Public Member Functions | |
RNTupleWriter (const RNTupleWriter &)=delete | |
RNTupleWriter (std::unique_ptr< RNTupleModel > model, std::unique_ptr< Detail::RPageSink > sink) | |
Throws an exception if the model or the sink is null. More... | |
~RNTupleWriter () | |
void | CommitCluster (bool commitClusterGroup=false) |
Ensure that the data from the so far seen Fill calls has been written to storage. More... | |
std::unique_ptr< REntry > | CreateEntry () |
void | EnableMetrics () |
std::size_t | Fill () |
The simplest user interface if the default entry that comes with the ntuple model is used. More... | |
std::size_t | Fill (REntry &entry) |
Multiple entries can have been instantiated from the ntuple model. More... | |
const Detail::RNTupleMetrics & | GetMetrics () const |
const RNTupleModel * | GetModel () const |
RNTupleWriter & | operator= (const RNTupleWriter &)=delete |
Static Public Member Functions | |
static std::unique_ptr< RNTupleWriter > | Append (std::unique_ptr< RNTupleModel > model, std::string_view ntupleName, TFile &file, const RNTupleWriteOptions &options=RNTupleWriteOptions()) |
Throws an exception if the model is null. More... | |
static std::unique_ptr< RNTupleWriter > | Recreate (std::unique_ptr< RNTupleModel > model, std::string_view ntupleName, std::string_view storage, const RNTupleWriteOptions &options=RNTupleWriteOptions()) |
Throws an exception if the model is null. More... | |
Private Member Functions | |
void | CommitClusterGroup () |
Private Attributes | |
NTupleSize_t | fLastCommitted = 0 |
NTupleSize_t | fLastCommittedClusterGroup = 0 |
std::size_t | fMaxUnzippedClusterSize |
Limit for committing cluster no matter the other tunables. More... | |
Detail::RNTupleMetrics | fMetrics |
std::unique_ptr< RNTupleModel > | fModel |
Needs to be destructed before fSink. More... | |
std::uint64_t | fNBytesCommitted = 0 |
The total number of bytes written to storage (i.e., after compression) More... | |
std::uint64_t | fNBytesFilled = 0 |
The total number of bytes filled into all the so far committed clusters, i.e. More... | |
NTupleSize_t | fNEntries = 0 |
std::unique_ptr< Detail::RPageSink > | fSink |
std::size_t | fUnzippedClusterSize = 0 |
Keeps track of the number of bytes written into the current cluster. More... | |
NTupleSize_t | fUnzippedClusterSizeEst |
Estimator of uncompressed cluster size, taking into account the estimated compression ratio. More... | |
std::unique_ptr< Detail::RPageStorage::RTaskScheduler > | fZipTasks |
The page sink's parallel page compression scheduler if IMT is on. More... | |
#include <ROOT/RNTuple.hxx>
ROOT::Experimental::RNTupleWriter::RNTupleWriter | ( | std::unique_ptr< RNTupleModel > | model, |
std::unique_ptr< Detail::RPageSink > | sink | ||
) |
Throws an exception if the model or the sink is null.
Definition at line 276 of file RNTuple.cxx.
|
delete |
ROOT::Experimental::RNTupleWriter::~RNTupleWriter | ( | ) |
Definition at line 303 of file RNTuple.cxx.
|
static |
Throws an exception if the model is null.
Definition at line 317 of file RNTuple.cxx.
void ROOT::Experimental::RNTupleWriter::CommitCluster | ( | bool | commitClusterGroup = false | ) |
Ensure that the data from the so far seen Fill calls has been written to storage.
Definition at line 336 of file RNTuple.cxx.
|
private |
Definition at line 328 of file RNTuple.cxx.
|
inline |
Definition at line 435 of file RNTuple.hxx.
|
inline |
Definition at line 437 of file RNTuple.hxx.
|
inline |
The simplest user interface if the default entry that comes with the ntuple model is used.
Definition at line 414 of file RNTuple.hxx.
|
inline |
Multiple entries can have been instantiated from the ntuple model.
This method will perform a light check whether the entry comes from the ntuple's own model.
Definition at line 418 of file RNTuple.hxx.
|
inline |
Definition at line 438 of file RNTuple.hxx.
|
inline |
Definition at line 440 of file RNTuple.hxx.
|
delete |
|
static |
Throws an exception if the model is null.
Definition at line 310 of file RNTuple.cxx.
|
private |
Definition at line 377 of file RNTuple.hxx.
|
private |
Definition at line 378 of file RNTuple.hxx.
|
private |
Limit for committing cluster no matter the other tunables.
Definition at line 388 of file RNTuple.hxx.
|
private |
Definition at line 376 of file RNTuple.hxx.
|
private |
Needs to be destructed before fSink.
Definition at line 375 of file RNTuple.hxx.
|
private |
The total number of bytes written to storage (i.e., after compression)
Definition at line 383 of file RNTuple.hxx.
|
private |
The total number of bytes filled into all the so far committed clusters, i.e.
the uncompressed size of the written clusters
Definition at line 386 of file RNTuple.hxx.
|
private |
Definition at line 379 of file RNTuple.hxx.
|
private |
Definition at line 373 of file RNTuple.hxx.
|
private |
Keeps track of the number of bytes written into the current cluster.
Definition at line 381 of file RNTuple.hxx.
|
private |
Estimator of uncompressed cluster size, taking into account the estimated compression ratio.
Definition at line 390 of file RNTuple.hxx.
|
private |
The page sink's parallel page compression scheduler if IMT is on.
Needs to be destructed after the page sink is destructed and so declared before.
Definition at line 372 of file RNTuple.hxx.