24 fieldContext.ResetConcreteField();
34 auto desc = fPageSource->GetSharedDescriptorGuard();
36 for (
auto &fieldContext : fFieldContexts) {
37 auto fieldId = desc->FindFieldId(fieldContext.GetProtoField().GetFieldName());
40 R__FAIL(
"field \"" + fieldContext.GetProtoField().GetFieldName() +
"\" not found in current RNTuple"));
43 fieldContext.SetConcreteField();
44 fieldContext.fConcreteField->SetOnDiskId(desc->FindFieldId(fieldContext.GetProtoField().GetFieldName()));
47 auto valuePtr = fEntry->GetPtr<
void>(fieldContext.fToken);
48 auto value = fieldContext.fConcreteField->CreateValue();
50 fEntry->UpdateValue(fieldContext.fToken,
value);
55 std::unique_ptr<RNTupleModel> model)
69 model =
fPageSource->GetSharedDescriptorGuard()->CreateModel();
72 fEntry = model->CreateEntry();
75 auto &field =
value.GetField();
76 auto token =
fEntry->GetToken(field.GetFieldName());
81 if (!model->IsBare()) {
82 auto valuePtr = model->GetDefaultEntry().GetPtr<
void>(token);
83 fEntry->BindValue(token, valuePtr);
86 fFieldContexts.emplace_back(field.Clone(field.GetFieldName()), token);
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
std::unique_ptr< REntry > fEntry
RNTupleProcessor(const std::vector< RNTupleSourceSpec > &ntuples, std::unique_ptr< RNTupleModel > model=nullptr)
Constructs a new RNTupleProcessor.
std::unique_ptr< Internal::RPageSource > fPageSource
NTupleSize_t ConnectNTuple(const RNTupleSourceSpec &ntuple)
Connect an RNTuple for processing.
void ConnectFields()
Creates and connects concrete fields to the current page source, based on the proto-fields.
std::vector< RFieldContext > fFieldContexts
std::vector< RNTupleSourceSpec > fNTuples
static std::unique_ptr< RPageSource > Create(std::string_view ntupleName, std::string_view location, const RNTupleReadOptions &options=RNTupleReadOptions())
Guess the concrete derived page source from the file name (location)
Base class for all ROOT issued exceptions.
void CallConnectPageSourceOnField(RFieldBase &, RPageSource &)
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId
Helper type representing the name and storage location of an RNTuple.