77 template <
typename T,
typename... ArgsT>
80 auto ptr = std::make_shared<T>(std::forward<ArgsT>(args)...);
94 std::size_t bytesWritten = 0;
96 bytesWritten +=
v.Append();
105 "make sure to use a token from the same model as this entry."));
109 template <
typename T>
112 if constexpr (!std::is_void_v<T>) {
113 const auto &
v =
fValues[token.fIndex];
115 throw RException(
R__FAIL(
"type mismatch for field " +
v.GetField().GetFieldName() +
": " +
150 template <
typename T>
158 template <
typename T>
159 void BindValue(std::string_view fieldName, std::shared_ptr<T> objPtr)
164 template <
typename T>
172 template <
typename T>
178 template <
typename T>
183 return std::static_pointer_cast<T>(
fValues[token.
fIndex].GetPtr<
void>());
186 template <
typename T>
187 std::shared_ptr<T>
GetPtr(std::string_view fieldName)
const
#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 top-level field in this entry.
friend class RNTupleModel
std::uint64_t fModelId
Safety check to prevent tokens from other models being used.
std::size_t fIndex
the index in fValues that belongs to the top-level field
RFieldToken(std::size_t index, std::uint64_t modelId)
void EnsureMatchingType(RFieldToken token) const
friend class RNTupleModel
std::uint64_t fModelId
The entry must be linked to a specific model (or one if its clones), identified by a model ID.
void BindValue(RFieldToken token, std::shared_ptr< T > objPtr)
REntry & operator=(REntry &&other)=default
decltype(fValues)::const_iterator ConstIterator_t
void Read(NTupleSize_t index)
ConstIterator_t begin() const
friend class RNTupleCollectionWriter
REntry & operator=(const REntry &other)=delete
REntry(std::uint64_t modelId)
void EmplaceNewValue(std::string_view fieldName)
REntry(REntry &&other)=default
std::uint64_t GetModelId() const
void EmplaceNewValue(RFieldToken token)
std::shared_ptr< T > AddValue(RField< T > &field, ArgsT &&...args)
While building the entry, adds a new value to the list and return the value's shared pointer.
void BindRawPtr(RFieldToken token, T *rawPtr)
void BindValue(std::string_view fieldName, std::shared_ptr< T > objPtr)
RFieldToken GetToken(std::string_view fieldName) const
The ordinal of the top-level field fieldName; can be used in other methods to address the correspondi...
void AddValue(RFieldBase::RValue &&value)
std::vector< RFieldBase::RValue > fValues
Corresponds to the top-level fields of the linked model.
friend class RNTupleFillContext
void BindRawPtr(std::string_view fieldName, T *rawPtr)
ConstIterator_t end() const
friend class RNTupleReader
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
Base class for all ROOT issued exceptions.
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
RValue BindValue(std::shared_ptr< void > objPtr)
Creates a value from a memory location with an already constructed object.
Classes with dictionaries that can be inspected by TClass.
static std::string TypeName()
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...