48 fUnzipTasks = std::make_unique<Experimental::Internal::RNTupleImtTaskScheduler>();
49 fSource->SetTaskScheduler(fUnzipTasks.get());
52 fMetrics.ObserveMetrics(fSource->GetMetrics());
56 fNEntries = fSource->GetNEntries();
60 std::unique_ptr<ROOT::Internal::RPageSource>
source,
62 : fSource(std::
move(
source)), fModel(std::
move(model)), fMetrics(
"RNTupleReader")
67 throw RException(
R__FAIL(
"model has projected fields, which is incompatible with providing a read model"));
76 : fSource(std::
move(
source)), fModel(nullptr), fMetrics(
"RNTupleReader")
87 return std::unique_ptr<RNTupleReader>(
94 return std::unique_ptr<RNTupleReader>(
98std::unique_ptr<ROOT::RNTupleReader>
101 return std::unique_ptr<RNTupleReader>(
109 return std::unique_ptr<RNTupleReader>(
113std::unique_ptr<ROOT::RNTupleReader>
118 auto reader = std::unique_ptr<RNTupleReader>(
124std::unique_ptr<ROOT::RNTupleReader>
128 auto reader = std::unique_ptr<RNTupleReader>(
137 fModel = fSource->GetSharedDescriptorGuard()->CreateModel(
139 ConnectModel(*fModel);
146 return GetModel().CreateEntry();
166 std::unique_ptr<ROOT::RNTupleModel>
fullModel;
171 opts.SetCreateBare(
true);
174 opts.SetEmulateUnknownTypes(
true);
178 for (
int i = 0; i < (
width / 2 +
width % 2 - 4); ++i)
181 for (
int i = 0; i < (
width / 2 - 4); ++i)
203 for (
int i = 0; i <
width; ++i)
207 for (
int i = 0; i <
width; ++i)
222 if (!fDisplayReader) {
224 opts.SetEmulateUnknownTypes(
true);
225 auto fullModel = fSource->GetSharedDescriptorGuard()->CreateModel(
opts);
226 fDisplayReader = std::unique_ptr<RNTupleReader>(
229 return fDisplayReader.get();
234 auto reader = GetDisplayReader();
235 const auto &
entry =
reader->GetModel().GetDefaultEntry();
251 output <<
"}" << std::endl;
257 if (!fCachedDescriptor || fCachedDescriptor->GetGeneration() !=
descriptorGuard->GetGeneration())
259 return *fCachedDescriptor;
267 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)
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 RNTuple.
Common user-tunable settings for reading RNTuples.
bool GetEnableMetrics() const
Reads RNTuple data from storage.
std::unique_ptr< ROOT::REntry > CreateEntry()
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)
std::unique_ptr< ROOT::RNTupleModel > fModel
Needs to be destructed before fSource.
const ROOT::RNTupleDescriptor & GetDescriptor()
Returns a cached copy of the page source descriptor.
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< Internal::RPageSource > fSource
RNTupleReader(std::unique_ptr< ROOT::RNTupleModel > model, std::unique_ptr< Internal::RPageSource > source, const ROOT::RNTupleReadOptions &options)
const ROOT::RNTupleModel & GetModel()
void ConnectModel(ROOT::RNTupleModel &model)
ROOT::DescriptorId_t RetrieveFieldId(std::string_view fieldName) const
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.
RNTupleReader * GetDisplayReader()
Representation of an RNTuple data set in a ROOT file.
const_iterator begin() const
const_iterator end() const
ROOT::RFieldZero & GetFieldZeroOfModel(RNTupleModel &model)
void CallConnectPageSourceOnField(RFieldBase &, ROOT::Internal::RPageSource &)
RProjectedFields & GetProjectedFieldsOfModel(RNTupleModel &model)
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.
ENTupleInfo
Listing of the different options that can be printed by RNTupleReader::GetInfo()
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()