Python interface
RNTupleWriter is an interface to write RNTuples to storage.
A simple way to write an RNTuple in python is by:
- creating a model and adding fields to it
- opening an RNTupleWriter
- creating entries and filling them with data
- committing entries to the RNTuple via writer.Fill(entry)
import ROOT
model.MakeField['int']("foo")
entry = writer.CreateEntry()
for i in range(0,10):
entry['foo'] = i
writer.Fill(entry)
static std::unique_ptr< RNTupleModel > Create()
static std::unique_ptr< RNTupleWriter > Recreate(std::unique_ptr< ROOT::RNTupleModel > model, std::string_view ntupleName, std::string_view storage, const ROOT::RNTupleWriteOptions &options=ROOT::RNTupleWriteOptions())
Creates an RNTupleWriter backed by storage, overwriting it if one with the same URI exists.