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

Representation of an RNTuple data set in a ROOT file.

This class 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);
or
auto pageSource = ntpl->MakePageSource();
#define f(i)
Definition RSha256.hxx:104
static std::unique_ptr< RNTupleReader > Open(std::unique_ptr< RNTupleModel > model, std::string_view ntupleName, std::string_view storage, const RNTupleReadOptions &options=RNTupleReadOptions())
Throws an exception if the model is null.
Definition RNTuple.cxx:124
Representation of an RNTuple data set in a ROOT file.
Definition RNTuple.hxx:512
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:4075

Definition at line 512 of file RNTuple.hxx.

Public Member Functions

 RNTuple ()=default
 
 ~RNTuple ()=default
 
TClassIsA () const
 
std::unique_ptr< Detail::RPageSourceMakePageSource (const RNTupleReadOptions &options=RNTupleReadOptions())
 Create a page source from the RNTuple object.
 
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 ()
 

Private Member Functions

 RNTuple (const Internal::RFileNTupleAnchor &a)
 
Internal::RFileNTupleAnchor GetAnchor () const
 

Private Attributes

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

Friends

class ROOT::Experimental::Internal::RNTupleFileWriter
 
struct ROOT::Experimental::Internal::RNTupleTester
 

Additional Inherited Members

- Protected Attributes inherited from ROOT::Experimental::Internal::RFileNTupleAnchor
std::int32_t fChecksum = 0
 The ROOT streamer info checksum.
 
std::uint32_t fLenFooter = 0
 The size of the uncompressed ntuple footer.
 
std::uint32_t fLenHeader = 0
 The size of the uncompressed ntuple header.
 
std::uint32_t fNBytesFooter = 0
 The size of the compressed ntuple footer.
 
std::uint32_t fNBytesHeader = 0
 The size of the compressed ntuple header.
 
std::uint64_t fReserved = 0
 Currently unused, reserved for later use.
 
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::uint32_t fSize = sizeof(RFileNTupleAnchor)
 Allows for skipping the struct.
 
std::uint32_t fVersion = 0
 Allows for evolving the struct in future versions.
 

#include <ROOT/RNTuple.hxx>

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

Constructor & Destructor Documentation

◆ RNTuple() [1/2]

ROOT::Experimental::RNTuple::RNTuple ( const Internal::RFileNTupleAnchor a)
inlineexplicitprivate

Definition at line 522 of file RNTuple.hxx.

◆ RNTuple() [2/2]

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

◆ GetAnchor()

Internal::RFileNTupleAnchor ROOT::Experimental::RNTuple::GetAnchor ( ) const
inlineprivate

Definition at line 523 of file RNTuple.hxx.

◆ IsA()

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

Definition at line 538 of file RNTuple.hxx.

◆ MakePageSource()

std::unique_ptr< ROOT::Experimental::Detail::RPageSource > ROOT::Experimental::RNTuple::MakePageSource ( const RNTupleReadOptions options = RNTupleReadOptions())

Create a page source from the RNTuple object.

Requires the RNTuple object to be streamed from a file. If fFile is not set, an exception is thrown.

Definition at line 383 of file RNTuple.cxx.

◆ 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 22 of file RNTupleMerger.cxx.

◆ Streamer()

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

Definition at line 369 of file RNTuple.cxx.

◆ StreamerNVirtual()

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

Definition at line 538 of file RNTuple.hxx.

Friends And Related Symbol Documentation

◆ ROOT::Experimental::Internal::RNTupleFileWriter

Definition at line 513 of file RNTuple.hxx.

◆ ROOT::Experimental::Internal::RNTupleTester

friend struct ROOT::Experimental::Internal::RNTupleTester
friend

Definition at line 514 of file RNTuple.hxx.

Member Data Documentation

◆ fFile

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

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

Definition at line 519 of file RNTuple.hxx.

Libraries for ROOT::Experimental::RNTuple:

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