Write RNTuple data blocks in a TFile or a bare file container.
The writer can create a new TFile container for an RNTuple or add an RNTuple to an existing TFile. Creating a single RNTuple in a new TFile container can be done with a C file stream without a TFile class. Updating an existing TFile requires a proper TFile object. Also, writing a remote file requires a proper TFile object. A stand-alone version of RNTuple can remove the TFile based writer.
Definition at line 109 of file RMiniFile.hxx.
|
| RNTupleFileWriter (const RNTupleFileWriter &other)=delete |
|
| RNTupleFileWriter (RNTupleFileWriter &&other)=delete |
|
| ~RNTupleFileWriter () |
|
void | Commit () |
| Writes the RNTuple key to the file so that the header and footer keys can be found.
|
|
RNTupleFileWriter & | operator= (const RNTupleFileWriter &other)=delete |
|
RNTupleFileWriter & | operator= (RNTupleFileWriter &&other)=delete |
|
std::uint64_t | ReserveBlob (size_t nbytes, size_t len, unsigned char keyBuffer[kBlobKeyLen]=nullptr) |
| Reserves a new record as an RBlob key in the file.
|
|
void | UpdateStreamerInfos (const RNTupleSerializer::StreamerInfoMap_t &streamerInfos) |
| Ensures that the streamer info records passed as argument are written to the file.
|
|
std::uint64_t | WriteBlob (const void *data, size_t nbytes, size_t len) |
| Writes a new record as an RBlob key into the file.
|
|
void | WriteIntoReservedBlob (const void *buffer, size_t nbytes, std::int64_t offset) |
| Write into a reserved record; the caller is responsible for making sure that the written byte range is in the previously reserved key.
|
|
std::uint64_t | WriteNTupleFooter (const void *data, size_t nbytes, size_t lenFooter) |
| Writes the compressed footer and registeres its location; lenFooter is the size of the uncompressed footer.
|
|
std::uint64_t | WriteNTupleHeader (const void *data, size_t nbytes, size_t lenHeader) |
| Writes the compressed header and registeres its location; lenHeader is the size of the uncompressed header.
|
|
|
static constexpr std::size_t | kBlobKeyLen = 42 |
| The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
|
|
#include <ROOT/RMiniFile.hxx>
◆ EContainerFormat
For testing purposes, RNTuple data can be written into a bare file container instead of a ROOT file.
Definition at line 213 of file RMiniFile.hxx.
◆ RNTupleFileWriter() [1/3]
ROOT::Experimental::Internal::RNTupleFileWriter::RNTupleFileWriter |
( |
std::string_view |
name, |
|
|
std::uint64_t |
maxKeySize |
|
) |
| |
|
explicitprivate |
◆ RNTupleFileWriter() [2/3]
ROOT::Experimental::Internal::RNTupleFileWriter::RNTupleFileWriter |
( |
const RNTupleFileWriter & |
other | ) |
|
|
delete |
◆ RNTupleFileWriter() [3/3]
ROOT::Experimental::Internal::RNTupleFileWriter::RNTupleFileWriter |
( |
RNTupleFileWriter && |
other | ) |
|
|
delete |
◆ ~RNTupleFileWriter()
ROOT::Experimental::Internal::RNTupleFileWriter::~RNTupleFileWriter |
( |
| ) |
|
◆ Append()
◆ Commit()
void ROOT::Experimental::Internal::RNTupleFileWriter::Commit |
( |
| ) |
|
Writes the RNTuple key to the file so that the header and footer keys can be found.
Definition at line 1191 of file RMiniFile.cxx.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Recreate()
Create or truncate the local file given by path with the new empty RNTuple identified by ntupleName.
Uses a C stream for writing
Definition at line 1121 of file RMiniFile.cxx.
◆ ReserveBlob()
std::uint64_t ROOT::Experimental::Internal::RNTupleFileWriter::ReserveBlob |
( |
size_t |
nbytes, |
|
|
size_t |
len, |
|
|
unsigned char |
keyBuffer[kBlobKeyLen] = nullptr |
|
) |
| |
Reserves a new record as an RBlob key in the file.
If keyBuffer is specified, it must be written before the returned offset. (Note that the array type is purely documentation, the argument is actually just a pointer.)
Definition at line 1301 of file RMiniFile.cxx.
◆ UpdateStreamerInfos()
Ensures that the streamer info records passed as argument are written to the file.
Definition at line 1185 of file RMiniFile.cxx.
◆ WriteBareFileSkeleton()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteBareFileSkeleton |
( |
int |
defaultCompression | ) |
|
|
private |
For a bare file, which is necessarily written by a C file stream, write file header.
Definition at line 1351 of file RMiniFile.cxx.
◆ WriteBlob()
std::uint64_t ROOT::Experimental::Internal::RNTupleFileWriter::WriteBlob |
( |
const void * |
data, |
|
|
size_t |
nbytes, |
|
|
size_t |
len |
|
) |
| |
Writes a new record as an RBlob key into the file.
Definition at line 1236 of file RMiniFile.cxx.
◆ WriteIntoReservedBlob()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteIntoReservedBlob |
( |
const void * |
buffer, |
|
|
size_t |
nbytes, |
|
|
std::int64_t |
offset |
|
) |
| |
Write into a reserved record; the caller is responsible for making sure that the written byte range is in the previously reserved key.
Definition at line 1321 of file RMiniFile.cxx.
◆ WriteNTupleFooter()
std::uint64_t ROOT::Experimental::Internal::RNTupleFileWriter::WriteNTupleFooter |
( |
const void * |
data, |
|
|
size_t |
nbytes, |
|
|
size_t |
lenFooter |
|
) |
| |
Writes the compressed footer and registeres its location; lenFooter is the size of the uncompressed footer.
Definition at line 1342 of file RMiniFile.cxx.
◆ WriteNTupleHeader()
std::uint64_t ROOT::Experimental::Internal::RNTupleFileWriter::WriteNTupleHeader |
( |
const void * |
data, |
|
|
size_t |
nbytes, |
|
|
size_t |
lenHeader |
|
) |
| |
Writes the compressed header and registeres its location; lenHeader is the size of the uncompressed header.
Definition at line 1332 of file RMiniFile.cxx.
◆ WriteTFileFreeList()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteTFileFreeList |
( |
| ) |
|
|
private |
◆ WriteTFileKeysList()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteTFileKeysList |
( |
| ) |
|
|
private |
◆ WriteTFileNTupleKey()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteTFileNTupleKey |
( |
| ) |
|
|
private |
The only key that will be visible in file->ls()
Definition at line 1458 of file RMiniFile.cxx.
◆ WriteTFileSkeleton()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteTFileSkeleton |
( |
int |
defaultCompression | ) |
|
|
private |
◆ WriteTFileStreamerInfo()
void ROOT::Experimental::Internal::RNTupleFileWriter::WriteTFileStreamerInfo |
( |
| ) |
|
|
private |
Write the compressed streamer info record with the description of the RNTuple class.
Definition at line 1368 of file RMiniFile.cxx.
◆ fFileName
std::string ROOT::Experimental::Internal::RNTupleFileWriter::fFileName |
|
private |
The file name without parent directory; only required when writing with a C file stream.
Definition at line 189 of file RMiniFile.hxx.
◆ fFileProper
RFileProper ROOT::Experimental::Internal::RNTupleFileWriter::fFileProper |
|
private |
For updating existing files and for storing more than just an RNTuple in the file.
Definition at line 180 of file RMiniFile.hxx.
◆ fFileSimple
RFileSimple ROOT::Experimental::Internal::RNTupleFileWriter::fFileSimple |
|
private |
For simple use cases, survives without libRIO dependency.
Definition at line 182 of file RMiniFile.hxx.
◆ fIsBare
bool ROOT::Experimental::Internal::RNTupleFileWriter::fIsBare = false |
|
private |
A simple file can either be written as TFile container or as NTuple bare file.
Definition at line 184 of file RMiniFile.hxx.
◆ fNTupleAnchor
RNTuple ROOT::Experimental::Internal::RNTupleFileWriter::fNTupleAnchor |
|
private |
◆ fNTupleName
std::string ROOT::Experimental::Internal::RNTupleFileWriter::fNTupleName |
|
private |
The identifier of the RNTuple; A single writer object can only write a single RNTuple but multiple writers can operate on the same file if (and only if) they use a proper TFile object for writing.
Definition at line 187 of file RMiniFile.hxx.
◆ fStreamerInfoMap
Set of streamer info records that should be written to the file.
The RNTuple class description is always present.
Definition at line 194 of file RMiniFile.hxx.
◆ kBlobKeyLen
constexpr std::size_t ROOT::Experimental::Internal::RNTupleFileWriter::kBlobKeyLen = 42 |
|
staticconstexpr |
The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
Definition at line 112 of file RMiniFile.hxx.
The documentation for this class was generated from the following files: