40#if __cplusplus >= 201703L
49namespace Experimental {
51class RCollectionNTuple;
53class RFieldCollection;
115 class RSchemaIterator :
public std::iterator<std::forward_iterator_tag, Detail::RFieldBase> {
144 std::size_t nRepetitions = 0);
155 static RFieldBase *
Create(
const std::string &fieldName,
const std::string &typeName);
209 void Attach(std::unique_ptr<Detail::RFieldBase> child);
225 RSchemaIterator
begin();
226 RSchemaIterator
end();
319 size_t GetValueSize()
const override {
return sizeof(std::vector<char>); }
320 size_t GetAlignment() const final {
return std::alignment_of<std::vector<char>>(); }
322 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
362#if __cplusplus >= 201703L
364class RFieldVariant :
public Detail::RFieldBase {
366 size_t fMaxItemSize = 0;
367 size_t fMaxAlignment = 1;
369 size_t fTagOffset = 0;
370 std::vector<ClusterSize_t::ValueType> fNWritten;
372 static std::string GetTypeList(
const std::vector<Detail::RFieldBase *> &itemFields);
374 std::uint32_t GetTag(
void *variantPtr)
const;
375 void SetTag(
void *variantPtr, std::uint32_t tag)
const;
378 void AppendImpl(
const Detail::RFieldValue& value)
final;
379 void ReadGlobalImpl(
NTupleSize_t globalIndex, Detail::RFieldValue *value)
final;
383 RFieldVariant(
std::string_view fieldName,
const std::vector<Detail::RFieldBase *> &itemFields);
384 RFieldVariant(RFieldVariant &&other) =
default;
385 RFieldVariant&
operator =(RFieldVariant &&other) =
default;
386 ~RFieldVariant() =
default;
389 void GenerateColumnsImpl() final;
391 Detail::
RFieldValue GenerateValue(
void *where) override;
392 void DestroyValue(const Detail::
RFieldValue &value,
bool dtorOnly = false) final;
393 Detail::
RFieldValue CaptureValue(
void *where) final;
394 size_t GetValueSize() const final;
395 size_t GetAlignment() const final {
return fMaxAlignment; }
396 void CommitCluster() final;
402template <
typename T,
typename=
void>
407 static_assert(std::is_class<T>::value,
"no I/O support for this basic C++ type");
414 template <
typename... ArgsT>
428 static std::string
TypeName() {
return ":RFieldCollection:"; }
430 std::shared_ptr<RCollectionNTuple> collectionNTuple,
431 std::unique_ptr<RNTupleModel> collectionModel);
437 void GenerateColumnsImpl() final;
450 void CommitCluster() final;
460 static std::string
TypeName() {
return "ROOT::Experimental::ClusterSize_t"; }
478 template <
typename... ArgsT>
483 this,
static_cast<ClusterSize_t*
>(where), std::forward<ArgsT>(args)...);
494 fPrincipalColumn->GetCollectionInfo(globalIndex, collectionStart, size);
497 fPrincipalColumn->GetCollectionInfo(clusterIndex, collectionStart, size);
514 void GenerateColumnsImpl() final;
524 template <
typename... ArgsT>
529 this,
static_cast<bool*
>(where), std::forward<ArgsT>(args)...);
551 void GenerateColumnsImpl() final;
561 template <
typename... ArgsT>
566 this,
static_cast<float*
>(where), std::forward<ArgsT>(args)...);
589 void GenerateColumnsImpl() final;
599 template <
typename... ArgsT>
604 this,
static_cast<double*
>(where), std::forward<ArgsT>(args)...);
616class RField<std::
uint8_t> :
public Detail::RFieldBase {
618 static std::string TypeName() {
return "std::uint8_t"; }
621 RField(RField&& other) =
default;
626 void GenerateColumnsImpl() final;
636 template <
typename... ArgsT>
639 return Detail::RFieldValue(
640 Detail::RColumnElement<std::uint8_t, EColumnType::kByte>(
static_cast<std::uint8_t*
>(where)),
641 this,
static_cast<std::uint8_t*
>(where), std::forward<ArgsT>(args)...);
644 Detail::RFieldValue CaptureValue(
void *where)
final {
645 return Detail::RFieldValue(
true ,
646 Detail::RColumnElement<std::uint8_t, EColumnType::kByte>(
static_cast<std::uint8_t*
>(where)),
this, where);
648 size_t GetValueSize() const final {
return sizeof(
std::uint8_t); }
649 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
653class RField<std::int32_t> :
public Detail::RFieldBase {
655 static std::string TypeName() {
return "std::int32_t"; }
658 RField(RField&& other) =
default;
663 void GenerateColumnsImpl() final;
668 std::int32_t *
Map(
const RClusterIndex &clusterIndex) {
673 template <
typename... ArgsT>
676 return Detail::RFieldValue(
677 Detail::RColumnElement<std::int32_t, EColumnType::kInt32>(
static_cast<std::int32_t*
>(where)),
678 this,
static_cast<std::int32_t*
>(where), std::forward<ArgsT>(args)...);
681 Detail::RFieldValue CaptureValue(
void *where)
final {
682 return Detail::RFieldValue(
true ,
683 Detail::RColumnElement<std::int32_t, EColumnType::kInt32>(
static_cast<std::int32_t*
>(where)),
this, where);
685 size_t GetValueSize() const final {
return sizeof(std::int32_t); }
686 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
690class RField<std::uint32_t> :
public Detail::RFieldBase {
692 static std::string TypeName() {
return "std::uint32_t"; }
695 RField(RField&& other) =
default;
700 void GenerateColumnsImpl() final;
705 std::uint32_t *
Map(
const RClusterIndex clusterIndex) {
710 template <
typename... ArgsT>
713 return Detail::RFieldValue(
714 Detail::RColumnElement<std::uint32_t, EColumnType::kInt32>(
static_cast<std::uint32_t*
>(where)),
715 this,
static_cast<std::uint32_t*
>(where), std::forward<ArgsT>(args)...);
718 Detail::RFieldValue CaptureValue(
void *where)
final {
719 return Detail::RFieldValue(
true ,
720 Detail::RColumnElement<std::uint32_t, EColumnType::kInt32>(
static_cast<std::uint32_t*
>(where)),
this, where);
722 size_t GetValueSize() const final {
return sizeof(std::uint32_t); }
723 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
727class RField<std::uint64_t> :
public Detail::RFieldBase {
729 static std::string TypeName() {
return "std::uint64_t"; }
732 RField(RField&& other) =
default;
737 void GenerateColumnsImpl() final;
742 std::uint64_t *
Map(
const RClusterIndex &clusterIndex) {
747 template <
typename... ArgsT>
750 return Detail::RFieldValue(
751 Detail::RColumnElement<std::uint64_t, EColumnType::kInt64>(
static_cast<std::uint64_t*
>(where)),
752 this,
static_cast<std::uint64_t*
>(where), std::forward<ArgsT>(args)...);
755 Detail::RFieldValue CaptureValue(
void *where)
final {
756 return Detail::RFieldValue(
true ,
757 Detail::RColumnElement<std::uint64_t, EColumnType::kInt64>(
static_cast<std::uint64_t*
>(where)),
this, where);
759 size_t GetValueSize() const final {
return sizeof(std::uint64_t); }
760 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
765class RField<std::string> :
public Detail::RFieldBase {
768 Detail::RColumnElement<ClusterSize_t, EColumnType::kIndex> fElemIndex;
775 static std::string TypeName() {
return "std::string"; }
778 , fIndex(0), fElemIndex(&fIndex) {}
779 RField(RField&& other) =
default;
784 void GenerateColumnsImpl() final;
787 template <typename... ArgsT>
788 ROOT::Experimental::Detail::
RFieldValue GenerateValue(
void* where, ArgsT&&... args)
790 return Detail::RFieldValue(
this,
static_cast<std::string*
>(where), std::forward<ArgsT>(args)...);
793 void DestroyValue(
const Detail::RFieldValue& value,
bool dtorOnly =
false) {
794 auto str = value.Get<std::string>();
795 str->~basic_string();
799 Detail::RFieldValue CaptureValue(
void *where) {
800 return Detail::RFieldValue(
true ,
this, where);
802 size_t GetValueSize() const final {
return sizeof(std::string); }
803 size_t GetAlignment() const final {
return std::alignment_of<std::string>(); }
804 void CommitCluster() final;
805 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
809template <typename ItemT, std::
size_t N>
810class RField<std::array<ItemT,
N>> : public RFieldArray {
811 using ContainerT =
typename std::array<ItemT, N>;
813 static std::string TypeName() {
817 : RFieldArray(
name, std::make_unique<RField<ItemT>>(RField<ItemT>::TypeName()),
N)
819 RField(RField&& other) =
default;
824 template <
typename... ArgsT>
827 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
830 return GenerateValue(where, ContainerT());
835#if __cplusplus >= 201703L
836template <
typename... ItemTs>
837class RField<std::variant<ItemTs...>> :
public RFieldVariant {
838 using ContainerT =
typename std::variant<ItemTs...>;
840 template <
typename HeadT,
typename... TailTs>
841 static std::string BuildItemTypes()
844 if constexpr(
sizeof...(TailTs) > 0)
845 result +=
"," + BuildItemTypes<TailTs...>();
849 template <
typename HeadT,
typename... TailTs>
850 static std::vector<Detail::RFieldBase *> BuildItemFields(
unsigned int index = 0)
852 std::vector<Detail::RFieldBase *> result;
853 result.emplace_back(
new RField<HeadT>(
"variant" + std::to_string(index)));
854 if constexpr(
sizeof...(TailTs) > 0) {
855 auto tailFields = BuildItemFields<TailTs...>(index + 1);
856 result.insert(result.end(), tailFields.begin(), tailFields.end());
862 static std::string TypeName() {
return "std::variant<" + BuildItemTypes<ItemTs...>() +
">"; }
864 RField(RField&& other) =
default;
869 template <
typename... ArgsT>
872 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
875 return GenerateValue(where, ContainerT());
880template <
typename ItemT>
881class RField<std::vector<ItemT>> :
public RFieldVector {
882 using ContainerT =
typename std::vector<ItemT>;
886 : RFieldVector(
name, std::make_unique<RField<ItemT>>(RField<ItemT>::TypeName()))
888 RField(RField&& other) =
default;
893 template <
typename... ArgsT>
896 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
899 return GenerateValue(where, ContainerT());
901 Detail::RFieldValue CaptureValue(
void *where)
final {
902 return Detail::RFieldValue(
true ,
this, where);
904 size_t GetValueSize() const final {
return sizeof(ContainerT); }
909class RField<std::vector<bool>> :
public Detail::RFieldBase {
914 void AppendImpl(
const Detail::RFieldValue& value)
final;
915 void ReadGlobalImpl(
NTupleSize_t globalIndex, Detail::RFieldValue *value)
final;
916 void GenerateColumnsImpl() final;
919 static std::
string TypeName() {
return "std::vector<bool>"; }
921 RField(RField&& other) =
default;
927 template <
typename... ArgsT>
930 return Detail::RFieldValue(
this,
static_cast<std::vector<bool>*
>(where), std::forward<ArgsT>(args)...);
933 return GenerateValue(where, std::vector<bool>());
935 Detail::RFieldValue CaptureValue(
void *where)
final {
936 return Detail::RFieldValue(
true ,
this, where);
938 std::vector<Detail::RFieldValue> SplitValue(
const Detail::RFieldValue &value)
const final;
939 void DestroyValue(
const Detail::RFieldValue& value,
bool dtorOnly =
false) final;
941 size_t GetValueSize() const final {
return sizeof(std::vector<bool>); }
942 size_t GetAlignment() const final {
return std::alignment_of<std::vector<bool>>(); }
943 void CommitCluster() final { fNWritten = 0; }
944 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
946 fPrincipalColumn->GetCollectionInfo(globalIndex, collectionStart, size);
948 void GetCollectionInfo(
const RClusterIndex &clusterIndex, RClusterIndex *collectionStart,
ClusterSize_t *size)
const {
949 fPrincipalColumn->GetCollectionInfo(clusterIndex, collectionStart, size);
958template <
typename ItemT>
968 auto count = typedValue->size();
969 for (
unsigned i = 0; i < count; ++i) {
970 auto itemValue = fSubFields[0]->CaptureValue(&typedValue->data()[i]);
971 fSubFields[0]->Append(itemValue);
975 fColumns[0]->Append(elemIndex);
981 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
982 typedValue->resize(nItems);
983 for (
unsigned i = 0; i < nItems; ++i) {
984 auto itemValue = fSubFields[0]->GenerateValue(&typedValue->data()[i]);
985 fSubFields[0]->Read(collectionStart + i, &itemValue);
993 , fItemSize(itemField->GetValueSize()), fNWritten(0)
995 Attach(std::move(itemField));
1005 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetName());
1011 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
1012 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
1013 fPrincipalColumn = fColumns[0].get();
1017 auto nItems = vec->size();
1018 for (
unsigned i = 0; i < nItems; ++i) {
1019 auto itemValue = fSubFields[0]->CaptureValue(vec->data() + (i * fItemSize));
1020 fSubFields[0]->DestroyValue(itemValue,
true );
1031 template <
typename... ArgsT>
1043 size_t GetAlignment() const final {
return std::alignment_of<ContainerT>(); }
1058 auto count = typedValue->size();
1059 for (
unsigned i = 0; i < count; ++i) {
1060 bool bval = (*typedValue)[i];
1061 auto itemValue = fSubFields[0]->CaptureValue(&bval);
1062 fSubFields[0]->Append(itemValue);
1066 fColumns[0]->Append(elemIndex);
1072 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
1073 typedValue->resize(nItems);
1074 for (
unsigned i = 0; i < nItems; ++i) {
1075 bool bval = (*typedValue)[i];
1076 auto itemValue = fSubFields[0]->GenerateValue(&bval);
1077 fSubFields[0]->Read(collectionStart + i, &itemValue);
1078 (*typedValue)[i] = bval;
1097 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
1098 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
1099 fPrincipalColumn = fColumns[0].get();
1109 static std::string
TypeName() {
return "ROOT::VecOps::RVec<bool>"; }
1112 template <
typename... ArgsT>
1124 size_t GetAlignment() const final {
return std::alignment_of<ContainerT>(); }
Binding & operator=(OUT(*fun)(void))
void Append(const RColumnElementBase &element)
void Read(const NTupleSize_t globalIndex, RColumnElementBase *element)
NTupleSize_t GetGlobalIndex(const RClusterIndex &clusterIndex)
NTupleSize_t GetNElements() const
void GetCollectionInfo(const NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *collectionSize)
For offset columns only, look at the two adjacent values that define a collection's coordinates.
Iterates over the sub tree of fields in depth-first search order.
void Advance()
Given that the iterator points to a valid field which is not the end iterator, go to the next field i...
std::vector< Position > fStack
The stack of nodes visited when walking down the tree of fields.
pointer operator->() const
bool operator!=(const iterator &rh) const
reference operator*() const
RSchemaIterator(pointer val, int idxInParent)
bool operator==(const iterator &rh) const
void Append(const RFieldValue &value)
Write the given value into columns. The value object has to be of the same type as the field.
virtual RFieldValue CaptureValue(void *where)=0
Creates a value from a memory location with an already constructed object.
virtual void GenerateColumnsImpl()=0
Creates the backing columns corresponsing to the field type and name.
std::vector< std::unique_ptr< RFieldBase > > fSubFields
Collections and classes own sub fields.
RFieldBase * fParent
Sub fields point to their mother field.
std::string GetName() const
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.
std::size_t GetNRepetitions() const
virtual void DestroyValue(const RFieldValue &value, bool dtorOnly=false)
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
virtual RNTupleVersion GetTypeVersion() const
Indicates an evolution of the C++ type itself.
void Flush() const
Ensure that all received items are written from page buffers to the storage.
virtual void ReadInClusterImpl(const RClusterIndex &clusterIndex, RFieldValue *value)
virtual void CommitCluster()
Perform housekeeping tasks for global to cluster-local index translation.
virtual size_t GetAlignment() const
For many types, the alignment requirement is equal to the size; otherwise override.
virtual size_t GetValueSize() const =0
The number of bytes taken by a value of the appropriate type.
virtual std::vector< RFieldValue > SplitValue(const RFieldValue &value) const
Creates the list of direct child values given a value for this field.
std::string GetType() const
RFieldBase(RFieldBase &&)=default
bool fIsSimple
A field on a trivial type that maps as-is to a single column.
std::string fType
The C++ type captured by this field.
virtual void AppendImpl(const RFieldValue &value)
Operations on values of complex types, e.g.
std::string fName
The field name relative to its parent field.
virtual RNTupleVersion GetFieldVersion() const
Indicates an evolution of the mapping scheme from C++ type to columns.
NTupleSize_t GetNElements() const
static RFieldBase * Create(const std::string &fieldName, const std::string &typeName)
Factory method to resurrect a field from the stored on-disk type information.
std::size_t fNRepetitions
For fixed sized arrays, the array length.
RFieldBase(const RFieldBase &)=delete
virtual void AcceptVisitor(RFieldVisitor &visitor) const
std::vector< const RFieldBase * > GetSubFields() const
virtual void ReadGlobalImpl(NTupleSize_t globalIndex, RFieldValue *value)
ENTupleStructure fStructure
The role of this field in the data model structure.
void Read(const RClusterIndex &clusterIndex, RFieldValue *value)
std::vector< std::unique_ptr< RColumn > > fColumns
The columns are connected either to a sink or to a source (not to both); they are owned by the field.
void Attach(std::unique_ptr< Detail::RFieldBase > child)
Add a new subfield to the list of nested fields.
virtual RFieldValue GenerateValue(void *where)=0
Generates a tree value in a given location of size at least GetValueSize().
RFieldBase & operator=(const RFieldBase &)=delete
ENTupleStructure GetStructure() const
void Read(NTupleSize_t globalIndex, RFieldValue *value)
Populate a single value with data from the tree, which needs to be of the fitting type.
const RFieldBase * GetParent() const
virtual RFieldBase * Clone(std::string_view newName)=0
RFieldValue GenerateValue()
Generates an object of the field type and allocates new initialized memory according to the type.
RColumn * fPrincipalColumn
Points into fColumns.
static void Connect(DescriptorId_t fieldId, RPageStorage &pageStorage, RFieldBase &field)
RColumnElementBase fMappedElement
For simple types, the mapped element drills through the layers from the C++ data representation to th...
Abstract base class for classes implementing the visitor design pattern.
Common functionality of an ntuple storage for both reading and writing.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
Holds the static meta-data of a column in a tree.
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
The generic field for fixed size arrays, which do not need an offset column.
RFieldArray & operator=(RFieldArray &&other)=default
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
RFieldArray(std::string_view fieldName, std::unique_ptr< Detail::RFieldBase > itemField, std::size_t arrayLength)
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
RFieldArray(RFieldArray &&other)=default
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
std::vector< Detail::RFieldValue > SplitValue(const Detail::RFieldValue &value) const final
Creates the list of direct child values given a value for this field.
void AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
void ReadInClusterImpl(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
RFieldBase * Clone(std::string_view newName) final
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
A field translates read and write calls from/to underlying columns to/from tree values.
The field for a class with dictionary.
RFieldClass & operator=(RFieldClass &&other)=default
void AcceptVisitor(Detail::RFieldVisitor &visitor) const override
std::size_t fMaxAlignment
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
void ReadInClusterImpl(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
std::vector< Detail::RFieldValue > SplitValue(const Detail::RFieldValue &value) const final
Creates the list of direct child values given a value for this field.
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
RFieldClass(std::string_view fieldName, std::string_view className)
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
RFieldBase * Clone(std::string_view newName) final
RFieldClass(RFieldClass &&other)=default
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
void AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
~RFieldCollection()=default
RFieldCollection(RFieldCollection &&other)=default
static std::string TypeName()
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
std::shared_ptr< RCollectionNTuple > fCollectionNTuple
Save the link to the collection ntuple in order to reset the offset counter when committing the clust...
A friend of RFieldBase responsible for connecting a field's columns to the physical page storage.
The container field for an ntuple model, which itself has no physical representation.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
RFieldBase * Clone(std::string_view newName)
REntry * GenerateEntry()
Generates managed values for the top-level sub fields.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
Detail::RFieldValue CaptureValue(void *) final
Creates a value from a memory location with an already constructed object.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
Detail::RFieldValue GenerateValue(void *)
Generates a tree value in a given location of size at least GetValueSize().
Represents transient storage of simple or complex C++ values.
The generic field for a (nested) std::vector<Type> except for std::vector<bool>
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
RFieldVector & operator=(RFieldVector &&other)=default
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
void CommitCluster() final
Perform housekeeping tasks for global to cluster-local index translation.
void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
std::vector< Detail::RFieldValue > SplitValue(const Detail::RFieldValue &value) const final
Creates the list of direct child values given a value for this field.
RFieldVector(RFieldVector &&other)=default
RFieldBase * Clone(std::string_view newName) final
RFieldVector(std::string_view fieldName, std::unique_ptr< Detail::RFieldBase > itemField)
void AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
Detail::RFieldValue CaptureValue(void *where) override
Creates a value from a memory location with an already constructed object.
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
RFieldBase * Clone(std::string_view newName) final
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size)
static std::string TypeName()
RField(std::string_view name)
ClusterSize_t * Map(const RClusterIndex &clusterIndex)
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
RField(RField &&other)=default
void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size)
Special help for offset fields.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
RField(std::string_view name)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
typename ROOT::VecOps::RVec< ItemT > ContainerT
static std::string TypeName()
RField(RField &&other)=default
RField(std::string_view fieldName, std::unique_ptr< Detail::RFieldBase > itemField)
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
void CommitCluster() final
Perform housekeeping tasks for global to cluster-local index translation.
RFieldBase * Clone(std::string_view newName) final
void AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
RField(std::string_view name)
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
RFieldBase * Clone(std::string_view newName) final
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type and name.
void AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
void CommitCluster() final
Perform housekeeping tasks for global to cluster-local index translation.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
RField(RField &&other)=default
typename ROOT::VecOps::RVec< bool > ContainerT
static std::string TypeName()
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
RField(std::string_view name)
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
static std::string TypeName()
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
RField(RField &&other)=default
bool * Map(const RClusterIndex &clusterIndex)
RFieldBase * Clone(std::string_view newName) final
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
double * Map(const RClusterIndex &clusterIndex)
RField(std::string_view name)
RFieldBase * Clone(std::string_view newName) final
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
RField(RField &&other)=default
static std::string TypeName()
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
static std::string TypeName()
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
RField(RField &&other)=default
RField(std::string_view name)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
float * Map(const RClusterIndex &clusterIndex)
RFieldBase * Clone(std::string_view newName) final
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
Classes with dictionaries that can be inspected by TClass.
RField(std::string_view name)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
RField(RField &&other)=default
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
static std::string TypeName()
For forward and backward compatibility, attach version information to the consitituents of the file f...
A "std::vector"-like collection of values implementing handy operation to analyse them.
TClass instances represent classes, structs and namespaces in the ROOT type system.
basic_string_view< char > string_view
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
RClusterSize ClusterSize_t
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
std::string GetDemangledTypeName(const std::type_info &)
Returns a string with the demangled and normalized name for the given type.
auto Map(Args &&... args) -> decltype(ROOT::Detail::VecOps::MapFromTuple(std::forward_as_tuple(args...), std::make_index_sequence< sizeof...(args) - 1 >()))
Create new collection applying a callable to the elements of the input collection.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Type GetType(const std::string &Name)
Position(pointer fieldPtr, int idxInParent)
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...