31#include <unordered_map>
34namespace Experimental {
36class RNTupleProcessor;
37class RNTupleSingleProcessor;
38class RNTupleChainProcessor;
39class RNTupleJoinProcessor;
100 template <
typename T>
107 return value.template GetPtr<T>();
128 std::size_t bytesWritten = 0;
130 bytesWritten +=
v.Append();
139 "make sure to use a token from a model with the same schema as this entry."));
152 static const std::string empty =
"";
156 template <
typename T>
159 if constexpr (!std::is_void_v<T>) {
194 template <
typename T>
198 EnsureMatchingType<T>(token);
202 template <
typename T>
203 void BindValue(std::string_view fieldName, std::shared_ptr<T> objPtr)
205 BindValue<T>(
GetToken(fieldName), objPtr);
208 template <
typename T>
212 EnsureMatchingType<T>(token);
216 template <
typename T>
219 BindRawPtr<void>(
GetToken(fieldName), rawPtr);
222 template <
typename T>
226 EnsureMatchingType<T>(token);
227 return std::static_pointer_cast<T>(
fValues[token.
fIndex].GetPtr<
void>());
230 template <
typename T>
231 std::shared_ptr<T>
GetPtr(std::string_view fieldName)
const
233 return GetPtr<T>(
GetToken(fieldName));
#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 char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
The field token identifies a (sub)field in this entry.
std::size_t fIndex
The index in fValues that belongs to the field.
RFieldToken(std::size_t index, std::uint64_t schemaId)
std::uint64_t fSchemaId
Safety check to prevent tokens from other models being used.
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
void EnsureMatchingType(RFieldToken token) const
const std::string & GetTypeName(RFieldToken token) const
std::uint64_t fSchemaId
The entry and its tokens are also linked to a specific schema, identified by a schema ID.
std::uint64_t fModelId
The entry must be linked to a specific model, identified by a model ID.
void BindValue(RFieldToken token, std::shared_ptr< T > objPtr)
REntry & operator=(REntry &&other)=default
std::uint64_t GetSchemaId() const
decltype(fValues)::const_iterator ConstIterator_t
std::vector< std::string > fFieldTypes
To ensure that the entry is standalone, a copy of all field types.
void Read(NTupleSize_t index)
ConstIterator_t begin() const
REntry & operator=(const REntry &other)=delete
const std::string & GetTypeName(std::string_view fieldName) const
void EmplaceNewValue(std::string_view fieldName)
REntry(REntry &&other)=default
std::uint64_t GetModelId() const
void EmplaceNewValue(RFieldToken token)
const std::string & FindFieldName(RFieldToken token) const
This function has linear complexity, only use for more helpful error messages!
void BindRawPtr(RFieldToken token, T *rawPtr)
std::unordered_map< std::string, std::size_t > fFieldName2Token
For fast lookup of token IDs given a (sub)field name present in the entry.
void BindValue(std::string_view fieldName, std::shared_ptr< T > objPtr)
void UpdateValue(RFieldToken token, RFieldBase::RValue &&value)
Update the RValue for a field in the entry.
REntry(std::uint64_t modelId, std::uint64_t schemaId)
RFieldBase::RValue & GetValue(std::string_view fieldName)
RFieldToken GetToken(std::string_view fieldName) const
The ordinal of the (sub)field fieldName; can be used in other methods to address the corresponding va...
std::shared_ptr< T > AddValue(RField< T > &field)
While building the entry, adds a new value to the list and return the value's shared pointer.
RFieldBase::RValue & GetValue(RFieldToken token)
Return the RValue currently bound to the provided field.
void AddValue(RFieldBase::RValue &&value)
void UpdateValue(RFieldToken token, RFieldBase::RValue &value)
std::vector< RFieldBase::RValue > fValues
Corresponds to the fields of the linked model.
void BindRawPtr(std::string_view fieldName, T *rawPtr)
ConstIterator_t end() const
void EnsureMatchingModel(RFieldToken token) const
REntry(const REntry &other)=delete
std::shared_ptr< T > GetPtr(std::string_view fieldName) const
std::shared_ptr< T > GetPtr(RFieldToken token) const
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
const std::string & GetTypeName() const
std::string GetQualifiedFieldName() const
Returns the field name and parent field names separated by dots ("grandparent.parent....
RValue CreateValue()
Generates an object of the field type and wraps the created object in a shared pointer and returns it...
Classes with dictionaries that can be inspected by TClass.
Processor specializiation for vertically concatenated RNTuples (chains).
A context for filling entries (data) into clusters of an RNTuple.
Processor specializiation for horizontally concatenated RNTuples (joins).
The RNTupleModel encapulates the schema of an ntuple.
Interface for iterating over entries of RNTuples and vertically concatenated RNTuples (chains).
An RNTuple that is used to read data from storage.
Processor specializiation for processing a single RNTuple.
Base class for all ROOT issued exceptions.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...