Logo ROOT  
Reference Guide
ROOT::Experimental::RNTupleWriter Class Reference

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 188 of file RNTuple.hxx.

Public Member Functions

 RNTupleWriter (const RNTupleWriter &)=delete
 
 RNTupleWriter (std::unique_ptr< RNTupleModel > model, std::unique_ptr< Detail::RPageSink > sink)
 
 ~RNTupleWriter ()
 
void CommitCluster ()
 Ensure that the data from the so far seen Fill calls has been written to storage. More...
 
void Fill ()
 The simplest user interface if the default entry that comes with the ntuple model is used. More...
 
void Fill (REntry *entry)
 Multiple entries can have been instantiated from the tnuple model. More...
 
RNTupleWriteroperator= (const RNTupleWriter &)=delete
 
- Public Member Functions inherited from ROOT::Experimental::Detail::RNTuple
 RNTuple (const RNTuple &)=delete
 
 ~RNTuple ()
 
RNTupleModelGetModel ()
 
RNTupleoperator= (const RNTuple &)=delete
 

Static Public Member Functions

static std::unique_ptr< RNTupleWriterRecreate (std::unique_ptr< RNTupleModel > model, std::string_view ntupleName, std::string_view storage, const RNTupleWriteOptions &options=RNTupleWriteOptions())
 

Private Attributes

NTupleSize_t fClusterSizeEntries
 
NTupleSize_t fLastCommitted
 
std::unique_ptr< Detail::RPageSinkfSink
 

Static Private Attributes

static constexpr NTupleSize_t kDefaultClusterSizeEntries = 64000
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Experimental::Detail::RNTuple
 RNTuple (std::unique_ptr< RNTupleModel > model)
 Only the derived RNTupleReader and RNTupleWriter can be instantiated. More...
 
- Protected Attributes inherited from ROOT::Experimental::Detail::RNTuple
std::unique_ptr< RNTupleModelfModel
 
NTupleSize_t fNEntries
 The number of entries is constant for reading and reflects the sum of Fill() operations when writing. More...
 

#include <ROOT/RNTuple.hxx>

Inheritance diagram for ROOT::Experimental::RNTupleWriter:
[legend]

Constructor & Destructor Documentation

◆ RNTupleWriter() [1/2]

ROOT::Experimental::RNTupleWriter::RNTupleWriter ( std::unique_ptr< RNTupleModel model,
std::unique_ptr< Detail::RPageSink sink 
)

Definition at line 156 of file RNTuple.cxx.

◆ RNTupleWriter() [2/2]

ROOT::Experimental::RNTupleWriter::RNTupleWriter ( const RNTupleWriter )
delete

◆ ~RNTupleWriter()

ROOT::Experimental::RNTupleWriter::~RNTupleWriter ( )

Definition at line 167 of file RNTuple.cxx.

Member Function Documentation

◆ CommitCluster()

void ROOT::Experimental::RNTupleWriter::CommitCluster ( )

Ensure that the data from the so far seen Fill calls has been written to storage.

Definition at line 185 of file RNTuple.cxx.

◆ Fill() [1/2]

void ROOT::Experimental::RNTupleWriter::Fill ( )
inline

The simplest user interface if the default entry that comes with the ntuple model is used.

Definition at line 206 of file RNTuple.hxx.

◆ Fill() [2/2]

void ROOT::Experimental::RNTupleWriter::Fill ( REntry entry)
inline

Multiple entries can have been instantiated from the tnuple model.

This method will perform a light check whether the entry comes from the ntuple's own model

Definition at line 209 of file RNTuple.hxx.

◆ operator=()

RNTupleWriter & ROOT::Experimental::RNTupleWriter::operator= ( const RNTupleWriter )
delete

◆ Recreate()

std::unique_ptr< ROOT::Experimental::RNTupleWriter > ROOT::Experimental::RNTupleWriter::Recreate ( std::unique_ptr< RNTupleModel model,
std::string_view  ntupleName,
std::string_view  storage,
const RNTupleWriteOptions options = RNTupleWriteOptions() 
)
static

Definition at line 175 of file RNTuple.cxx.

Member Data Documentation

◆ fClusterSizeEntries

NTupleSize_t ROOT::Experimental::RNTupleWriter::fClusterSizeEntries
private

Definition at line 192 of file RNTuple.hxx.

◆ fLastCommitted

NTupleSize_t ROOT::Experimental::RNTupleWriter::fLastCommitted
private

Definition at line 193 of file RNTuple.hxx.

◆ fSink

std::unique_ptr<Detail::RPageSink> ROOT::Experimental::RNTupleWriter::fSink
private

Definition at line 191 of file RNTuple.hxx.

◆ kDefaultClusterSizeEntries

constexpr NTupleSize_t ROOT::Experimental::RNTupleWriter::kDefaultClusterSizeEntries = 64000
staticconstexprprivate

Definition at line 190 of file RNTuple.hxx.

Libraries for ROOT::Experimental::RNTupleWriter:
[legend]

The documentation for this class was generated from the following files: