Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::RNTupleFileWriter::RImplSimple Struct Reference

Definition at line 149 of file RMiniFile.hxx.

Classes

struct  RSharedData
 Data that is shared between a "main" RImplSimple and all its clones. More...
 

Public Member Functions

 RImplSimple ()
 
 RImplSimple (const RImplSimple &other)=delete
 
 RImplSimple (RImplSimple &&other)=delete
 
void AllocateBuffers (std::size_t bufferSize)
 
void Flush ()
 
 operator bool () const
 
RImplSimpleoperator= (const RImplSimple &other)=delete
 
RImplSimpleoperator= (RImplSimple &&other)=delete
 
std::uint64_t ReserveBlobKey (std::size_t nbytes, std::size_t len, unsigned char keyBuffer[kBlobKeyLen]=nullptr)
 Reserves an RBlob opaque key as data record and returns the offset of the record.
 
void Write (const void *buffer, size_t nbytes, std::int64_t offset=-1)
 Writes bytes in the open stream, either at fFilePos or at the given offset.
 
std::uint64_t WriteKey (const void *buffer, std::size_t nbytes, std::size_t len, std::int64_t offset=-1, std::uint64_t directoryOffset=100, const std::string &className="", const std::string &objectName="", const std::string &title="")
 Writes a TKey including the data record, given by buffer, into fFile; returns the file offset to the payload.
 

Public Attributes

std::shared_ptr< RSharedDatafShared
 

Static Public Attributes

static constexpr int kBlockAlign = 4096
 Direct I/O requires that all buffers and write lengths are aligned.
 
static constexpr std::size_t kHeaderBlockSize = 4096
 During commit, WriteTFileKeysList() updates fNBytesKeys and fSeekKeys of the RTFFile located at fSeekFileRecord.
 

Constructor & Destructor Documentation

◆ RImplSimple() [1/3]

ROOT::Internal::RNTupleFileWriter::RImplSimple::RImplSimple ( )
default

◆ RImplSimple() [2/3]

ROOT::Internal::RNTupleFileWriter::RImplSimple::RImplSimple ( const RImplSimple & other)
delete

◆ RImplSimple() [3/3]

ROOT::Internal::RNTupleFileWriter::RImplSimple::RImplSimple ( RImplSimple && other)
delete

Member Function Documentation

◆ AllocateBuffers()

void ROOT::Internal::RNTupleFileWriter::RImplSimple::AllocateBuffers ( std::size_t bufferSize)

Definition at line 982 of file RMiniFile.cxx.

◆ Flush()

void ROOT::Internal::RNTupleFileWriter::RImplSimple::Flush ( )

Definition at line 1027 of file RMiniFile.cxx.

◆ operator bool()

ROOT::Internal::RNTupleFileWriter::RImplSimple::operator bool ( ) const
inline

Definition at line 206 of file RMiniFile.hxx.

◆ operator=() [1/2]

RImplSimple & ROOT::Internal::RNTupleFileWriter::RImplSimple::operator= ( const RImplSimple & other)
delete

◆ operator=() [2/2]

RImplSimple & ROOT::Internal::RNTupleFileWriter::RImplSimple::operator= ( RImplSimple && other)
delete

◆ ReserveBlobKey()

std::uint64_t ROOT::Internal::RNTupleFileWriter::RImplSimple::ReserveBlobKey ( std::size_t nbytes,
std::size_t len,
unsigned char keyBuffer[kBlobKeyLen] = nullptr )

Reserves an RBlob opaque key as data record and returns the offset of the record.

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 1151 of file RMiniFile.cxx.

◆ Write()

void ROOT::Internal::RNTupleFileWriter::RImplSimple::Write ( const void * buffer,
size_t nbytes,
std::int64_t offset = -1 )

Writes bytes in the open stream, either at fFilePos or at the given offset.

Definition at line 1073 of file RMiniFile.cxx.

◆ WriteKey()

std::uint64_t ROOT::Internal::RNTupleFileWriter::RImplSimple::WriteKey ( const void * buffer,
std::size_t nbytes,
std::size_t len,
std::int64_t offset = -1,
std::uint64_t directoryOffset = 100,
const std::string & className = "",
const std::string & objectName = "",
const std::string & title = "" )

Writes a TKey including the data record, given by buffer, into fFile; returns the file offset to the payload.

The payload is already compressed

Definition at line 1124 of file RMiniFile.cxx.

Member Data Documentation

◆ fShared

std::shared_ptr<RSharedData> ROOT::Internal::RNTupleFileWriter::RImplSimple::fShared

Definition at line 184 of file RMiniFile.hxx.

◆ kBlockAlign

constexpr int ROOT::Internal::RNTupleFileWriter::RImplSimple::kBlockAlign = 4096
staticconstexpr

Direct I/O requires that all buffers and write lengths are aligned.

It seems 512 byte alignment is the minimum for Direct I/O to work, but further testing showed that it results in worse performance than 4kB.

Definition at line 152 of file RMiniFile.hxx.

◆ kHeaderBlockSize

constexpr std::size_t ROOT::Internal::RNTupleFileWriter::RImplSimple::kHeaderBlockSize = 4096
staticconstexpr

During commit, WriteTFileKeysList() updates fNBytesKeys and fSeekKeys of the RTFFile located at fSeekFileRecord.

Given that the TFile key starts at offset 100 and the file name, which is written twice, is shorter than 255 characters, we should need at most ~600 bytes. However, the header also needs to be aligned to kBlockAlign...

Definition at line 157 of file RMiniFile.hxx.

Collaboration diagram for ROOT::Internal::RNTupleFileWriter::RImplSimple:
[legend]

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