44std::vector<std::string> TokenizeTypeList(std::string templateType) {
45 std::vector<std::string> result;
46 if (templateType.empty())
49 const char *eol = templateType.data() + templateType.length();
50 const char *typeBegin = templateType.data();
51 const char *typeCursor = templateType.data();
52 unsigned int nestingLevel = 0;
53 while (typeCursor != eol) {
54 switch (*typeCursor) {
62 if (nestingLevel == 0) {
63 result.push_back(std::string(typeBegin, typeCursor - typeBegin));
64 typeBegin = typeCursor + 1;
70 result.push_back(std::string(typeBegin, typeCursor - typeBegin));
81 column->Connect(fieldId, &pageStorage);
90 : fName(
name),
fType(
type), fStructure(structure), fNRepetitions(nRepetitions), fIsSimple(isSimple),
91 fParent(nullptr), fPrincipalColumn(nullptr)
102 std::string normalizedType(typeName);
103 normalizedType.erase(remove_if(normalizedType.begin(), normalizedType.end(), isspace), normalizedType.end());
105 if (normalizedType ==
"Bool_t") normalizedType =
"bool";
106 if (normalizedType ==
"Float_t") normalizedType =
"float";
107 if (normalizedType ==
"Double_t") normalizedType =
"double";
108 if (normalizedType ==
"UChar_t") normalizedType =
"std::uint8_t";
109 if (normalizedType ==
"unsigned char") normalizedType =
"std::uint8_t";
110 if (normalizedType ==
"uint8_t") normalizedType =
"std::uint8_t";
111 if (normalizedType ==
"Int_t") normalizedType =
"std::int32_t";
112 if (normalizedType ==
"int") normalizedType =
"std::int32_t";
113 if (normalizedType ==
"int32_t") normalizedType =
"std::int32_t";
114 if (normalizedType ==
"unsigned") normalizedType =
"std::uint32_t";
115 if (normalizedType ==
"unsigned int") normalizedType =
"std::uint32_t";
116 if (normalizedType ==
"UInt_t") normalizedType =
"std::uint32_t";
117 if (normalizedType ==
"uint32_t") normalizedType =
"std::uint32_t";
118 if (normalizedType ==
"ULong64_t") normalizedType =
"std::uint64_t";
119 if (normalizedType ==
"uint64_t") normalizedType =
"std::uint64_t";
120 if (normalizedType ==
"string") normalizedType =
"std::string";
121 if (normalizedType.substr(0, 7) ==
"vector<") normalizedType =
"std::" + normalizedType;
122 if (normalizedType.substr(0, 6) ==
"array<") normalizedType =
"std::" + normalizedType;
123 if (normalizedType.substr(0, 8) ==
"variant<") normalizedType =
"std::" + normalizedType;
125 if (normalizedType ==
"ROOT::Experimental::ClusterSize_t")
return new RField<ClusterSize_t>(fieldName);
126 if (normalizedType ==
"bool")
return new RField<bool>(fieldName);
131 if (normalizedType ==
"float")
return new RField<float>(fieldName);
132 if (normalizedType ==
"double")
return new RField<double>(fieldName);
135 if (normalizedType.substr(0, 12) ==
"std::vector<") {
136 std::string itemTypeName = normalizedType.substr(12, normalizedType.length() - 13);
137 auto itemField = Create(itemTypeName, itemTypeName);
138 return new RFieldVector(fieldName, std::unique_ptr<Detail::RFieldBase>(itemField));
142 if (normalizedType.substr(0, 19) ==
"ROOT::VecOps::RVec<") {
143 std::string itemTypeName = normalizedType.substr(19, normalizedType.length() - 20);
144 auto itemField = Create(itemTypeName, itemTypeName);
145 return new RFieldVector(fieldName, std::unique_ptr<Detail::RFieldBase>(itemField));
147 if (normalizedType.substr(0, 11) ==
"std::array<") {
148 auto arrayDef = TokenizeTypeList(normalizedType.substr(11, normalizedType.length() - 12));
150 auto arrayLength = std::stoi(arrayDef[1]);
151 auto itemField = Create(arrayDef[0], arrayDef[0]);
152 return new RFieldArray(fieldName, std::unique_ptr<Detail::RFieldBase>(itemField), arrayLength);
154#if __cplusplus >= 201703L
155 if (normalizedType.substr(0, 13) ==
"std::variant<") {
156 auto innerTypes = TokenizeTypeList(normalizedType.substr(13, normalizedType.length() - 14));
157 std::vector<RFieldBase *> items;
158 for (
unsigned int i = 0; i < innerTypes.size(); ++i) {
159 items.emplace_back(Create(
"variant" + std::to_string(i), innerTypes[i]));
161 return new RFieldVariant(fieldName, items);
170 R__ERROR_HERE(
"NTuple") <<
"Field " << fieldName <<
" has unknown type " << normalizedType;
188 void *where =
malloc(GetValueSize());
190 return GenerateValue(where);
200 std::unique_ptr<ROOT::Experimental::Detail::RFieldBase> child)
202 child->fParent =
this;
203 child->SetOrder(fSubFields.size()+1);
204 fSubFields.emplace_back(std::move(child));
209 for (
auto& column : fColumns) {
217 this->AcceptVisitor(visitor, level);
219 for (
const auto &fieldPtr: fSubFields) {
220 fieldPtr->TraverseVisitor(visitor, level);
231 if (fSubFields.empty())
return RIterator(
this, -1);
232 return RIterator(this->fSubFields[0].get(), 0);
246 auto itr = fStack.rbegin();
247 if (!itr->fFieldPtr->fSubFields.empty()) {
248 fStack.emplace_back(
Position(itr->fFieldPtr->fSubFields[0].get(), 0));
252 unsigned int nextIdxInParent = ++(itr->fIdxInParent);
253 while (nextIdxInParent >= itr->fFieldPtr->fParent->fSubFields.size()) {
254 if (fStack.size() == 1) {
255 itr->fFieldPtr = itr->fFieldPtr->fParent;
256 itr->fIdxInParent = -1;
260 itr = fStack.rbegin();
261 nextIdxInParent = ++(itr->fIdxInParent);
263 itr->fFieldPtr = itr->fFieldPtr->fParent->fSubFields[nextIdxInParent].get();
273 for (
auto &
f : fSubFields) {
274 auto clone =
f->Clone(
f->GetName());
275 result->
Attach(std::unique_ptr<RFieldBase>(clone));
283 auto entry =
new REntry();
284 for (
auto&
f : fSubFields) {
285 entry->AddValue(
f->GenerateValue());
302 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
303 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(model, 0)));
304 fPrincipalColumn = fColumns[0].get();
314 fPrincipalColumn = fColumns[0].get();
324 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
325 Detail::RColumn::Create<bool, EColumnType::kBit>(model, 0)));
326 fPrincipalColumn = fColumns[0].get();
336 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
337 Detail::RColumn::Create<float, EColumnType::kReal32>(model, 0)));
338 fPrincipalColumn = fColumns[0].get();
346 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
347 Detail::RColumn::Create<double, EColumnType::kReal64>(model, 0)));
348 fPrincipalColumn = fColumns[0].get();
359 fPrincipalColumn = fColumns[0].get();
367 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
368 Detail::RColumn::Create<std::uint32_t, EColumnType::kInt32>(model, 0)));
369 fPrincipalColumn = fColumns[0].get();
377 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
378 Detail::RColumn::Create<std::uint64_t, EColumnType::kInt64>(model, 0)));
379 fPrincipalColumn = fColumns[0].get();
388 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
389 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
392 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
393 Detail::RColumn::Create<char, EColumnType::kByte>(modelChars, 1)));
394 fPrincipalColumn = fColumns[0].get();
399 auto typedValue = value.
Get<std::string>();
400 auto length = typedValue->length();
401 Detail::RColumnElement<char, EColumnType::kByte> elemChars(
const_cast<char*
>(typedValue->data()));
402 fColumns[1]->AppendV(elemChars, length);
404 fColumns[0]->Append(fElemIndex);
410 auto typedValue = value->
Get<std::string>();
411 RClusterIndex collectionStart;
413 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nChars);
414 typedValue->resize(nChars);
415 Detail::RColumnElement<char, EColumnType::kByte> elemChars(
const_cast<char*
>(typedValue->data()));
416 fColumns[1]->ReadV(collectionStart, nChars, &elemChars);
433 throw std::runtime_error(
"RField: no I/O support for type " + std::string(className));
436 while (
auto dataMember =
static_cast<TDataMember *
>(next())) {
440 Attach(std::unique_ptr<Detail::RFieldBase>(subField));
450 TIter next(fClass->GetListOfDataMembers());
452 while (
auto dataMember =
static_cast<TDataMember *
>(next())) {
453 auto memberValue = fSubFields[i]->CaptureValue(value.
Get<
unsigned char>() + dataMember->GetOffset());
454 fSubFields[i]->Append(memberValue);
461 TIter next(fClass->GetListOfDataMembers());
463 while (
auto dataMember =
static_cast<TDataMember *
>(next())) {
464 auto memberValue = fSubFields[i]->GenerateValue(value->
Get<
unsigned char>() + dataMember->GetOffset());
465 fSubFields[i]->Read(globalIndex, &memberValue);
472 TIter next(fClass->GetListOfDataMembers());
474 while (
auto dataMember =
static_cast<TDataMember *
>(next())) {
475 auto memberValue = fSubFields[i]->GenerateValue(value->
Get<
unsigned char>() + dataMember->GetOffset());
476 fSubFields[i]->Read(clusterIndex, &memberValue);
492 fClass->Destructor(value.
GetRawPtr(),
true );
504 return fClass->GetClassSize();
515 , fItemSize(itemField->GetValueSize()), fNWritten(0)
517 Attach(std::move(itemField));
522 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->
GetName());
523 return new RFieldVector(newName, std::unique_ptr<Detail::RFieldBase>(newItemField));
527 auto typedValue = value.
Get<std::vector<char>>();
528 R__ASSERT((typedValue->size() % fItemSize) == 0);
529 auto count = typedValue->size() / fItemSize;
530 for (
unsigned i = 0; i < count; ++i) {
531 auto itemValue = fSubFields[0]->CaptureValue(typedValue->data() + (i * fItemSize));
532 fSubFields[0]->Append(itemValue);
536 fColumns[0]->Append(elemIndex);
541 auto typedValue = value->
Get<std::vector<char>>();
545 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
547 typedValue->resize(nItems * fItemSize);
548 for (
unsigned i = 0; i < nItems; ++i) {
549 auto itemValue = fSubFields[0]->GenerateValue(typedValue->data() + (i * fItemSize));
550 fSubFields[0]->Read(collectionStart + i, &itemValue);
557 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
558 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
559 fPrincipalColumn = fColumns[0].get();
569 auto vec =
static_cast<std::vector<char>*
>(value.
GetRawPtr());
570 R__ASSERT((vec->size() % fItemSize) == 0);
571 auto nItems = vec->size() / fItemSize;
572 for (
unsigned i = 0; i < nItems; ++i) {
573 auto itemValue = fSubFields[0]->CaptureValue(vec->data() + (i * fItemSize));
574 fSubFields[0]->DestroyValue(itemValue,
true );
603 auto typedValue = value.Get<std::vector<bool>>();
604 auto count = typedValue->size();
605 for (
unsigned i = 0; i < count; ++i) {
606 bool bval = (*typedValue)[i];
608 fSubFields[0]->Append(itemValue);
610 Detail::RColumnElement<ClusterSize_t, EColumnType::kIndex> elemIndex(&fNWritten);
612 fColumns[0]->Append(elemIndex);
617 auto typedValue = value->Get<std::vector<bool>>();
620 RClusterIndex collectionStart;
621 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
623 typedValue->resize(nItems);
624 for (
unsigned i = 0; i < nItems; ++i) {
626 auto itemValue = fSubFields[0]->GenerateValue(&bval);
627 fSubFields[0]->Read(collectionStart + i, &itemValue);
628 (*typedValue)[i] = bval;
635 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
636 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
637 fPrincipalColumn = fColumns[0].get();
642 auto vec =
static_cast<std::vector<bool>*
>(value.GetRawPtr());
653 std::string_view fieldName, std::unique_ptr<Detail::RFieldBase> itemField, std::size_t arrayLength)
655 fieldName,
"std::array<" + itemField->
GetType() +
"," + std::to_string(arrayLength) +
">",
657 , fItemSize(itemField->GetValueSize()), fArrayLength(arrayLength)
659 Attach(std::move(itemField));
664 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->
GetName());
665 return new RFieldArray(newName, std::unique_ptr<Detail::RFieldBase>(newItemField), fArrayLength);
669 auto arrayPtr = value.
Get<
unsigned char>();
670 for (
unsigned i = 0; i < fArrayLength; ++i) {
671 auto itemValue = fSubFields[0]->CaptureValue(arrayPtr + (i * fItemSize));
672 fSubFields[0]->Append(itemValue);
678 auto arrayPtr = value->
Get<
unsigned char>();
679 for (
unsigned i = 0; i < fArrayLength; ++i) {
680 auto itemValue = fSubFields[0]->GenerateValue(arrayPtr + (i * fItemSize));
681 fSubFields[0]->Read(globalIndex * fArrayLength + i, &itemValue);
687 auto arrayPtr = value->
Get<
unsigned char>();
688 for (
unsigned i = 0; i < fArrayLength; ++i) {
689 auto itemValue = fSubFields[0]->GenerateValue(arrayPtr + (i * fItemSize));
701 auto arrayPtr =
reinterpret_cast<unsigned char *
>(where);
702 for (
unsigned i = 0; i < fArrayLength; ++i) {
703 fSubFields[0]->GenerateValue(arrayPtr + (i * fItemSize));
710 auto arrayPtr = value.
Get<
unsigned char>();
711 for (
unsigned i = 0; i < fArrayLength; ++i) {
712 auto itemValue = fSubFields[0]->CaptureValue(arrayPtr + (i * fItemSize));
713 fSubFields[0]->DestroyValue(itemValue,
true );
727#if __cplusplus >= 201703L
728std::string ROOT::Experimental::RFieldVariant::GetTypeList(
const std::vector<Detail::RFieldBase *> &itemFields)
731 for (
size_t i = 0; i < itemFields.size(); ++i) {
732 result += itemFields[i]->GetType() +
",";
739ROOT::Experimental::RFieldVariant::RFieldVariant(
740 std::string_view fieldName,
const std::vector<Detail::RFieldBase *> &itemFields)
744 auto nFields = itemFields.size();
746 fNWritten.resize(nFields, 0);
747 for (
unsigned int i = 0; i < nFields; ++i) {
748 fMaxItemSize = std::max(fMaxItemSize, itemFields[i]->
GetValueSize());
749 fMaxAlignment = std::max(fMaxAlignment, itemFields[i]->
GetAlignment());
750 Attach(std::unique_ptr<Detail::RFieldBase>(itemFields[i]));
752 fTagOffset = (fMaxItemSize < fMaxAlignment) ? fMaxAlignment : fMaxItemSize;
757 auto nFields = fSubFields.size();
758 std::vector<Detail::RFieldBase *> itemFields;
759 for (
unsigned i = 0; i < nFields; ++i) {
760 itemFields.emplace_back(fSubFields[i]->Clone(fSubFields[i]->
GetName()));
762 return new RFieldVariant(newName, itemFields);
765std::uint32_t ROOT::Experimental::RFieldVariant::GetTag(
void *variantPtr)
const
767 auto index = *(
reinterpret_cast<char *
>(variantPtr) + fTagOffset);
768 return (index < 0) ? 0 : index + 1;
771void ROOT::Experimental::RFieldVariant::SetTag(
void *variantPtr, std::uint32_t tag)
const
773 auto index =
reinterpret_cast<char *
>(variantPtr) + fTagOffset;
774 *index =
static_cast<char>(tag - 1);
777void ROOT::Experimental::RFieldVariant::DoAppend(
const Detail::RFieldValue& value)
779 auto tag = GetTag(value.GetRawPtr());
782 auto itemValue = fSubFields[tag - 1]->CaptureValue(value.GetRawPtr());
783 fSubFields[tag - 1]->Append(itemValue);
784 index = fNWritten[tag - 1]++;
787 Detail::RColumnElement<RColumnSwitch, EColumnType::kSwitch> elemSwitch(&varSwitch);
788 fColumns[0]->Append(elemSwitch);
791void ROOT::Experimental::RFieldVariant::DoReadGlobal(
NTupleSize_t globalIndex, Detail::RFieldValue *value)
793 RClusterIndex variantIndex;
795 fPrincipalColumn->GetSwitchInfo(globalIndex, &variantIndex, &tag);
798 auto itemValue = fSubFields[tag - 1]->GenerateValue(value->GetRawPtr());
799 fSubFields[tag - 1]->Read(variantIndex, &itemValue);
800 SetTag(value->GetRawPtr(), tag);
803void ROOT::Experimental::RFieldVariant::DoGenerateColumns()
806 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
807 Detail::RColumn::Create<RColumnSwitch, EColumnType::kSwitch>(modelSwitch, 0)));
808 fPrincipalColumn = fColumns[0].get();
813 memset(where, 0, GetValueSize());
814 fSubFields[0]->GenerateValue(where);
816 return Detail::RFieldValue(
this,
reinterpret_cast<unsigned char *
>(where));
819void ROOT::Experimental::RFieldVariant::DestroyValue(
const Detail::RFieldValue& value,
bool dtorOnly)
821 auto variantPtr = value.GetRawPtr();
822 auto tag = GetTag(variantPtr);
824 auto itemValue = fSubFields[tag - 1]->CaptureValue(variantPtr);
825 fSubFields[tag - 1]->DestroyValue(itemValue,
true );
833 return Detail::RFieldValue(
true ,
this, where);
836size_t ROOT::Experimental::RFieldVariant::GetValueSize()
const
838 return fMaxItemSize + fMaxAlignment;
841void ROOT::Experimental::RFieldVariant::CommitCluster()
843 std::fill(fNWritten.begin(), fNWritten.end(), 0);
853 std::shared_ptr<RCollectionNTuple> collectionNTuple,
854 std::unique_ptr<RNTupleModel> collectionModel)
856 , fCollectionNTuple(collectionNTuple)
858 for (
unsigned i = 0; i < collectionModel->GetRootField()->
fSubFields.size(); ++i) {
859 auto& subField = collectionModel->GetRootField()->fSubFields[i];
860 Attach(std::move(subField));
868 fColumns.emplace_back(std::unique_ptr<Detail::RColumn>(
869 Detail::RColumn::Create<ClusterSize_t, EColumnType::kIndex>(modelIndex, 0)));
870 fPrincipalColumn = fColumns[0].get();
889 *fCollectionNTuple->GetOffsetPtr() = 0;
#define R__ERROR_HERE(GROUP)
static RColumn * Create(const RColumnModel &model, std::uint32_t index)
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...
std::vector< std::unique_ptr< RFieldBase > > fSubFields
Collections and classes own sub fields.
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.
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...
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 void DoReadGlobal(NTupleSize_t globalIndex, RFieldValue *value)
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::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)
RFieldValue GenerateValue()
Generates a tree value of the field type and allocates new initialized memory according to the type.
static void Connect(DescriptorId_t fieldId, RPageStorage &pageStorage, RFieldBase &field)
Abstract base class for classes implementing the visitor design pattern.
virtual void VisitField(const Detail::RFieldBase &field, int level)=0
virtual void VisitRootField(const RFieldRoot &field, int level)=0
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...
DescriptorId_t GetClusterId() const
ClusterSize_t::ValueType GetIndex() const
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.
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)
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 DoReadInCluster(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
void DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
void DoReadGlobal(NTupleSize_t globalIndex, 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.
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.
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
void DoReadInCluster(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
void DoReadGlobal(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
RFieldCollection(std::string_view name, std::shared_ptr< RCollectionNTuple > collectionNTuple, std::unique_ptr< RNTupleModel > collectionModel)
void DoGenerateColumns() final
Creates the backing columns corresponsing to the field type and name.
void CommitCluster() final
Perform housekeeping tasks for global to cluster-local index translation.
RFieldBase * Clone(std::string_view newName) final
The container field for an ntuple model, which itself has no physical representation.
RFieldBase * Clone(std::string_view newName)
REntry * GenerateEntry()
Generates managed values for the top-level sub fields.
void AcceptVisitor(Detail::RNTupleVisitor &visitor, int level) const final
The generic field for a (nested) std::vector<Type> except for std::vector<bool>
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
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.
Template specializations for concrete C++ types.
Classes with dictionaries that can be inspected by TClass.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
All ROOT classes may have RTTI (run time type identification) support added.
basic_string_view< char > string_view
std::string GetName(const std::string &scope_name)
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.
Type GetType(const std::string &Name)
Wrap the 32bit integer in a struct in order to avoid template specialization clash with std::uint32_t...