50 fUnzipTasks = std::make_unique<Internal::RNTupleImtTaskScheduler>();
51 fSource->SetTaskScheduler(fUnzipTasks.get());
54 fMetrics.ObserveMetrics(fSource->GetMetrics());
61 std::unique_ptr<ROOT::Experimental::Internal::RPageSource>
source,
63 : fSource(std::
move(
source)), fModel(std::
move(model)), fMetrics(
"RNTupleReader")
68 throw RException(
R__FAIL(
"model has projected fields, which is incompatible with providing a read model"));
77 : fSource(std::
move(
source)), fModel(nullptr), fMetrics(
"RNTupleReader")
84std::unique_ptr<ROOT::Experimental::RNTupleReader>
88 return std::unique_ptr<RNTupleReader>(
92std::unique_ptr<ROOT::Experimental::RNTupleReader>
96 return std::unique_ptr<RNTupleReader>(
100std::unique_ptr<ROOT::Experimental::RNTupleReader>
103 return std::unique_ptr<RNTupleReader>(
107std::unique_ptr<ROOT::Experimental::RNTupleReader>
111 return std::unique_ptr<RNTupleReader>(
115std::unique_ptr<ROOT::Experimental::RNTupleReader>
120 auto reader = std::unique_ptr<RNTupleReader>(
126std::unique_ptr<ROOT::Experimental::RNTupleReader>
130 auto reader = std::unique_ptr<RNTupleReader>(
139 fModel = fSource->GetSharedDescriptorGuard()->CreateModel(
141 ConnectModel(*fModel);
148 return GetModel().CreateEntry();
168 std::unique_ptr<ROOT::RNTupleModel>
fullModel;
173 opts.SetCreateBare(
true);
176 opts.SetEmulateUnknownTypes(
true);
180 for (
int i = 0; i < (
width / 2 +
width % 2 - 4); ++i)
183 for (
int i = 0; i < (
width / 2 - 4); ++i)
205 for (
int i = 0; i <
width; ++i)
209 for (
int i = 0; i <
width; ++i)
225 fDisplayReader = Clone();
226 return fDisplayReader.get();
231 auto reader = GetDisplayReader();
232 const auto &
entry =
reader->GetModel().GetDefaultEntry();
248 output <<
"}" << std::endl;
254 if (!fCachedDescriptor || fCachedDescriptor->GetGeneration() !=
descriptorGuard->GetGeneration())
256 return *fCachedDescriptor;
264 fSource->GetSharedDescriptorGuard()->GetName() +
"'"));
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
static std::unique_ptr< RPageSourceFile > CreateFromAnchor(const RNTuple &anchor, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Used from the RNTuple class to build a datasource if the anchor is already available.
static std::unique_ptr< RPageSource > Create(std::string_view ntupleName, std::string_view location, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Guess the concrete derived page source from the file name (location)
Reads RNTuple data from storage.
RNTupleReader(std::unique_ptr< ROOT::RNTupleModel > model, std::unique_ptr< Internal::RPageSource > source, const ROOT::RNTupleReadOptions &options)
ROOT::DescriptorId_t RetrieveFieldId(std::string_view fieldName) const
RNTupleReader * GetDisplayReader()
const ROOT::RNTupleModel & GetModel()
const ROOT::RNTupleDescriptor & GetDescriptor()
Returns a cached copy of the page source descriptor.
std::unique_ptr< Internal::RPageSource > fSource
std::unique_ptr< ROOT::RNTupleModel > fModel
Needs to be destructed before fSource.
static std::unique_ptr< RNTupleReader > Open(std::string_view ntupleName, std::string_view storage, const ROOT::RNTupleReadOptions &options=ROOT::RNTupleReadOptions())
Open an RNTuple for reading.
void InitPageSource(bool enableMetrics)
void PrintInfo(const ENTupleInfo what=ENTupleInfo::kSummary, std::ostream &output=std::cout) const
Prints a detailed summary of the RNTuple, including a list of fields.
std::unique_ptr< ROOT::REntry > CreateEntry()
void Show(ROOT::NTupleSize_t index, std::ostream &output=std::cout)
Shows the values of the i-th entry/row, starting with 0 for the first entry.
void ConnectModel(ROOT::RNTupleModel &model)
Visitor used for a pre-processing run to collect information needed by another visitor class.
Contains settings for printing and prints a summary of an RField instance.
Renders a JSON value corresponding to the field.
Base class for all ROOT issued exceptions.
The on-storage metadata of an RNTuple.
The RNTupleModel encapulates the schema of an ntuple.
Common user-tunable settings for reading RNTuples.
bool GetEnableMetrics() const
Representation of an RNTuple data set in a ROOT file.
const_iterator begin() const
const_iterator end() const
ENTupleInfo
Listing of the different options that can be printed by RNTupleReader::GetInfo()
ROOT::RFieldZero & GetFieldZeroOfModel(RNTupleModel &model)
RProjectedFields & GetProjectedFieldsOfModel(RNTupleModel &model)
void CallConnectPageSourceOnField(RFieldBase &, ROOT::Experimental::Internal::RPageSource &)
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId
Modifiers passed to CreateModel()