Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RNTuple Class Referencefinal

Representation of an RNTuple data set in a ROOT file.

The class points to the header and footer keys, which in turn have the references to the pages (via page lists). Only the RNTuple key will be listed in the list of keys. Like TBaskets, the pages are "invisible" keys. Byte offset references in the RNTuple header and footer reference directly the data part of page records, skipping the TFile key part.

In the list of keys, this object appears as "ROOT::Experimental::RNTuple". It is the user-facing representation of an RNTuple data set in a ROOT file and it provides an API entry point to an RNTuple stored in a ROOT file. Its main purpose is to construct a page source for an RNTuple, which in turn can be used to read an RNTuple with an RDF or an RNTupleReader.

For instance, for an RNTuple called "Events" in a ROOT file, usage can be

auto f = TFile::Open("data.root");
auto ntpl = f->Get<ROOT::Experimental::RNTuple>("Events");
auto reader = RNTupleReader::Open(ntpl);
#define f(i)
Definition RSha256.hxx:104
static std::unique_ptr< RNTupleReader > Open(std::string_view ntupleName, std::string_view storage, const RNTupleReadOptions &options=RNTupleReadOptions())
Open an RNTuple for reading.
Representation of an RNTuple data set in a ROOT file.
Definition RNTuple.hxx:61
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:4082

Definition at line 61 of file RNTuple.hxx.

Public Member Functions

 RNTuple ()=default
 
 ~RNTuple ()=default
 
std::uint64_t GetChecksum () const
 
std::uint64_t GetLenFooter () const
 
std::uint64_t GetLenHeader () const
 
std::uint64_t GetNBytesFooter () const
 
std::uint64_t GetNBytesHeader () const
 
std::uint64_t GetSeekFooter () const
 
std::uint64_t GetSeekHeader () const
 
std::uint16_t GetVersionEpoch () const
 
std::uint16_t GetVersionMajor () const
 
std::uint16_t GetVersionMinor () const
 
std::uint16_t GetVersionPatch () const
 
TClassIsA () const
 
Long64_t Merge (TCollection *input, TFileMergeInfo *mergeInfo)
 RNTuple implements the hadd MergeFile interface Merge this NTuple with the input list entries.
 
void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Static Public Attributes

static constexpr std::uint16_t kVersionEpoch = 0
 
static constexpr std::uint16_t kVersionMajor = 2
 
static constexpr std::uint16_t kVersionMinor = 0
 
static constexpr std::uint16_t kVersionPatch = 0
 

Private Attributes

std::uint64_t fChecksum = 0
 The xxhash3 checksum of the serialized other members of the struct (excluding byte count and class version).
 
TFilefFile = nullptr
 ! The file from which the ntuple was streamed, registered in the custom streamer
 
std::uint64_t fLenFooter = 0
 The size of the uncompressed ntuple footer.
 
std::uint64_t fLenHeader = 0
 The size of the uncompressed ntuple header.
 
std::uint64_t fNBytesFooter = 0
 The size of the compressed ntuple footer.
 
std::uint64_t fNBytesHeader = 0
 The size of the compressed ntuple header.
 
std::uint64_t fSeekFooter = 0
 The file offset of the footer excluding the TKey part.
 
std::uint64_t fSeekHeader = 0
 The file offset of the header excluding the TKey part.
 
std::uint16_t fVersionEpoch = kVersionEpoch
 Version of the RNTuple binary format that the writer supports (see specification).
 
std::uint16_t fVersionMajor = kVersionMajor
 Changing the major version indicates forward incompatible changes; such changes should correspond to a new bit in the feature flag of the RNTuple header.
 
std::uint16_t fVersionMinor = kVersionMinor
 Changing the minor version indicates new optional fields added to the RNTuple meta-data.
 
std::uint16_t fVersionPatch = kVersionPatch
 Changing the patch version indicates new backported features from newer binary format versions.
 

Friends

class Internal::RMiniFileReader
 
class Internal::RNTupleFileWriter
 
class Internal::RPageSourceFile
 

#include <ROOT/RNTuple.hxx>

Constructor & Destructor Documentation

◆ RNTuple()

ROOT::Experimental::RNTuple::RNTuple ( )
default

◆ ~RNTuple()

ROOT::Experimental::RNTuple::~RNTuple ( )
default

Member Function Documentation

◆ Class()

static TClass * ROOT::Experimental::RNTuple::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * ROOT::Experimental::RNTuple::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t ROOT::Experimental::RNTuple::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 126 of file RNTuple.hxx.

◆ DeclFileName()

static const char * ROOT::Experimental::RNTuple::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 126 of file RNTuple.hxx.

◆ GetChecksum()

std::uint64_t ROOT::Experimental::RNTuple::GetChecksum ( ) const
inline

Definition at line 120 of file RNTuple.hxx.

◆ GetLenFooter()

std::uint64_t ROOT::Experimental::RNTuple::GetLenFooter ( ) const
inline

Definition at line 118 of file RNTuple.hxx.

◆ GetLenHeader()

std::uint64_t ROOT::Experimental::RNTuple::GetLenHeader ( ) const
inline

Definition at line 114 of file RNTuple.hxx.

◆ GetNBytesFooter()

std::uint64_t ROOT::Experimental::RNTuple::GetNBytesFooter ( ) const
inline

Definition at line 117 of file RNTuple.hxx.

◆ GetNBytesHeader()

std::uint64_t ROOT::Experimental::RNTuple::GetNBytesHeader ( ) const
inline

Definition at line 113 of file RNTuple.hxx.

◆ GetSeekFooter()

std::uint64_t ROOT::Experimental::RNTuple::GetSeekFooter ( ) const
inline

Definition at line 116 of file RNTuple.hxx.

◆ GetSeekHeader()

std::uint64_t ROOT::Experimental::RNTuple::GetSeekHeader ( ) const
inline

Definition at line 112 of file RNTuple.hxx.

◆ GetVersionEpoch()

std::uint16_t ROOT::Experimental::RNTuple::GetVersionEpoch ( ) const
inline

Definition at line 107 of file RNTuple.hxx.

◆ GetVersionMajor()

std::uint16_t ROOT::Experimental::RNTuple::GetVersionMajor ( ) const
inline

Definition at line 108 of file RNTuple.hxx.

◆ GetVersionMinor()

std::uint16_t ROOT::Experimental::RNTuple::GetVersionMinor ( ) const
inline

Definition at line 109 of file RNTuple.hxx.

◆ GetVersionPatch()

std::uint16_t ROOT::Experimental::RNTuple::GetVersionPatch ( ) const
inline

Definition at line 110 of file RNTuple.hxx.

◆ IsA()

TClass * ROOT::Experimental::RNTuple::IsA ( ) const
inline
Returns
TClass describing current object

Definition at line 126 of file RNTuple.hxx.

◆ Merge()

Long64_t ROOT::Experimental::RNTuple::Merge ( TCollection input,
TFileMergeInfo mergeInfo 
)

RNTuple implements the hadd MergeFile interface Merge this NTuple with the input list entries.

Definition at line 29 of file RNTupleMerger.cxx.

◆ Streamer()

void ROOT::Experimental::RNTuple::Streamer ( TBuffer buf)

Definition at line 27 of file RNTuple.cxx.

◆ StreamerNVirtual()

void ROOT::Experimental::RNTuple::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 126 of file RNTuple.hxx.

Friends And Related Symbol Documentation

◆ Internal::RMiniFileReader

friend class Internal::RMiniFileReader
friend

Definition at line 62 of file RNTuple.hxx.

◆ Internal::RNTupleFileWriter

friend class Internal::RNTupleFileWriter
friend

Definition at line 63 of file RNTuple.hxx.

◆ Internal::RPageSourceFile

friend class Internal::RPageSourceFile
friend

Definition at line 64 of file RNTuple.hxx.

Member Data Documentation

◆ fChecksum

std::uint64_t ROOT::Experimental::RNTuple::fChecksum = 0
private

The xxhash3 checksum of the serialized other members of the struct (excluding byte count and class version).

This member can only be interpreted during streaming. When adding new members to the class, this member must remain the last one.

Definition at line 99 of file RNTuple.hxx.

◆ fFile

TFile* ROOT::Experimental::RNTuple::fFile = nullptr
private

! The file from which the ntuple was streamed, registered in the custom streamer

Definition at line 101 of file RNTuple.hxx.

◆ fLenFooter

std::uint64_t ROOT::Experimental::RNTuple::fLenFooter = 0
private

The size of the uncompressed ntuple footer.

Definition at line 95 of file RNTuple.hxx.

◆ fLenHeader

std::uint64_t ROOT::Experimental::RNTuple::fLenHeader = 0
private

The size of the uncompressed ntuple header.

Definition at line 89 of file RNTuple.hxx.

◆ fNBytesFooter

std::uint64_t ROOT::Experimental::RNTuple::fNBytesFooter = 0
private

The size of the compressed ntuple footer.

Definition at line 93 of file RNTuple.hxx.

◆ fNBytesHeader

std::uint64_t ROOT::Experimental::RNTuple::fNBytesHeader = 0
private

The size of the compressed ntuple header.

Definition at line 87 of file RNTuple.hxx.

◆ fSeekFooter

std::uint64_t ROOT::Experimental::RNTuple::fSeekFooter = 0
private

The file offset of the footer excluding the TKey part.

Definition at line 91 of file RNTuple.hxx.

◆ fSeekHeader

std::uint64_t ROOT::Experimental::RNTuple::fSeekHeader = 0
private

The file offset of the header excluding the TKey part.

Definition at line 85 of file RNTuple.hxx.

◆ fVersionEpoch

std::uint16_t ROOT::Experimental::RNTuple::fVersionEpoch = kVersionEpoch
private

Version of the RNTuple binary format that the writer supports (see specification).

Changing the epoch indicates backward-incompatible changes

Definition at line 75 of file RNTuple.hxx.

◆ fVersionMajor

std::uint16_t ROOT::Experimental::RNTuple::fVersionMajor = kVersionMajor
private

Changing the major version indicates forward incompatible changes; such changes should correspond to a new bit in the feature flag of the RNTuple header.

For the pre-release epoch 0, indicates the release candidate number

Definition at line 79 of file RNTuple.hxx.

◆ fVersionMinor

std::uint16_t ROOT::Experimental::RNTuple::fVersionMinor = kVersionMinor
private

Changing the minor version indicates new optional fields added to the RNTuple meta-data.

Definition at line 81 of file RNTuple.hxx.

◆ fVersionPatch

std::uint16_t ROOT::Experimental::RNTuple::fVersionPatch = kVersionPatch
private

Changing the patch version indicates new backported features from newer binary format versions.

Definition at line 83 of file RNTuple.hxx.

◆ kVersionEpoch

constexpr std::uint16_t ROOT::Experimental::RNTuple::kVersionEpoch = 0
staticconstexpr

Definition at line 67 of file RNTuple.hxx.

◆ kVersionMajor

constexpr std::uint16_t ROOT::Experimental::RNTuple::kVersionMajor = 2
staticconstexpr

Definition at line 68 of file RNTuple.hxx.

◆ kVersionMinor

constexpr std::uint16_t ROOT::Experimental::RNTuple::kVersionMinor = 0
staticconstexpr

Definition at line 69 of file RNTuple.hxx.

◆ kVersionPatch

constexpr std::uint16_t ROOT::Experimental::RNTuple::kVersionPatch = 0
staticconstexpr

Definition at line 70 of file RNTuple.hxx.

Libraries for ROOT::Experimental::RNTuple:

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