18std::vector<ROOT::RFieldBase::RValue> SplitVector(std::shared_ptr<void> valuePtr,
ROOT::RFieldBase &itemField)
20 auto *
vec =
static_cast<std::vector<char> *
>(valuePtr.get());
24 const auto nItems =
vec->size() / itemSize;
25 std::vector<ROOT::RFieldBase::RValue>
result;
27 for (
unsigned i = 0; i < nItems; ++i) {
28 result.emplace_back(itemField.
BindValue(std::shared_ptr<void>(valuePtr,
vec->data() + (i * itemSize))));
36 std::size_t arrayLength)
45 if (!itemField->GetTypeAlias().empty()) {
46 fTypeAlias =
"std::array<" + itemField->GetTypeAlias() +
"," +
47 Internal::GetNormalizedInteger(static_cast<unsigned long long>(arrayLength)) +
">";
49 Attach(std::move(itemField),
"_0");
55 return std::make_unique<RArrayField>(newName, std::move(newItemField),
fArrayLength);
60 std::size_t nbytes = 0;
65 auto arrayPtr =
static_cast<const unsigned char *
>(from);
78 auto arrayPtr =
static_cast<unsigned char *
>(to);
90 auto arrayPtr =
static_cast<unsigned char *
>(to);
104 return RBulkSpec::kAllSet;
109 static const std::vector<std::string> prefixes = {
"std::array<"};
120 auto arrayPtr =
reinterpret_cast<unsigned char *
>(where);
133 RDeleter::operator()(objPtr, dtorOnly);
140 return std::make_unique<RDeleter>();
145 auto valuePtr =
value.GetPtr<
void>();
146 auto arrayPtr =
static_cast<unsigned char *
>(valuePtr.get());
147 std::vector<RValue>
result;
170 if (!itemField->GetTypeAlias().empty())
171 fTypeAlias =
"ROOT::VecOps::RVec<" + itemField->GetTypeAlias() +
">";
172 Attach(std::move(itemField),
"_0");
181 auto grandChildFields =
fSubfields[0]->GetMutableSubfields();
182 if (grandChildFields[0]->
IsSimple()) {
193 return std::make_unique<RRVecField>(newName, std::move(newItemField));
200 std::size_t nbytes = 0;
205 for (std::int32_t i = 0; i < *sizePtr; ++i) {
219 if (nItems >
static_cast<std::size_t
>(std::numeric_limits<std::int32_t>::max())) {
224 const std::size_t oldSize = *sizePtr;
226 if (oldSize == nItems) {
235 const bool owns = (*capacityPtr != -1);
237 const bool needsDestruct = owns && itemDeleter;
241 for (std::size_t i = nItems; i < oldSize; ++i) {
242 itemDeleter->operator()(*beginPtr + (i * itemSize),
true );
247 if (std::int32_t(nItems) > *capacityPtr) {
251 for (std::size_t i = 0u; i < oldSize; ++i) {
252 itemDeleter->operator()(*beginPtr + (i * itemSize),
true );
263 *beginPtr =
static_cast<unsigned char *
>(
malloc(nItems * itemSize));
265 *capacityPtr = nItems;
268 if (needsConstruct) {
269 for (std::size_t i = 0u; i < oldSize; ++i)
276 if (needsConstruct) {
277 for (std::size_t i = oldSize; i < nItems; ++i)
292 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
302 for (std::size_t i = 0; i < nItems; ++i) {
315 bulkSpec.
fAuxData->resize(
sizeof(std::size_t));
318 const auto itemValueSize = *
reinterpret_cast<std::size_t *
>(bulkSpec.
fAuxData->data());
319 unsigned char *itemValueArray = bulkSpec.
fAuxData->data() +
sizeof(std::size_t);
326 *beginPtr = itemValueArray;
327 *sizePtr = collectionSize;
335 std::size_t nValues = 1;
336 std::size_t nItems = collectionSize;
337 while (nRemainingValues > 0) {
341 const std::size_t nBatch = std::min(nRemainingValues, nElementsUntilPageEnd);
342 for (std::size_t i = 0; i < nBatch; ++i) {
343 const auto size = offsets[i] - lastOffset;
345 reinterpret_cast<unsigned char *
>(bulkSpec.
fValues) + (nValues + i) *
fValueSize);
346 *beginPtr = itemValueArray + nItems * itemValueSize;
351 lastOffset = offsets[i];
353 nRemainingValues -= nBatch;
357 bulkSpec.
fAuxData->resize(
sizeof(std::size_t) + nItems * itemValueSize);
359 const auto delta = itemValueArray - (bulkSpec.
fAuxData->data() +
sizeof(std::size_t));
361 auto beginPtrAsUChar =
reinterpret_cast<unsigned char *
>(bulkSpec.
fValues);
362 for (std::size_t i = 0; i < bulkSpec.
fCount; ++i) {
363 *
reinterpret_cast<unsigned char **
>(beginPtrAsUChar) -= delta;
370 return RBulkSpec::kAllSet;
380 return representations;
400 if (fieldDesc.GetTypeName().rfind(
"std::array<", 0) == 0) {
401 auto substitute = std::make_unique<RArrayAsRVecField>(
418 void **beginPtr =
new (where)(
void *)(
nullptr);
419 std::int32_t *sizePtr =
new (
reinterpret_cast<void *
>(beginPtr + 1)) std::int32_t(0);
420 new (sizePtr + 1) std::int32_t(-1);
428 for (std::int32_t i = 0; i < *sizePtr; ++i) {
434 RDeleter::operator()(objPtr, dtorOnly);
448 std::vector<RValue>
result;
450 for (std::int32_t i = 0; i < *sizePtr; ++i) {
475 std::optional<std::string_view> emulatedFromType)
481 if (emulatedFromType && !emulatedFromType->empty())
484 if (!itemField->GetTypeAlias().empty())
485 fTypeAlias =
"std::vector<" + itemField->GetTypeAlias() +
">";
489 Attach(std::move(itemField),
"_0");
497std::unique_ptr<ROOT::RVectorField>
500 return std::unique_ptr<ROOT::RVectorField>(
new RVectorField(fieldName, itemField->Clone(
"_0"),
""));
507 auto emulatedFromType = isUntyped ? std::make_optional(
GetTypeName()) : std::nullopt;
508 return std::unique_ptr<ROOT::RVectorField>(
new RVectorField(newName, std::move(newItemField), emulatedFromType));
513 auto typedValue =
static_cast<const std::vector<char> *
>(from);
518 auto count = typedValue->size() /
fItemSize;
520 std::size_t nbytes = 0;
526 for (
unsigned i = 0; i < count; ++i) {
539 auto typedValue =
static_cast<std::vector<char> *
>(
vec);
543 const auto oldNItems = typedValue->size() / itemSize;
544 const auto availNItems = typedValue->capacity() / itemSize;
545 const bool canRealloc = availNItems < nItems;
546 bool allDeallocated =
false;
548 allDeallocated = canRealloc;
549 for (std::size_t i = allDeallocated ? 0 : nItems; i < oldNItems; ++i) {
550 itemDeleter->operator()(typedValue->data() + (i * itemSize),
true );
553 typedValue->resize(nItems * itemSize);
555 for (std::size_t i = allDeallocated ? 0 : oldNItems; i < nItems; ++i) {
563 auto typedValue =
static_cast<std::vector<char> *
>(to);
567 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
578 for (std::size_t i = 0; i < nItems; ++i) {
590 return representations;
610 if (fieldDesc.GetTypeName().rfind(
"std::array<", 0) == 0) {
611 auto substitute = std::make_unique<RArrayAsVectorField>(
626 auto vecPtr =
static_cast<std::vector<char> *
>(objPtr);
630 auto nItems = vecPtr->size() /
fItemSize;
631 for (std::size_t i = 0; i < nItems; ++i) {
635 std::destroy_at(vecPtr);
636 RDeleter::operator()(objPtr, dtorOnly);
643 return std::make_unique<RVectorDeleter>();
666 auto typedValue =
static_cast<const std::vector<bool> *
>(from);
667 auto count = typedValue->size();
668 for (
unsigned i = 0; i < count; ++i) {
669 bool bval = (*typedValue)[i];
670 CallAppendOn(*fSubfields[0], &bval);
673 fPrincipalColumn->
Append(&fNWritten);
674 return count + fPrincipalColumn->GetElement()->GetPackedSize();
677void ROOT::RField<std::vector<bool>>::ReadGlobalImpl(
ROOT::NTupleSize_t globalIndex,
void *to)
679 auto typedValue =
static_cast<std::vector<bool> *
>(to);
681 if (fOnDiskNRepetitions == 0) {
684 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
685 typedValue->resize(nItems);
686 for (std::size_t i = 0; i < nItems; ++i) {
688 CallReadOn(*fSubfields[0], collectionStart + i, &bval);
689 (*typedValue)[i] = bval;
692 typedValue->resize(fOnDiskNRepetitions);
693 for (std::size_t i = 0; i < fOnDiskNRepetitions; ++i) {
695 CallReadOn(*fSubfields[0], globalIndex * fOnDiskNRepetitions + i, &bval);
696 (*typedValue)[i] = bval;
701void ROOT::RField<std::vector<bool>>::ReadInClusterImpl(ROOT::RNTupleLocalIndex localIndex,
void *to)
703 auto typedValue =
static_cast<std::vector<bool> *
>(to);
705 if (fOnDiskNRepetitions == 0) {
708 fPrincipalColumn->GetCollectionInfo(localIndex, &collectionStart, &nItems);
709 typedValue->resize(nItems);
710 for (std::size_t i = 0; i < nItems; ++i) {
712 CallReadOn(*fSubfields[0], collectionStart + i, &bval);
713 (*typedValue)[i] = bval;
716 typedValue->resize(fOnDiskNRepetitions);
717 for (std::size_t i = 0; i < fOnDiskNRepetitions; ++i) {
719 CallReadOn(*fSubfields[0], localIndex * fOnDiskNRepetitions + i, &bval);
720 (*typedValue)[i] = bval;
725const ROOT::RFieldBase::RColumnRepresentations &ROOT::RField<std::vector<bool>>::GetColumnRepresentations()
const
732 return representations;
735void ROOT::RField<std::vector<bool>>::GenerateColumns()
738 GenerateColumnsImpl<ROOT::Internal::RColumnIndex>();
741void ROOT::RField<std::vector<bool>>::GenerateColumns(
const ROOT::RNTupleDescriptor &desc)
743 if (fOnDiskNRepetitions == 0)
744 GenerateColumnsImpl<ROOT::Internal::RColumnIndex>(desc);
747void ROOT::RField<std::vector<bool>>::ReconcileOnDiskField(
const RNTupleDescriptor &desc)
749 const auto &fieldDesc = desc.GetFieldDescriptor(GetOnDiskId());
751 if (fieldDesc.GetTypeName().rfind(
"std::array<", 0) == 0) {
752 EnsureMatchingOnDiskField(desc, kDiffTypeName | kDiffStructure | kDiffNRepetitions).ThrowOnError();
754 if (fieldDesc.GetNRepetitions() == 0) {
755 throw RException(
R__FAIL(
"fixed-size array --> std::vector<bool>: expected repetition count > 0\n" +
759 throw RException(
R__FAIL(
"fixed-size array --> std::vector<bool>: expected plain on-disk field\n" +
762 fOnDiskNRepetitions = fieldDesc.GetNRepetitions();
764 EnsureMatchingOnDiskCollection(desc).ThrowOnError();
768std::vector<ROOT::RFieldBase::RValue> ROOT::RField<std::vector<bool>>::SplitValue(
const RValue &
value)
const
770 const auto &typedValue =
value.GetRef<std::vector<bool>>();
771 auto count = typedValue.size();
772 std::vector<RValue>
result;
774 for (
unsigned i = 0; i < count; ++i) {
776 result.emplace_back(fSubfields[0]->BindValue(std::shared_ptr<bool>(
new bool(
true))));
778 result.emplace_back(fSubfields[0]->BindValue(std::shared_ptr<bool>(
new bool(
false))));
784void ROOT::RField<std::vector<bool>>::AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor)
const
792 std::size_t arrayLength)
798 if (!itemField->GetTypeAlias().empty())
799 fTypeAlias =
"ROOT::VecOps::RVec<" + itemField->GetTypeAlias() +
">";
800 Attach(std::move(itemField),
"_0");
810 return std::make_unique<RArrayAsRVecField>(newName, std::move(newItemField),
fArrayLength);
817 void **beginPtr =
new (where)(
void *)(
nullptr);
818 std::int32_t *sizePtr =
new (
static_cast<void *
>(beginPtr + 1)) std::int32_t(0);
819 new (sizePtr + 1) std::int32_t(-1);
865 if (fieldDesc.GetTypeName().rfind(
"std::array<", 0) != 0) {
878 auto arrayPtr =
value.GetPtr<
unsigned char>().get();
879 std::vector<ROOT::RFieldBase::RValue>
result;
896 std::size_t arrayLength)
902 if (!itemField->GetTypeAlias().empty())
903 fTypeAlias =
"std::vector<" + itemField->GetTypeAlias() +
">";
904 Attach(std::move(itemField),
"_0");
912 return std::make_unique<RArrayAsVectorField>(newName, std::move(newItemField),
fArrayLength);
917 throw RException(
R__FAIL(
"RArrayAsVectorField fields must only be used for reading"));
924 return std::make_unique<RVectorField::RVectorDeleter>();
929 auto typedValue =
static_cast<std::vector<char> *
>(to);
946 auto typedValue =
static_cast<std::vector<char> *
>(to);
966 if (fieldDesc.GetTypeName().rfind(
"std::array<", 0) != 0) {
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
if(isa< VarDecl >(D)||isa< FieldDecl >(D)||isa< EnumConstantDecl >(D))
#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 char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Abstract base class for classes implementing the visitor design pattern.
virtual void VisitVectorField(const ROOT::RVectorField &field)
virtual void VisitVectorBoolField(const ROOT::RField< std::vector< bool > > &field)
virtual void VisitRVecField(const ROOT::RRVecField &field)
virtual void VisitArrayAsRVecField(const ROOT::RArrayAsRVecField &field)
virtual void VisitArrayAsVectorField(const ROOT::RArrayAsVectorField &field)
virtual void VisitArrayField(const ROOT::RArrayField &field)
The in-memory representation of a 32bit or 64bit on-disk index column.
Abstract interface to read data from an ntuple.
const RSharedDescriptorGuard GetSharedDescriptorGuard() const
Takes the read lock for the descriptor. Multiple threads can take the lock concurrently....
std::unique_ptr< RDeleter > fItemDeleter
void ReadInClusterImpl(RNTupleLocalIndex localIndex, void *to) final
RArrayAsRVecField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField, std::size_t arrayLength)
Constructor of the field.
std::size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::unique_ptr< RDeleter > GetDeleter() const final
Returns an RRVecField::RRVecDeleter.
std::size_t fArrayLength
The size of a child field's item.
std::size_t fItemSize
Sub field deleter or nullptr for simple fields.
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
The size of a value of this field, i.e. an RVec.
std::vector< RFieldBase::RValue > SplitValue(const RFieldBase::RValue &value) const final
Creates the list of direct child values given an existing value for this field.
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
std::size_t fValueSize
The length of the arrays in 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::unique_ptr< RDeleter > GetDeleter() const final
Returns an RVectorField::RVectorDeleter.
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
std::unique_ptr< RDeleter > fItemDeleter
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::size_t fArrayLength
The size of a child field's item.
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
RArrayAsVectorField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField, std::size_t arrayLength)
The itemField argument represents the inner item of the on-disk array, i.e.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
void ReadInClusterImpl(RNTupleLocalIndex localIndex, void *to) final
std::vector< RFieldBase::RValue > SplitValue(const RFieldBase::RValue &value) const final
Creates the list of direct child values given an existing value for this field.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
The length of the arrays in this field.
std::size_t fItemSize
Sub field deleter or nullptr for simple fields.
std::unique_ptr< RDeleter > fItemDeleter
void operator()(void *objPtr, bool dtorOnly) final
Template specializations for C++ std::array and C-style arrays.
std::unique_ptr< RDeleter > GetDeleter() const final
RArrayField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField, std::size_t arrayLength)
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
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.
std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec) final
General implementation of bulk read.
void ReadInClusterImpl(RNTupleLocalIndex localIndex, 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...
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
Base class for all ROOT issued exceptions.
The list of column representations a field can have.
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 size_t GetValueSize() const =0
The number of bytes taken by a value of the appropriate type.
void Attach(std::unique_ptr< RFieldBase > child, std::string_view expectedChildName="")
Add a new subfield to the list of nested fields.
ROOT::Internal::RColumn * fPrincipalColumn
All fields that have columns have a distinct main column.
std::vector< std::unique_ptr< RFieldBase > > fSubfields
Collections and classes own subfields.
@ kTraitEmulatedField
This field is a user defined type that was missing dictionaries and was reconstructed from the on-dis...
@ kTraitTriviallyDestructible
The type is cleaned up just by freeing its memory. I.e. the destructor performs a no-op.
@ kTraitTriviallyConstructible
No constructor needs to be called, i.e.
@ kTraitMappable
A field of a fundamental type that can be directly mapped via RField<T>::Map(), i....
static std::unique_ptr< RDeleter > GetDeleterOf(const RFieldBase &other)
static ROOT::Internal::RColumn * GetPrincipalColumnOf(const RFieldBase &other)
Fields may need direct access to the principal column of their subfields, e.g. in RRVecField::ReadBul...
RResult< void > EnsureMatchingOnDiskCollection(const RNTupleDescriptor &desc) const
Convenience wrapper for the common case of calling EnsureMatchinOnDiskField() for collections.
std::size_t Append(const void *from)
Write the given value into columns.
std::string GetQualifiedFieldName() const
Returns the field name and parent field names separated by dots (grandparent.parent....
const std::string & GetFieldName() const
RResult< void > EnsureMatchingOnDiskField(const RNTupleDescriptor &desc, std::uint32_t ignoreBits=0) const
Compares the field to the corresponding on-disk field information in the provided descriptor.
static std::size_t CallAppendOn(RFieldBase &other, const void *from)
Allow derived classes to call Append() and Read() on other (sub)fields.
std::uint32_t fTraits
Properties of the type that allow for optimizations of collections of that type.
RFieldBase(std::string_view name, std::string_view type, ROOT::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::string fTypeAlias
A typedef or using name that was used when creating the field.
std::uint32_t GetTraits() const
const std::string & GetTypeName() const
void GenerateColumnsImpl(const ColumnRepresentation_t &representation, std::uint16_t representationIndex)
Helpers for generating columns.
RValue BindValue(std::shared_ptr< void > objPtr)
Creates a value from a memory location with an already constructed object.
static void CallReadOn(RFieldBase &other, RNTupleLocalIndex localIndex, void *to)
ROOT::DescriptorId_t GetOnDiskId() const
std::unique_ptr< RFieldBase > Clone(std::string_view newName) const
Copies the field and its subfields using a possibly new name and a new, unconnected set of columns.
static void CallConstructValueOn(const RFieldBase &other, void *where)
Allow derived classes to call ConstructValue(void *) and GetDeleter() on other (sub)fields.
RResult< void > EnsureMatchingTypePrefix(const RNTupleDescriptor &desc, const std::vector< std::string > &prefixes) const
Many fields accept a range of type prefixes for schema evolution, e.g.
virtual std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec)
General implementation of bulk read.
@ kDiffStructure
The in-memory field and the on-disk field differ in their structural roles.
@ kDiffTypeName
The in-memory field and the on-disk field have different type names.
@ kDiffNRepetitions
The in-memory field and the on-disk field have different repetition counts.
Classes with dictionaries that can be inspected by TClass.
The on-storage metadata of an RNTuple.
const RFieldDescriptor & GetFieldDescriptor(ROOT::DescriptorId_t fieldId) const
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
ROOT::NTupleSize_t GetIndexInCluster() const
void operator()(void *objPtr, bool dtorOnly) final
std::unique_ptr< RDeleter > fItemDeleter
std::size_t fItemAlignment
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::size_t fBulkNRepetition
std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec) final
General implementation of bulk read.
ROOT::Internal::RColumnIndex fNWritten
RRVecField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::unique_ptr< RFieldBase > BeforeConnectPageSource(ROOT::Internal::RPageSource &pageSource) final
Called by ConnectPageSource() before connecting; derived classes may override this as appropriate,...
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.
static unsigned char * ResizeRVec(void *rvec, std::size_t nItems, std::size_t itemSize, const RFieldBase *itemField, RDeleter *itemDeleter)
std::unique_ptr< RDeleter > fItemDeleter
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
RFieldBase * fBulkSubfield
May be a direct PoD subfield or a sub-subfield of a fixed-size array of PoD.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
std::unique_ptr< RDeleter > GetDeleter() const final
void operator()(void *objPtr, bool dtorOnly) final
std::unique_ptr< RDeleter > fItemDeleter
static std::unique_ptr< RVectorField > CreateUntyped(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
std::unique_ptr< RFieldBase > BeforeConnectPageSource(ROOT::Internal::RPageSource &pageSource) final
Called by ConnectPageSource() before connecting; derived classes may override this as appropriate,...
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
static void ResizeVector(void *vec, std::size_t nItems, std::size_t itemSize, const RFieldBase &itemField, RDeleter *itemDeleter)
RVectorField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField, std::optional< std::string_view > emulatedFromType)
Creates a possibly-untyped VectorField.
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
std::unique_ptr< RDeleter > fItemDeleter
ROOT::Internal::RColumnIndex fNWritten
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::unique_ptr< RDeleter > GetDeleter() const final
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
std::tuple< unsigned char **, std::int32_t *, std::int32_t * > GetRVecDataMembers(void *rvecPtr)
Retrieve the addresses of the data members of a generic RVec from a pointer to the beginning of the R...
void DestroyRVecWithChecks(std::size_t alignOfT, unsigned char **beginPtr, std::int32_t *capacityPtr)
std::string GetNormalizedInteger(const std::string &intTemplateArg)
Appends 'll' or 'ull' to the where necessary and strips the suffix if not needed.
std::string GetTypeTraceReport(const RFieldBase &field, const RNTupleDescriptor &desc)
Prints the hierarchy of types with their field names and field IDs for the given in-memory field and ...
std::size_t EvalRVecAlignment(std::size_t alignOfSubfield)
std::size_t EvalRVecValueSize(std::size_t alignOfT, std::size_t sizeOfT, std::size_t alignOfRVecT)
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
constexpr DescriptorId_t kInvalidDescriptorId
ENTupleStructure
The fields in the RNTuple data model tree can carry different structural information about the type s...
Input parameter to RFieldBase::ReadBulk() and RFieldBase::ReadBulkImpl().
RNTupleLocalIndex fFirstIndex
Start of the bulk range.
void * fValues
The destination area, which has to be an array of valid objects of the correct type large enough to h...
std::size_t fCount
Size of the bulk range.
std::vector< unsigned char > * fAuxData
Reference to memory owned by the RBulkValues class.