15#ifndef ROOT_RNTupleProcessorEntry
16#define ROOT_RNTupleProcessorEntry
24#include <unordered_map>
145 if (index == fieldIdx) {
151 static const std::string empty =
"";
208 value.Bind(currValuePtr);
245 template <
typename T>
294 std::generate_n(std::inserter(fieldIdxs, fieldIdxs.begin()),
fProcessorValues.size(),
295 [i = 0]()
mutable { return i++; });
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Collection of values in an RNTupleProcessor, analogous to REntry, with checks and support for missing...
FieldIndex_t AddField(std::string_view fieldName, ROOT::RFieldBase &field, void *valuePtr, const RNTupleProcessorProvenance &provenance)
Add a new field to the entry.
std::unordered_set< FieldIndex_t > GetFieldIndices() const
Get all field indices of this entry.
std::uint64_t FieldIndex_t
std::vector< RProcessorValue > fProcessorValues
std::string GetFieldName(FieldIndex_t fieldIdx) const
Get the name of a field in the entry, including processor name prefixes in the case of auxiliary fiel...
void BindRawPtr(FieldIndex_t fieldIdx, void *valuePtr)
Bind a new value pointer to a field in the entry.
void UpdateField(FieldIndex_t fieldIdx, ROOT::RFieldBase &field)
Update a field in the entry, preserving the value pointer.
const ROOT::RFieldBase & GetField(FieldIndex_t fieldIdx) const
Get a reference to a field in the entry.
std::optional< FieldIndex_t > FindFieldIndex(std::string_view fieldName) const
Find the field index of the provided field in the entry.
bool IsValidField(FieldIndex_t fieldIdx) const
Check whether a field is valid for reading.
const std::string & FindFieldName(FieldIndex_t fieldIdx) const
Find the name of a field from its field index.
std::unordered_map< std::string, FieldIndex_t > fFieldName2Index
void ReadValue(FieldIndex_t fieldIdx, ROOT::NTupleSize_t entryIdx)
Read the field value corresponding to the given field index for the provided entry index.
void SetFieldValidity(FieldIndex_t fieldIdx, bool isValid)
Set the validity of a field, i.e.
const RNTupleProcessorProvenance & GetFieldProvenance(FieldIndex_t fieldIdx) const
Get the processor provenance of a field in the entry.
std::shared_ptr< T > GetPtr(FieldIndex_t fieldIdx) const
Get a pointer to the value for the field represented by the provided field index.
std::string Get() const
Get the full processor provenance, in the form of "x.y.z".
RNTupleProcessorProvenance(const std::string &provenance)
RNTupleProcessorProvenance()=default
bool Contains(const RNTupleProcessorProvenance &other) const
Check whether the provenance subsumes the provenance in other.
bool IsPresentInFieldName(std::string_view fieldName) const
Check whether the provided field name contains this provenance.
RNTupleProcessorProvenance Evolve(const std::string &processorName) const
Add a new processor to the provenance.
Base class for all ROOT issued exceptions.
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
void BindRawPtr(void *rawPtr)
A field translates read and write calls from/to underlying columns to/from tree values.
RValue CreateValue()
Generates an object of the field's type, wraps it in a shared pointer and returns it as an RValue con...
std::string GetQualifiedFieldName() const
Returns the field name and parent field names separated by dots (grandparent.parent....
Namespace for ROOT features in testing.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
RNTupleProcessorProvenance fProcessorProvenance
RProcessorValue(ROOT::RFieldBase::RValue &&value, bool isValid, RNTupleProcessorProvenance provenance)
ROOT::RFieldBase::RValue fValue