An RNTuple that is used to read data from storage.
An input ntuple provides data from storage as C++ objects. The ntuple model can be created from the data on storage or it can be imposed by the user. The latter case allows users to read into a specialized ntuple model that covers only a subset of the fields in the ntuple. The ntuple model is used when reading complete entries. Individual fields can be read as well by instantiating a tree view.
Definition at line 100 of file RNTuple.hxx.
Classes | |
class | RIterator |
Public Member Functions | |
RNTupleReader (std::unique_ptr< Detail::RPageSource > source) | |
The model is generated from the ntuple metadata on storage. More... | |
RNTupleReader (std::unique_ptr< RNTupleModel > model, std::unique_ptr< Detail::RPageSource > source) | |
The user imposes an ntuple model, which must be compatible with the model found in the data on storage. More... | |
~RNTupleReader () | |
RIterator | begin () |
std::unique_ptr< RNTupleReader > | Clone () |
void | EnableMetrics () |
RIterator | end () |
const RNTupleDescriptor & | GetDescriptor () const |
NTupleSize_t | GetNEntries () const |
template<typename T > | |
RNTupleView< T > | GetView (std::string_view fieldName) |
Provides access to an individual field that can contain either a scalar value or a collection, e.g. More... | |
RNTupleViewCollection | GetViewCollection (std::string_view fieldName) |
RNTupleGlobalRange | GetViewRange () |
void | LoadEntry (NTupleSize_t index) |
Analogous to Fill(), fills the default entry of the model. More... | |
void | LoadEntry (NTupleSize_t index, REntry *entry) |
Fills a user provided entry after checking that the entry has been instantiated from the ntuple model. More... | |
void | PrintInfo (const ENTupleInfo what=ENTupleInfo::kSummary, std::ostream &output=std::cout) |
Prints a detailed summary of the ntuple, including a list of fields. More... | |
Public Member Functions inherited from ROOT::Experimental::Detail::RNTuple | |
RNTuple (const RNTuple &)=delete | |
~RNTuple () | |
RNTupleModel * | GetModel () |
RNTuple & | operator= (const RNTuple &)=delete |
Static Public Member Functions | |
static std::unique_ptr< RNTupleReader > | Open (std::string_view ntupleName, std::string_view storage) |
static std::unique_ptr< RNTupleReader > | Open (std::unique_ptr< RNTupleModel > model, std::string_view ntupleName, std::string_view storage) |
Private Member Functions | |
void | ConnectModel () |
Private Attributes | |
Detail::RNTupleMetrics | fMetrics |
std::unique_ptr< Detail::RPageSource > | fSource |
Additional Inherited Members | |
Protected Member Functions inherited from ROOT::Experimental::Detail::RNTuple | |
RNTuple (std::unique_ptr< RNTupleModel > model) | |
Only the derived RNTupleReader and RNTupleWriter can be instantiated. More... | |
Protected Attributes inherited from ROOT::Experimental::Detail::RNTuple | |
std::unique_ptr< RNTupleModel > | fModel |
NTupleSize_t | fNEntries |
The number of entries is constant for reading and reflects the sum of Fill() operations when writing. More... | |
#include <ROOT/RNTuple.hxx>
ROOT::Experimental::RNTupleReader::RNTupleReader | ( | std::unique_ptr< RNTupleModel > | model, |
std::unique_ptr< Detail::RPageSource > | source | ||
) |
The user imposes an ntuple model, which must be compatible with the model found in the data on storage.
Definition at line 58 of file RNTuple.cxx.
|
explicit |
The model is generated from the ntuple metadata on storage.
Definition at line 71 of file RNTuple.cxx.
ROOT::Experimental::RNTupleReader::~RNTupleReader | ( | ) |
Definition at line 83 of file RNTuple.cxx.
|
inline |
Definition at line 170 of file RNTuple.hxx.
|
inline |
Definition at line 136 of file RNTuple.hxx.
|
private |
Definition at line 46 of file RNTuple.cxx.
|
inline |
Definition at line 173 of file RNTuple.hxx.
|
inline |
Definition at line 171 of file RNTuple.hxx.
|
inline |
Definition at line 140 of file RNTuple.hxx.
|
inline |
Definition at line 139 of file RNTuple.hxx.
|
inline |
Provides access to an individual field that can contain either a scalar value or a collection, e.g.
GetView<double>("particles.pt") or GetView<std::vector<double>>("particle"). It can as well be the index field of a collection itself, like GetView<NTupleSize_t>("particle")
Definition at line 161 of file RNTuple.hxx.
|
inline |
Definition at line 165 of file RNTuple.hxx.
|
inline |
Definition at line 155 of file RNTuple.hxx.
|
inline |
Analogous to Fill(), fills the default entry of the model.
Returns false at the end of the ntuple. On I/O errors, raises an expection.
Definition at line 147 of file RNTuple.hxx.
|
inline |
Fills a user provided entry after checking that the entry has been instantiated from the ntuple model.
Definition at line 149 of file RNTuple.hxx.
|
static |
Definition at line 97 of file RNTuple.cxx.
|
static |
Definition at line 89 of file RNTuple.cxx.
void ROOT::Experimental::RNTupleReader::PrintInfo | ( | const ENTupleInfo | what = ENTupleInfo::kSummary , |
std::ostream & | output = std::cout |
||
) |
Prints a detailed summary of the ntuple, including a list of fields.
Definition at line 104 of file RNTuple.cxx.
|
private |
Definition at line 103 of file RNTuple.hxx.
|
private |
Definition at line 102 of file RNTuple.hxx.