20 auto *
vec =
static_cast<std::vector<char> *
>(
valuePtr.get());
25 std::vector<ROOT::RFieldBase::RValue>
result;
27 for (
unsigned i = 0; i <
nItems; ++i) {
35 return sizeof(std::vector<char>);
40 return alignof(std::vector<char>);
71 "std::array<" +
itemField->GetTypeName() +
"," +
87 auto newItemField = fSubfields[0]->Clone(fSubfields[0]->GetFieldName());
94 if (fSubfields[0]->IsSimple()) {
95 GetPrincipalColumnOf(*fSubfields[0])->AppendV(from, fArrayLength);
96 nbytes += fArrayLength * GetPrincipalColumnOf(*fSubfields[0])->GetElement()->GetPackedSize();
98 auto arrayPtr =
static_cast<const unsigned char *
>(from);
99 for (
unsigned i = 0; i < fArrayLength; ++i) {
100 nbytes += CallAppendOn(*fSubfields[0],
arrayPtr + (i * fItemSize));
108 if (fSubfields[0]->IsSimple()) {
109 GetPrincipalColumnOf(*fSubfields[0])->ReadV(
globalIndex * fArrayLength, fArrayLength, to);
111 auto arrayPtr =
static_cast<unsigned char *
>(to);
112 for (
unsigned i = 0; i < fArrayLength; ++i) {
120 if (fSubfields[0]->IsSimple()) {
121 GetPrincipalColumnOf(*fSubfields[0])->ReadV(
localIndex * fArrayLength, fArrayLength, to);
123 auto arrayPtr =
static_cast<unsigned char *
>(to);
124 for (
unsigned i = 0; i < fArrayLength; ++i) {
125 CallReadOn(*fSubfields[0],
localIndex * fArrayLength + i,
arrayPtr + (i * fItemSize));
132 if (!fSubfields[0]->IsSimple())
135 GetPrincipalColumnOf(*fSubfields[0])
137 return RBulkSpec::kAllSet;
142 static const std::vector<std::string>
prefixes = {
"std::array<"};
144 EnsureMatchingOnDiskField(desc, kDiffTypeName).ThrowOnError();
145 EnsureMatchingTypePrefix(desc,
prefixes).ThrowOnError();
150 if (fSubfields[0]->GetTraits() & kTraitTriviallyConstructible)
154 for (
unsigned i = 0; i < fArrayLength; ++i) {
155 CallConstructValueOn(*fSubfields[0],
arrayPtr + (i * fItemSize));
162 for (
unsigned i = 0; i < fArrayLength; ++i) {
163 fItemDeleter->operator()(
reinterpret_cast<unsigned char *
>(
objPtr) + i * fItemSize,
true );
171 if (!(fSubfields[0]->GetTraits() & kTraitTriviallyDestructible))
172 return std::make_unique<RArrayDeleter>(fItemSize, fArrayLength, GetAlignment(), GetDeleterOf(*fSubfields[0]));
173 return std::make_unique<RDeleter>(GetAlignment());
180 std::vector<RValue>
result;
181 result.reserve(fArrayLength);
182 for (
unsigned i = 0; i < fArrayLength; ++i) {
183 result.emplace_back(fSubfields[0]->BindValue(std::shared_ptr<void>(
valuePtr,
arrayPtr + (i * fItemSize))));
190 visitor.VisitArrayField(*
this);
201 if (
itemField->GetAlignment() >
sizeof(std::max_align_t)) {
230 auto newItemField = fSubfields[0]->Clone(fSubfields[0]->GetFieldName());
239 if (fSubfields[0]->IsSimple() && *
sizePtr) {
241 nbytes += *
sizePtr * GetPrincipalColumnOf(*fSubfields[0])->GetElement()->GetPackedSize();
243 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
244 nbytes += CallAppendOn(*fSubfields[0], *
beginPtr + i * fItemSize);
249 fPrincipalColumn->Append(&fNWritten);
250 return nbytes + fPrincipalColumn->GetElement()->GetPackedSize();
257 if (
nItems >
static_cast<std::size_t
>(std::numeric_limits<std::int32_t>::max())) {
289 for (std::size_t i = 0
u; i <
oldSize; ++i) {
307 for (std::size_t i = 0
u; i <
oldSize; ++i)
332 auto begin = ResizeRVec(to,
nItems, fItemSize, fSubfields[0].get(), fItemDeleter.get());
334 if (fSubfields[0]->IsSimple() &&
nItems) {
340 for (std::size_t i = 0; i <
nItems; ++i) {
341 CallReadOn(*fSubfields[0],
collectionStart + i, begin + (i * fItemSize));
353 bulkSpec.fAuxData->resize(
sizeof(std::size_t));
354 *
reinterpret_cast<std::size_t *
>(
bulkSpec.fAuxData->data()) = fBulkNRepetition * fBulkSubfield->GetValueSize();
380 for (std::size_t i = 0; i <
nBatch; ++i) {
400 for (std::size_t i = 0; i <
bulkSpec.fCount; ++i) {
406 GetPrincipalColumnOf(*fBulkSubfield)
408 return RBulkSpec::kAllSet;
438 if (
fieldDesc.GetTypeName().rfind(
"std::array<", 0) == 0) {
439 auto substitute = std::make_unique<RArrayAsRVecField>(
440 GetFieldName(), fSubfields[0]->Clone(fSubfields[0]->GetFieldName()),
fieldDesc.GetNRepetitions());
449 EnsureMatchingOnDiskCollection(desc).ThrowOnError();
457 std::int32_t *
sizePtr =
new (
reinterpret_cast<void *
>(
beginPtr + 1)) std::int32_t(0);
458 new (
sizePtr + 1) std::int32_t(-1);
466 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
467 fItemDeleter->operator()(*
beginPtr + i * fItemSize,
true );
478 return std::make_unique<RRVecDeleter>(fSubfields[0]->GetAlignment(), fItemSize, GetDeleterOf(*fSubfields[0]));
479 return std::make_unique<RRVecDeleter>(fSubfields[0]->GetAlignment());
486 std::vector<RValue>
result;
488 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
490 fSubfields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(), *
beginPtr + i * fItemSize)));
521 R__FAIL(std::string(
"Unsupported vector item alignment: ") + std::to_string(
itemField->GetAlignment())));
540std::unique_ptr<ROOT::RVectorField>
548 auto newItemField = fSubfields[0]->Clone(fSubfields[0]->GetFieldName());
549 auto isUntyped = GetTypeName().empty() || ((fTraits & kTraitEmulatedField) != 0);
556 auto typedValue =
static_cast<const std::vector<char> *
>(from);
565 if (fSubfields[0]->IsSimple() && count) {
566 GetPrincipalColumnOf(*fSubfields[0])->AppendV(
typedValue->data(), count);
567 nbytes += count * GetPrincipalColumnOf(*fSubfields[0])->GetElement()->GetPackedSize();
569 for (
unsigned i = 0; i < count; ++i) {
570 nbytes += CallAppendOn(*fSubfields[0],
typedValue->data() + (i * fItemSize));
575 fPrincipalColumn->Append(&fNWritten);
576 return nbytes + fPrincipalColumn->GetElement()->GetPackedSize();
613 static_assert(kMaxItemAlignment == 4096);
633 if (!(
itemField.GetTraits() & kTraitTriviallyConstructible)) {
642 auto typedValue =
static_cast<std::vector<char> *
>(to);
648 if (fSubfields[0]->IsSimple()) {
655 ResizeVector(to,
nItems, fItemSize, *fSubfields[0], fItemDeleter.get());
657 for (std::size_t i = 0; i <
nItems; ++i) {
689 if (
fieldDesc.GetTypeName().rfind(
"std::array<", 0) == 0) {
690 auto substitute = std::make_unique<RArrayAsVectorField>(
691 GetFieldName(), fSubfields[0]->Clone(fSubfields[0]->GetFieldName()),
fieldDesc.GetNRepetitions());
700 EnsureMatchingOnDiskCollection(desc).ThrowOnError();
729 for (std::size_t i = 0; i <
nItems; ++i) {
736 switch (fItemAlignment) {
737 case 1: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 1>
> *>(
objPtr));
break;
738 case 2: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 2>
> *>(
objPtr));
break;
739 case 4: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 4>
> *>(
objPtr));
break;
740 case 8: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 8>
> *>(
objPtr));
break;
741 case 16: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 16>
> *>(
objPtr));
break;
742 case 32: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 32>
> *>(
objPtr));
break;
743 case 64: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 64>
> *>(
objPtr));
break;
744 case 128: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 128>
> *>(
objPtr));
break;
745 case 256: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 256>
> *>(
objPtr));
break;
746 case 512: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage< 512>
> *>(
objPtr));
break;
747 case 1024: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage<1024>
> *>(
objPtr));
break;
748 case 2048: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage<2048>
> *>(
objPtr));
break;
749 case 4096: std::destroy_at(
static_cast<std::vector<Internal::RAlignedStorage<4096>
> *>(
objPtr));
break;
750 default:
throw ROOT::RException(
R__FAIL(std::string(
"Unsupported alignment: ") + std::to_string(fItemAlignment)));
781 visitor.VisitVectorField(*
this);
794 auto typedValue =
static_cast<const std::vector<bool> *
>(from);
796 for (
unsigned i = 0; i < count; ++i) {
797 bool bval = (*typedValue)[i];
798 CallAppendOn(*fSubfields[0], &
bval);
801 fPrincipalColumn->Append(&fNWritten);
802 return count + fPrincipalColumn->GetElement()->GetPackedSize();
807 auto typedValue =
static_cast<std::vector<bool> *
>(to);
809 if (fOnDiskNRepetitions == 0) {
814 for (std::size_t i = 0; i <
nItems; ++i) {
817 (*typedValue)[i] =
bval;
821 for (std::size_t i = 0; i < fOnDiskNRepetitions; ++i) {
823 CallReadOn(*fSubfields[0],
globalIndex * fOnDiskNRepetitions + i, &
bval);
824 (*typedValue)[i] =
bval;
831 auto typedValue =
static_cast<std::vector<bool> *
>(to);
833 if (fOnDiskNRepetitions == 0) {
838 for (std::size_t i = 0; i <
nItems; ++i) {
841 (*typedValue)[i] =
bval;
845 for (std::size_t i = 0; i < fOnDiskNRepetitions; ++i) {
847 CallReadOn(*fSubfields[0],
localIndex * fOnDiskNRepetitions + i, &
bval);
848 (*typedValue)[i] =
bval;
871 if (fOnDiskNRepetitions == 0)
877 const auto &
fieldDesc = desc.GetFieldDescriptor(GetOnDiskId());
879 if (
fieldDesc.GetTypeName().rfind(
"std::array<", 0) == 0) {
880 EnsureMatchingOnDiskField(desc, kDiffTypeName | kDiffStructure | kDiffNRepetitions).ThrowOnError();
883 throw RException(
R__FAIL(
"fixed-size array --> std::vector<bool>: expected repetition count > 0\n" +
887 throw RException(
R__FAIL(
"fixed-size array --> std::vector<bool>: expected plain on-disk field\n" +
890 fOnDiskNRepetitions =
fieldDesc.GetNRepetitions();
892 EnsureMatchingOnDiskCollection(desc).ThrowOnError();
900 std::vector<RValue>
result;
902 for (
unsigned i = 0; i < count; ++i) {
904 result.emplace_back(fSubfields[0]->BindValue(std::shared_ptr<bool>(
new bool(
true))));
906 result.emplace_back(fSubfields[0]->BindValue(std::shared_ptr<bool>(
new bool(
false))));
914 visitor.VisitVectorBoolField(*
this);
937 auto newItemField = fSubfields[0]->Clone(fSubfields[0]->GetFieldName());
938 return std::make_unique<RArrayAsRVecField>(
newName, std::move(
newItemField), fArrayLength);
946 std::int32_t *
sizePtr =
new (
static_cast<void *
>(
beginPtr + 1)) std::int32_t(0);
947 new (
sizePtr + 1) std::int32_t(-1);
953 return std::make_unique<RRVecField::RRVecDeleter>(fSubfields[0]->GetAlignment(), fItemSize,
954 GetDeleterOf(*fSubfields[0]));
956 return std::make_unique<RRVecField::RRVecDeleter>(fSubfields[0]->GetAlignment());
961 auto begin =
RRVecField::ResizeRVec(to, fArrayLength, fItemSize, fSubfields[0].get(), fItemDeleter.get());
963 if (fSubfields[0]->IsSimple()) {
964 GetPrincipalColumnOf(*fSubfields[0])->ReadV(
globalIndex * fArrayLength, fArrayLength, begin);
969 for (std::size_t i = 0; i < fArrayLength; ++i) {
970 CallReadOn(*fSubfields[0],
globalIndex * fArrayLength + i, begin + (i * fItemSize));
976 auto begin =
RRVecField::ResizeRVec(to, fArrayLength, fItemSize, fSubfields[0].get(), fItemDeleter.get());
978 if (fSubfields[0]->IsSimple()) {
979 GetPrincipalColumnOf(*fSubfields[0])->ReadV(
localIndex * fArrayLength, fArrayLength, begin);
984 for (std::size_t i = 0; i < fArrayLength; ++i) {
985 CallReadOn(*fSubfields[0],
localIndex * fArrayLength + i, begin + (i * fItemSize));
991 EnsureMatchingOnDiskField(desc, kDiffTypeName | kDiffStructure | kDiffNRepetitions).ThrowOnError();
993 if (
fieldDesc.GetTypeName().rfind(
"std::array<", 0) != 0) {
994 throw RException(
R__FAIL(
"RArrayAsRVecField " + GetQualifiedFieldName() +
" expects an on-disk array field\n" +
1007 std::vector<ROOT::RFieldBase::RValue>
result;
1008 result.reserve(fArrayLength);
1009 for (
unsigned i = 0; i < fArrayLength; ++i) {
1011 fSubfields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(),
arrayPtr + (i * fItemSize))));
1018 visitor.VisitArrayAsRVecField(*
this);
1039 auto newItemField = fSubfields[0]->Clone(fSubfields[0]->GetFieldName());
1040 return std::make_unique<RArrayAsVectorField>(
newName, std::move(
newItemField), fArrayLength);
1045 throw RException(
R__FAIL(
"RArrayAsVectorField fields must only be used for reading"));
1056 return std::make_unique<RVectorField::RVectorDeleter>(fItemSize, fSubfields[0]->GetAlignment(),
1057 GetDeleterOf(*fSubfields[0]));
1059 return std::make_unique<RVectorField::RVectorDeleter>(fSubfields[0]->GetAlignment());
1064 auto typedValue =
static_cast<std::vector<char> *
>(to);
1066 if (fSubfields[0]->IsSimple()) {
1067 typedValue->resize(fArrayLength * fItemSize);
1068 GetPrincipalColumnOf(*fSubfields[0])->ReadV(
globalIndex * fArrayLength, fArrayLength,
typedValue->data());
1074 for (std::size_t i = 0; i < fArrayLength; ++i) {
1081 auto typedValue =
static_cast<std::vector<char> *
>(to);
1083 if (fSubfields[0]->IsSimple()) {
1084 typedValue->resize(fArrayLength * fItemSize);
1085 GetPrincipalColumnOf(*fSubfields[0])->ReadV(
localIndex * fArrayLength, fArrayLength,
typedValue->data());
1091 for (std::size_t i = 0; i < fArrayLength; ++i) {
1092 CallReadOn(*fSubfields[0],
localIndex * fArrayLength + i,
typedValue->data() + (i * fItemSize));
1098 EnsureMatchingOnDiskField(desc, kDiffTypeName | kDiffStructure | kDiffNRepetitions);
1101 if (
fieldDesc.GetTypeName().rfind(
"std::array<", 0) != 0) {
1102 throw RException(
R__FAIL(
"RArrayAsVectorField " + GetQualifiedFieldName() +
" expects an on-disk array field\n" +
1124 visitor.VisitArrayAsVectorField(*
this);
#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
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 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.
The in-memory representation of a 32bit or 64bit on-disk index column.
Abstract interface to read data from an ntuple.
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
What alignof(T) for this type returns.
std::unique_ptr< RDeleter > GetDeleter() const final
Returns an RRVecField::RRVecDeleter.
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
What sizeof(T) for this type returns.
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
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
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
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 GetAlignment() const final
What alignof(T) for this type returns.
std::size_t GetValueSize() const final
What sizeof(T) for this type returns.
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
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.
void Attach(std::unique_ptr< RFieldBase > child, std::string_view expectedChildName="")
Add a new subfield to the list of nested fields.
std::vector< std::unique_ptr< RFieldBase > > fSubfields
Collections and classes own subfields.
static std::unique_ptr< RDeleter > GetDeleterOf(const RFieldBase &other)
std::uint32_t fTraits
Properties of the type that allow for optimizations of collections of that type.
@ 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.
std::string fTypeAlias
A typedef or using name that was used when creating the field.
std::uint32_t GetTraits() const
virtual std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec)
General implementation of bulk read.
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...
void operator()(void *objPtr, bool dtorOnly) final
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
What alignof(T) for this type returns.
std::size_t fBulkNRepetition
std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec) final
General implementation of bulk read.
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
What sizeof(T) for this type returns.
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
RVectorDeleter(std::size_t itemAlignment)
Template specializations for C++ std::vector.
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::size_t GetValueSize() const final
What sizeof(T) for this type returns.
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::size_t GetAlignment() const final
What alignof(T) for this type returns.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
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
static constexpr std::size_t kMaxItemAlignment
Maximum alignment of the vector's value 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...
Storage type whose alignment matches AlignT bytes.
Input parameter to RFieldBase::ReadBulk() and RFieldBase::ReadBulkImpl().