40#if __cplusplus >= 201703L
49namespace Experimental {
51class RCollectionNTuple;
53class RFieldCollection;
105 if (field && field->GetParent())
106 return static_cast<int>(field->GetParent()->fSubFields.size());
122 return field->fOrder;
153 class RIterator :
public std::iterator<std::forward_iterator_tag, Detail::RFieldBase> {
182 std::size_t nRepetitions = 0);
193 static RFieldBase *
Create(
const std::string &fieldName,
const std::string &typeName);
243 void Attach(std::unique_ptr<Detail::RFieldBase> child);
354 size_t GetValueSize()
const override {
return sizeof(std::vector<char>); }
355 size_t GetAlignment() const final {
return std::alignment_of<std::vector<char>>(); }
387#if __cplusplus >= 201703L
389class RFieldVariant :
public Detail::RFieldBase {
391 size_t fMaxItemSize = 0;
392 size_t fMaxAlignment = 1;
394 size_t fTagOffset = 0;
395 std::vector<ClusterSize_t::ValueType>
fNWritten;
397 static std::string GetTypeList(
const std::vector<Detail::RFieldBase *> &itemFields);
399 std::uint32_t GetTag(
void *variantPtr)
const;
400 void SetTag(
void *variantPtr, std::uint32_t tag)
const;
403 void DoAppend(
const Detail::RFieldValue& value)
final;
408 RFieldVariant(
std::string_view fieldName,
const std::vector<Detail::RFieldBase *> &itemFields);
409 RFieldVariant(RFieldVariant &&other) =
default;
410 RFieldVariant&
operator =(RFieldVariant &&other) =
default;
411 ~RFieldVariant() =
default;
420 size_t GetAlignment() const final {
return fMaxAlignment; }
427template <
typename T,
typename=
void>
432 static_assert(std::is_class<T>::value,
"no I/O support for this basic C++ type");
439 template <
typename... ArgsT>
453 static std::string
TypeName() {
return ":RFieldCollection:"; }
455 std::shared_ptr<RCollectionNTuple> collectionNTuple,
456 std::unique_ptr<RNTupleModel> collectionModel);
485 static std::string
TypeName() {
return "ROOT::Experimental::ClusterSize_t"; }
503 template <
typename... ArgsT>
508 this,
static_cast<ClusterSize_t*
>(where), std::forward<ArgsT>(args)...);
548 template <
typename... ArgsT>
553 this,
static_cast<bool*
>(where), std::forward<ArgsT>(args)...);
584 template <
typename... ArgsT>
589 this,
static_cast<float*
>(where), std::forward<ArgsT>(args)...);
621 template <
typename... ArgsT>
626 this,
static_cast<double*
>(where), std::forward<ArgsT>(args)...);
637class RField<std::uint8_t> :
public Detail::RFieldBase {
639 static std::string TypeName() {
return "std::uint8_t"; }
642 RField(RField&& other) =
default;
652 std::uint8_t *
Map(
const RClusterIndex &clusterIndex) {
657 template <
typename... ArgsT>
660 return Detail::RFieldValue(
661 Detail::RColumnElement<std::uint8_t, EColumnType::kByte>(
static_cast<std::uint8_t*
>(where)),
662 this,
static_cast<std::uint8_t*
>(where), std::forward<ArgsT>(args)...);
666 return Detail::RFieldValue(
true ,
667 Detail::RColumnElement<std::uint8_t, EColumnType::kByte>(
static_cast<std::uint8_t*
>(where)),
this, where);
669 size_t GetValueSize() const final {
return sizeof(std::uint8_t); }
673class RField<std::int32_t> :
public Detail::RFieldBase {
675 static std::string TypeName() {
return "std::int32_t"; }
678 RField(RField&& other) =
default;
688 std::int32_t *
Map(
const RClusterIndex &clusterIndex) {
693 template <
typename... ArgsT>
696 return Detail::RFieldValue(
697 Detail::RColumnElement<std::int32_t, EColumnType::kInt32>(
static_cast<std::int32_t*
>(where)),
698 this,
static_cast<std::int32_t*
>(where), std::forward<ArgsT>(args)...);
702 return Detail::RFieldValue(
true ,
703 Detail::RColumnElement<std::int32_t, EColumnType::kInt32>(
static_cast<std::int32_t*
>(where)),
this, where);
705 size_t GetValueSize() const final {
return sizeof(std::int32_t); }
709class RField<std::uint32_t> :
public Detail::RFieldBase {
711 static std::string TypeName() {
return "std::uint32_t"; }
714 RField(RField&& other) =
default;
724 std::uint32_t *
Map(
const RClusterIndex clusterIndex) {
729 template <
typename... ArgsT>
732 return Detail::RFieldValue(
733 Detail::RColumnElement<std::uint32_t, EColumnType::kInt32>(
static_cast<std::uint32_t*
>(where)),
734 this,
static_cast<std::uint32_t*
>(where), std::forward<ArgsT>(args)...);
738 return Detail::RFieldValue(
true ,
739 Detail::RColumnElement<std::uint32_t, EColumnType::kInt32>(
static_cast<std::uint32_t*
>(where)),
this, where);
741 size_t GetValueSize() const final {
return sizeof(std::uint32_t); }
745class RField<std::uint64_t> :
public Detail::RFieldBase {
747 static std::string TypeName() {
return "std::uint64_t"; }
750 RField(RField&& other) =
default;
760 std::uint64_t *
Map(
const RClusterIndex &clusterIndex) {
765 template <
typename... ArgsT>
768 return Detail::RFieldValue(
769 Detail::RColumnElement<std::uint64_t, EColumnType::kInt64>(
static_cast<std::uint64_t*
>(where)),
770 this,
static_cast<std::uint64_t*
>(where), std::forward<ArgsT>(args)...);
774 return Detail::RFieldValue(
true ,
775 Detail::RColumnElement<std::uint64_t, EColumnType::kInt64>(
static_cast<std::uint64_t*
>(where)),
this, where);
777 size_t GetValueSize() const final {
return sizeof(std::uint64_t); }
782class RField<std::string> :
public Detail::RFieldBase {
785 Detail::RColumnElement<ClusterSize_t, EColumnType::kIndex> fElemIndex;
792 static std::string TypeName() {
return "std::string"; }
795 , fIndex(0), fElemIndex(&fIndex) {}
796 RField(RField&& other) =
default;
804 template <typename... ArgsT>
807 return Detail::RFieldValue(
this,
static_cast<std::string*
>(where), std::forward<ArgsT>(args)...);
810 void DestroyValue(
const Detail::RFieldValue& value,
bool dtorOnly =
false) {
811 auto str = value.Get<std::string>();
812 str->~basic_string();
817 return Detail::RFieldValue(
true ,
this, where);
819 size_t GetValueSize() const final {
return sizeof(std::string); }
820 size_t GetAlignment() const final {
return std::alignment_of<std::string>(); }
825template <typename ItemT, std::
size_t N>
826class RField<std::array<ItemT,
N>> : public RFieldArray {
827 using ContainerT =
typename std::array<ItemT, N>;
829 static std::string TypeName() {
833 : RFieldArray(
name, std::make_unique<RField<ItemT>>(RField<ItemT>::TypeName()),
N)
835 RField(RField&& other) =
default;
840 template <
typename... ArgsT>
843 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
851#if __cplusplus >= 201703L
852template <
typename... ItemTs>
853class RField<std::variant<ItemTs...>> :
public RFieldVariant {
854 using ContainerT =
typename std::variant<ItemTs...>;
856 template <
typename HeadT,
typename... TailTs>
857 static std::string BuildItemTypes()
860 if constexpr(
sizeof...(TailTs) > 0)
861 result +=
"," + BuildItemTypes<TailTs...>();
865 template <
typename HeadT,
typename... TailTs>
866 static std::vector<Detail::RFieldBase *> BuildItemFields(
unsigned int index = 0)
868 std::vector<Detail::RFieldBase *> result;
869 result.emplace_back(
new RField<HeadT>(
"variant" + std::to_string(index)));
870 if constexpr(
sizeof...(TailTs) > 0) {
871 auto tailFields = BuildItemFields<TailTs...>(index + 1);
872 result.insert(result.end(), tailFields.begin(), tailFields.end());
878 static std::string TypeName() {
return "std::variant<" + BuildItemTypes<ItemTs...>() +
">"; }
880 RField(RField&& other) =
default;
885 template <
typename... ArgsT>
888 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
896template <
typename ItemT>
898 using ContainerT =
typename std::vector<ItemT>;
902 :
RFieldVector(
name, std::make_unique<RField<ItemT>>(RField<ItemT>::TypeName()))
904 RField(RField&& other) =
default;
909 template <
typename... ArgsT>
912 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
918 return Detail::RFieldValue(
true ,
this, where);
920 size_t GetValueSize() const final {
return sizeof(ContainerT); }
925class RField<std::vector<bool>> :
public Detail::RFieldBase {
930 void DoAppend(
const Detail::RFieldValue& value)
final;
935 static std::
string TypeName() {
return "std::vector<bool>"; }
937 RField(RField&& other) =
default;
943 template <
typename... ArgsT>
946 return Detail::RFieldValue(
this,
static_cast<std::vector<bool>*
>(where), std::forward<ArgsT>(args)...);
952 return Detail::RFieldValue(
true ,
this, where);
954 void DestroyValue(
const Detail::RFieldValue& value,
bool dtorOnly =
false) final;
956 size_t GetValueSize() const final {
return sizeof(std::vector<bool>); }
957 size_t GetAlignment() const final {
return std::alignment_of<std::vector<bool>>(); }
966template <
typename ItemT>
976 auto count = typedValue->size();
977 for (
unsigned i = 0; i < count; ++i) {
978 auto itemValue =
fSubFields[0]->CaptureValue(&typedValue->data()[i]);
990 typedValue->resize(nItems);
991 for (
unsigned i = 0; i < nItems; ++i) {
992 auto itemValue =
fSubFields[0]->GenerateValue(&typedValue->data()[i]);
993 fSubFields[0]->Read(collectionStart + i, &itemValue);
1003 Attach(std::move(itemField));
1019 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
1020 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
1025 auto nItems = vec->size();
1026 for (
unsigned i = 0; i < nItems; ++i) {
1028 fSubFields[0]->DestroyValue(itemValue,
true );
1039 template <
typename... ArgsT>
1051 size_t GetAlignment() const final {
return std::alignment_of<ContainerT>(); }
1066 auto count = typedValue->size();
1067 for (
unsigned i = 0; i < count; ++i) {
1068 bool bval = (*typedValue)[i];
1069 auto itemValue =
fSubFields[0]->CaptureValue(&bval);
1081 typedValue->resize(nItems);
1082 for (
unsigned i = 0; i < nItems; ++i) {
1083 bool bval = (*typedValue)[i];
1084 auto itemValue =
fSubFields[0]->GenerateValue(&bval);
1085 fSubFields[0]->Read(collectionStart + i, &itemValue);
1086 (*typedValue)[i] = bval;
1105 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
1106 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
1117 static std::string
TypeName() {
return "ROOT::VecOps::RVec<bool>"; }
1120 template <
typename... ArgsT>
1132 size_t GetAlignment() const final {
return std::alignment_of<ContainerT>(); }
void Append(const RColumnElementBase &element)
CppT * Map(const NTupleSize_t globalIndex)
void Read(const NTupleSize_t globalIndex, RColumnElementBase *element)
NTupleSize_t GetGlobalIndex(const RClusterIndex &clusterIndex)
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 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...
pointer operator->() const
bool operator==(const iterator &rh) const
std::vector< Position > fStack
The stack of nodes visited when walking down the tree of fields.
bool operator!=(const iterator &rh) const
RIterator(pointer val, int idxInParent)
reference operator*() 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.
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.
virtual void DoAppend(const RFieldValue &value)
Operations on values of complex types, e.g.
std::size_t GetNRepetitions() const
virtual void DoGenerateColumns()=0
Creates the backing columns corresponsing to the field type and name.
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.
int fOrder
First subfield of parentfield has fOrder 1, the next fOrder 2, etc. Value set by RFieldBase::Attach()
RLevelInfo GetLevelInfo() const
void Flush() const
Ensure that all received items are written from page buffers to the storage.
virtual void AcceptVisitor(RNTupleVisitor &visitor, int level) const
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.
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.
std::string fName
The field name relative to its parent field.
virtual void DoReadGlobal(NTupleSize_t globalIndex, RFieldValue *value)
virtual RNTupleVersion GetFieldVersion() const
Indicates an evolution of the mapping scheme from C++ type to columns.
virtual void TraverseVisitor(RNTupleVisitor &visitor, int level=0) const
Used for the visitor design pattern, see for example RNTupleReader::Print()
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
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)
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 a tree value of the field type and allocates new initialized memory according to the type.
virtual void DoReadInCluster(const RClusterIndex &clusterIndex, RFieldValue *value)
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(RFieldArray &&other)=default
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
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 DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
std::size_t fMaxAlignment
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
size_t GetAlignment() const final
For many types, the alignment requirement is equal to the size; otherwise override.
void DoAppend(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
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...
RFieldBase * Clone(std::string_view newName) final
RFieldClass(RFieldClass &&other)=default
void DoReadInCluster(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
void DoReadGlobal(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
~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.
RFieldBase * Clone(std::string_view newName)
void DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
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.
void AcceptVisitor(Detail::RNTupleVisitor &visitor, int level) const final
Detail::RFieldValue CaptureValue(void *) final
Creates a value from a memory location with an already constructed object.
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>
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 DoAppend(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
void CommitCluster() final
Perform housekeeping tasks for global to cluster-local index translation.
void DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
void DoReadGlobal(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
RFieldVector(RFieldVector &&other)=default
RFieldBase * Clone(std::string_view newName) final
RFieldVector(std::string_view fieldName, std::unique_ptr< Detail::RFieldBase > itemField)
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.
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)
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.
RField(RField &&other)=default
void DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
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.
void DoReadGlobal(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
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 DoAppend(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
void DoGenerateColumns() 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 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.
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 DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
void DoAppend(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
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 DoReadGlobal(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.
Position(pointer fieldPtr, int idxInParent)
Describes where the field is located inside the ntuple.
int fLevel
Tells how deep the field is in the ntuple. Rootfield has fLevel 0, direct subfield of Rootfield has f...
int GetLevel(const RFieldBase *field=nullptr) const
int GetOrder(const RFieldBase *field=nullptr) const
int fNumSiblingFields
The field itself is also included in this number.
int fOrder
First subfield of parentfield has fOrder 1, the next fOrder 2, etc. Value set by RFieldBase::fOrder.
RLevelInfo(const RFieldBase *field)
int GetNumSiblings(const RFieldBase *field=nullptr) const
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...