16#ifndef ROOT7_RField_SequenceContainer
17#define ROOT7_RField_SequenceContainer
20#error "Please include RField.hxx!"
32namespace Experimental {
85template <
typename ItemT, std::
size_t N>
86class RField<std::array<ItemT, N>> :
public RArrayField {
95template <
typename ItemT, std::
size_t N>
115 std::size_t fItemSize = 0;
134 std::unique_ptr<RFieldBase>
CloneImpl(std::string_view
newName)
const final;
170template <
typename ItemT>
196 std::size_t fItemSize = 0;
215 std::unique_ptr<RFieldBase> CloneImpl(std::string_view
newName)
const final;
218 void GenerateColumns()
final;
222 std::unique_ptr<RDeleter> GetDeleter()
const final;
224 std::
size_t AppendImpl(
const void *from)
final;
227 void CommitClusterImpl()
final { fNWritten = 0; }
235 static std::unique_ptr<RVectorField>
238 std::vector<RValue> SplitValue(
const RValue &
value)
const final;
252template <
typename ItemT>
253class RField<std::vector<ItemT>>
final :
public RVectorField {
266 Internal::RColumnIndex fNWritten{0};
271 return std::make_unique<RField>(
newName);
279 std::unique_ptr<RDeleter>
GetDeleter()
const final {
return std::make_unique<RTypedDeleter<std::vector<bool>>>(); }
281 std::size_t
AppendImpl(
const void *from)
final;
287 static std::string
TypeName() {
return "std::vector<bool>"; }
327 std::unique_ptr<RFieldBase> CloneImpl(std::string_view
newName)
const final;
330 using RFieldBase::GenerateColumns;
332 void ConstructValue(
void *
where)
const final;
334 std::unique_ptr<RDeleter> GetDeleter()
const final;
ROOT::Experimental::RField< T > RField
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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 value
TRObject operator()(const T1 &t1) const
Abstract base class for classes implementing the visitor design pattern.
The in-memory representation of a 32bit or 64bit on-disk index column.
void GetCollectionInfo(const NTupleSize_t globalIndex, RNTupleLocalIndex *collectionStart, NTupleSize_t *collectionSize)
For offset columns only, look at the two adjacent values that define a collection's coordinates.
Additional classes related to sequence containers.
std::size_t fArrayLength
The size of a child field's item.
std::size_t fValueSize
The length of the arrays in this field.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponsing to the field type ...
std::size_t fItemSize
Sub field deleter or nullptr for simple fields.
std::unique_ptr< RDeleter > fItemDeleter
void operator()(void *objPtr, bool dtorOnly) final
RArrayDeleter(std::size_t itemSize, std::size_t arrayLength, std::unique_ptr< RDeleter > itemDeleter)
std::unique_ptr< RDeleter > fItemDeleter
Template specializations for C++ std::array and C-style arrays.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void ReadInClusterImpl(RNTupleLocalIndex localIndex, void *to) final
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
std::unique_ptr< RDeleter > GetDeleter() const final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
std::unique_ptr< RDeleter > GetDeleter() const final
Some fields have multiple possible column representations, e.g.
A functor to release the memory acquired by CreateValue (memory and constructor).
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
A field translates read and write calls from/to underlying columns to/from tree values.
virtual void GenerateColumns()
Implementations in derived classes should create the backing columns corresponsing to the field type ...
virtual std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec)
General implementation of bulk read.
std::vector< std::unique_ptr< RFieldBase > > fSubFields
Collections and classes own sub fields.
Internal::RColumn * fPrincipalColumn
All fields that have columns have a distinct main column.
virtual void CommitClusterImpl()
RFieldBase(std::string_view name, std::string_view type, ENTupleStructure structure, bool isSimple, std::size_t nRepetitions=0)
The constructor creates the underlying column objects and connects them to either a sink or a source.
virtual const RColumnRepresentations & GetColumnRepresentations() const
Implementations in derived classes should return a static RColumnRepresentations object.
RField & operator=(RField &&other)=default
RField(RField &&other)=default
RField(std::string_view name)
RField & operator=(RField &&other)=default
RField(std::string_view name)
RField(RField &&other)=default
RField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
Classes with dictionaries that can be inspected by TClass.
RField & operator=(RField &&other)=default
static std::string TypeName()
The on-storage meta-data of an ntuple.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
the RRVecDeleter is also used by RArrayAsRVecField and therefore declared public
std::size_t fItemAlignment
RRVecDeleter(std::size_t itemAlignment)
RRVecDeleter(std::size_t itemAlignment, std::size_t itemSize, std::unique_ptr< RDeleter > itemDeleter)
std::unique_ptr< RDeleter > fItemDeleter
Template specializations for ROOT's RVec.
std::unique_ptr< RDeleter > fItemDeleter
RRVecField(RRVecField &&)=default
~RRVecField() override=default
RRVecField(const RRVecField &)=delete
RRVecField & operator=(RRVecField &&)=default
Internal::RColumnIndex fNWritten
void GetCollectionInfo(RNTupleLocalIndex localIndex, RNTupleLocalIndex *collectionStart, NTupleSize_t *size) const
RRVecField & operator=(RRVecField &)=delete
std::unique_ptr< RDeleter > fItemDeleter
RVectorDeleter(std::size_t itemSize, std::unique_ptr< RDeleter > itemDeleter)
Template specializations for C++ std::vector.
~RVectorField() override=default
std::unique_ptr< RDeleter > fItemDeleter
Internal::RColumnIndex fNWritten
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
RVectorField & operator=(RVectorField &&other)=default
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void GetCollectionInfo(NTupleSize_t globalIndex, RNTupleLocalIndex *collectionStart, NTupleSize_t *size) const
void GetCollectionInfo(RNTupleLocalIndex localIndex, RNTupleLocalIndex *collectionStart, NTupleSize_t *size) const
RVectorField(RVectorField &&other)=default
A "std::vector"-like collection of values implementing handy operation to analyse them.
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...