50#include <unordered_set>
58TClass *EnsureValidClass(std::string_view className)
72 " cannot be constructed from a class that's not at least Interpreted"));
83 "use RProxiedCollectionField instead"));
94 R__FAIL(field.
GetTypeName() +
" has streamer mode enforced, not supported as native RNTuple class"));
104 if (realMember->GetStreamer()) {
106 " with a custom streamer; not supported natively in RNTuple"));
111TEnum *EnsureValidEnum(std::string_view enumName)
120void EnsureValidAlignment(std::size_t
alignment)
129std::string GetTypeList(std::span<std::unique_ptr<ROOT::RFieldBase>> itemFields,
bool useTypeAliases)
132 for (
size_t i = 0; i < itemFields.size(); ++i) {
133 if (useTypeAliases && !itemFields[i]->GetTypeAlias().empty()) {
134 result += itemFields[i]->GetTypeAlias();
136 result += itemFields[i]->GetTypeName();
149 std::string typePrefix;
165 if (
const auto pairField =
dynamic_cast<const ROOT::RPairField *
>(innerField)) {
166 std::string typePrefix;
174 const auto &items = pairField->GetConstSubfields();
175 std::string
type = typePrefix;
176 for (
int i : {0, 1}) {
177 if (useTypeAliases && !items[i]->GetTypeAlias().empty()) {
178 type += items[i]->GetTypeAlias();
180 type += items[i]->GetTypeName();
199 RFieldBase::Attach(f->Clone(f->GetFieldName()));
205 :
RClassField(fieldName, EnsureValidClass(className))
214 EnsureValidUserClass(
fClass, *
this,
"RClassField");
225 std::string renormalizedAlias;
230 const auto *bases =
fClass->GetListOfBases();
233 if (baseClass->GetDelta() < 0) {
235 " virtually inherits from " + baseClass->GetName()));
237 TClass *
c = baseClass->GetClassPointer();
239 RFieldBase::Create(std::string(kPrefixInherited) +
"_" + std::to_string(i),
c->GetName()).Unwrap();
240 fTraits &= subField->GetTraits();
241 Attach(std::move(subField), RSubfieldInfo{kBaseClass,
static_cast<std::size_t
>(baseClass->GetDelta())});
249 if (!dataMember->IsPersistent()) {
251 fTraits &= ~(kTraitTriviallyConstructible | kTraitTriviallyDestructible);
258 std::string typeName{dataMember->GetTrueTypeName()};
261 if (dataMember->Property() &
kIsArray) {
262 for (
int dim = 0,
n = dataMember->GetArrayDim(); dim <
n; ++dim) {
263 typeName +=
"[" + std::to_string(dataMember->GetMaxIndex(dim)) +
"]";
269 fTraits &= subField->GetTraits();
270 Attach(std::move(subField), RSubfieldInfo{kDataMember,
static_cast<std::size_t
>(dataMember->GetOffset())});
272 fTraits |= kTraitTypeChecksum;
281 deleter->operator()(
fStagingArea.get() + si.fOffset,
true );
296 const auto ruleset =
fClass->GetSchemaRules();
303 rules = ruleset->FindRules(
fClass->GetName(),
fClass->GetClassVersion(),
fClass->GetCheckSum());
306 std::string normalizedName;
313 rules = ruleset->FindRules(normalizedName, fieldDesc->
GetTypeVersion());
319 std::unordered_map<std::string, std::string> sourceNameAndType;
320 std::size_t nskip = 0;
321 for (
auto itr = rules.begin(); itr != rules.end() - nskip;) {
322 const auto rule = *itr;
327 <<
"ignoring I/O customization rule with unsupported type: " << rule->GetRuleType();
328 itr = rules.erase(itr);
332 bool hasConflictingSourceMembers =
false;
334 auto memberType = source->GetTypeForDeclaration() + source->GetDimensions();
335 auto [itrSrc, isNew] = sourceNameAndType.emplace(source->GetName(), memberType);
336 if (!isNew && (itrSrc->second != memberType)) {
338 <<
"ignoring I/O customization rule due to conflicting source member type: " << itrSrc->second <<
" vs. "
339 << memberType <<
" for member " << source->GetName();
340 hasConflictingSourceMembers =
true;
344 if (hasConflictingSourceMembers) {
345 itr = rules.erase(itr);
350 if (rule->GetTarget() ==
nullptr) {
352 if (itr != rules.end() - nskip)
353 std::iter_swap(itr++, rules.end() - nskip);
365 return std::unique_ptr<RClassField>(
new RClassField(newName, *
this));
370 std::size_t nbytes = 0;
371 for (
unsigned i = 0; i <
fSubfields.size(); i++) {
382 for (
unsigned i = 0; i <
fSubfields.size(); i++) {
392 for (
unsigned i = 0; i <
fSubfields.size(); i++) {
400 auto idSourceMember = desc.
FindFieldId(memberName, classFieldId);
402 return idSourceMember;
405 const auto subFieldName = subFieldDesc.GetFieldName();
406 if (subFieldName.length() > 2 && subFieldName[0] ==
':' && subFieldName[1] ==
'_') {
407 idSourceMember =
LookupMember(desc, memberName, subFieldDesc.GetId());
409 return idSourceMember;
436 std::size_t stagingAreaSize = 0;
437 for (
const auto rule : rules) {
452 auto memberType = source->GetTypeForDeclaration() + source->GetDimensions();
453 auto memberField =
Create(
"" , std::string(memberType)).Unwrap();
454 memberField->SetOnDiskId(memberFieldId);
455 auto fieldZero = std::make_unique<RFieldZero>();
457 fieldZero->Attach(std::move(memberField));
458 stagingItem.
fField = std::move(fieldZero);
464 stagingAreaSize = std::max(stagingAreaSize, stagingItem.
fOffset + stagingItem.
fField->begin()->GetValueSize());
468 if (stagingAreaSize) {
471 fStagingArea = std::make_unique<unsigned char[]>(stagingAreaSize);
474 const auto &memberField = *si.fField->cbegin();
485 if (func ==
nullptr) {
490 TVirtualObject onfileObj{nullptr};
491 onfileObj.fClass = stagingClass;
492 onfileObj.fObject = stagingArea;
493 func(
static_cast<char *
>(
target), &onfileObj);
494 onfileObj.fObject =
nullptr;
500 std::vector<const TSchemaRule *> rules;
503 std::unordered_set<std::string> regularSubfields;
506 int nOnDiskBaseClasses = 0;
526 for (
auto linkId : fieldDesc.GetLinkIds()) {
528 regularSubfields.insert(subFieldDesc.GetFieldName());
529 if (!subFieldDesc.GetFieldName().empty() && subFieldDesc.GetFieldName()[0] ==
':')
530 nOnDiskBaseClasses++;
544 " vs. " + descTypeName));
548 const bool hasSources = std::any_of(rules.begin(), rules.end(), [](
const auto &
r) {
549 return r->GetSource() && (r->GetSource()->GetEntries() > 0);
559 si.fField = std::move(
static_cast<RFieldZero *
>(si.fField.get())->ReleaseSubfields()[0]);
564 for (
const auto rule : rules) {
565 if (!rule->GetTarget())
569 regularSubfields.erase(std::string(
target->GetString()));
574 for (
const auto rule : rules) {
579 int nInMemoryBaseClasses = 0;
582 if (regularSubfields.count(fieldName) == 0) {
585 if (!fieldName.empty() && fieldName[0] ==
':')
586 nInMemoryBaseClasses++;
589 if (nInMemoryBaseClasses != 0 && nOnDiskBaseClasses != 0 && nInMemoryBaseClasses != nOnDiskBaseClasses) {
591 GetTypeName() +
", " + std::to_string(nInMemoryBaseClasses) +
592 " base classes in memory "
594 std::to_string(nOnDiskBaseClasses) +
" base classes on-disk\n" +
615 fClass->Destructor(objPtr,
true );
616 RDeleter::operator()(objPtr, dtorOnly);
621 std::vector<RValue>
result;
622 auto valuePtr =
value.GetPtr<
void>();
623 auto charPtr =
static_cast<unsigned char *
>(valuePtr.get());
625 for (
unsigned i = 0; i <
fSubfields.size(); i++) {
634 return fClass->GetClassSize();
639 const auto align =
fClass->GetClassAlignment();
640 EnsureValidAlignment(align);
646 return fClass->GetClassVersion();
651 return fClass->GetCheckSum();
660 return fClass->GetTypeInfo();
685 :
RSoAField(fieldName, EnsureValidClass(className))
694 static std::once_flag once;
695 std::call_once(once, []() {
699 EnsureValidUserClass(
fSoAClass, *
this,
"RSoAField");
701 if (recordTypeName.empty()) {
703 " is not marked with the rntupleSoARecord "
704 "dictionary option; cannot create corresponding RSoAField."));
707 Attach(std::make_unique<ROOT::RClassField>(
"_0", recordTypeName));
712 if (
static_cast<std::uint32_t
>(
fSoAClass->GetClassVersion()) !=
fSubfields[0]->GetTypeVersion()) {
713 throw RException(
R__FAIL(std::string(
"version mismatch between SoA type and underlying record type: ") +
714 std::to_string(
fSoAClass->GetClassVersion()) +
" vs. " +
715 std::to_string(
fSubfields[0]->GetTypeVersion())));
719 std::unordered_map<std::string, std::size_t> recordFieldNameToIdx;
724 assert(!
f->GetFieldName().empty());
725 if (
f->GetFieldName()[0] ==
':') {
726 throw RException(
R__FAIL(
"SoA fields with inheritance are currently unsupported"));
728 recordFieldNameToIdx[
f->GetFieldName()] = i;
732 const auto *bases =
fSoAClass->GetListOfBases();
735 if (baseClass->GetDelta() < 0) {
737 " virtually inherits from " + baseClass->GetName()));
740 throw RException(
R__FAIL(
"SoA fields with inheritance are currently unsupported"));
744 unsigned int nMembers = 0;
746 if ((dataMember->Property() &
kIsStatic) || !dataMember->IsPersistent())
749 if (dataMember->Property() &
kIsArray) {
750 throw RException(
R__FAIL(std::string(
"unsupported array type in SoA class: ") + dataMember->GetName()));
753 const std::string typeName{dataMember->GetTrueTypeName()};
755 auto vecFieldPtr =
dynamic_cast<RRVecField *
>(subField.get());
757 throw RException(
R__FAIL(
"invalid field type in SoA class: " + subField->GetTypeName()));
760 auto vecField = std::unique_ptr<RRVecField>(vecFieldPtr);
762 auto itr = recordFieldNameToIdx.find(vecField->GetFieldName());
763 if (itr == recordFieldNameToIdx.end()) {
764 throw RException(
R__FAIL(std::string(
"unexpected SoA member: ") + vecField->GetFieldName()));
767 if (vecField->begin()->GetTypeName() != memberField->
GetTypeName() ||
768 vecField->begin()->GetTypeAlias() != memberField->
GetTypeAlias()) {
769 const std::string leftType =
770 vecField->begin()->GetTypeName() +
771 (vecField->begin()->
GetTypeAlias().empty() ?
"" :
" [" + vecField->begin()->GetTypeAlias() +
"]");
772 const std::string rightType =
775 throw RException(
R__FAIL(std::string(
"SoA member type mismatch: ") + vecField->GetFieldName() +
" (" +
776 leftType +
" vs. " + rightType +
")"));
783 if (recordFieldNameToIdx.size() != nMembers) {
787 std::string renormalizedAlias;
797 return std::unique_ptr<RSoAField>(
new RSoAField(newName, *
this));
807 return representations;
825 for (std::size_t i = 0; i < nSoAMembers; ++i) {
826 const void *rvecPtr =
static_cast<const unsigned char *
>(from) +
fSoAMemberOffsets[i];
828 assert(*sizePtr >= 0);
832 if (
static_cast<std::size_t
>(*sizePtr) !=
N) {
834 throw RException(
R__FAIL(
"SoA length mismatch for " +
f->GetFieldName() +
": " + std::to_string(*sizePtr) +
835 " vs. " + std::to_string(
N) +
" (expected)"));
840 std::size_t nbytes = 0;
842 for (std::size_t i = 0; i < nSoAMembers; ++i) {
843 const void *rvecPtr =
static_cast<const unsigned char *
>(from) +
fSoAMemberOffsets[i];
850 for (std::size_t j = 0; j <
N; ++j) {
870 for (std::size_t i = 0; i < nSoAMembers; ++i) {
879 for (std::size_t j = 0; j <
N; ++j) {
880 CallReadOn(*memberField, collectionStart + j,
begin + (j * memberSize));
898 RDeleter::operator()(objPtr, dtorOnly);
908 fSplitFields = std::make_unique<std::vector<std::unique_ptr<ROOT::RRVecField>>>();
910 for (std::size_t i = 0; i < nSoAMembers; ++i) {
912 fSplitFields->emplace_back(std::make_unique<RRVecField>(itemField->GetFieldName(), itemField->Clone(
"_0")));
917 auto valuePtr =
value.GetPtr<
void>();
918 auto soaPtr =
static_cast<unsigned char *
>(valuePtr.get());
919 std::vector<RValue> values;
920 values.reserve(nSoAMembers);
921 for (std::size_t i = 0; i < nSoAMembers; ++i) {
945 const auto align =
fSoAClass->GetClassAlignment();
946 EnsureValidAlignment(align);
968 :
REnumField(fieldName, EnsureValidEnum(enumName))
978 throw RException(R__FAIL(GetTypeName() +
" is not supported"));
982 case kBool_t: Attach(std::make_unique<RField<Bool_t>>(
"_0")); break;
983 case kChar_t: Attach(std::make_unique<RField<Char_t>>(
"_0")); break;
984 case kUChar_t: Attach(std::make_unique<RField<UChar_t>>(
"_0")); break;
985 case kShort_t: Attach(std::make_unique<RField<Short_t>>(
"_0")); break;
986 case kUShort_t: Attach(std::make_unique<RField<UShort_t>>(
"_0")); break;
987 case kInt_t: Attach(std::make_unique<RField<Int_t>>(
"_0")); break;
988 case kUInt_t: Attach(std::make_unique<RField<UInt_t>>(
"_0")); break;
989 case kLong_t: Attach(std::make_unique<RField<Long_t>>(
"_0")); break;
990 case kLong64_t: Attach(std::make_unique<RField<Long64_t>>(
"_0")); break;
991 case kULong_t: Attach(std::make_unique<RField<ULong_t>>(
"_0")); break;
992 case kULong64_t: Attach(std::make_unique<RField<ULong64_t>>(
"_0")); break;
993 default: throw RException(R__FAIL(
"Unsupported underlying integral type for enum type " + GetTypeName()));
1000 std::unique_ptr<RFieldBase> intField)
1003 Attach(std::move(intField));
1021 std::vector<RValue>
result;
1034 :
ROOT::
RRecordField(fieldName,
"std::pair<" + GetTypeList(itemFields, false ) +
">")
1036 const std::string typeAlias =
"std::pair<" + GetTypeList(itemFields,
true ) +
">";
1048 auto firstElem =
c->GetRealData(
"first");
1051 fOffsets.push_back(firstElem->GetThisOffset());
1053 auto secondElem =
c->GetRealData(
"second");
1056 fOffsets.push_back(secondElem->GetThisOffset());
1063 return std::unique_ptr<RPairField>(
new RPairField(newName, std::move(itemClones)));
1068 static const std::vector<std::string> prefixes = {
"std::pair<",
"std::tuple<"};
1074 const auto nOnDiskSubfields = fieldDesc.
GetLinkIds().size();
1075 if (nOnDiskSubfields != 2) {
1077 std::to_string(nOnDiskSubfields) +
"\n" +
1093 (ifuncs.
fNext !=
nullptr));
1105 static const std::vector<std::string> supportedStdTypes = {
1106 "std::set<",
"std::unordered_set<",
"std::multiset<",
"std::unordered_multiset<",
1107 "std::map<",
"std::unordered_map<",
"std::multimap<",
"std::unordered_multimap<"};
1108 bool isSupported =
false;
1109 for (
const auto &tn : supportedStdTypes) {
1119 std::string renormalizedAlias;
1121 fTypeAlias = renormalizedAlias;
1124 fProperties = fProxy->GetProperties();
1125 fCollectionType = fProxy->GetCollectionType();
1126 if (fProxy->HasPointers())
1127 throw RException(
R__FAIL(
"collection proxies whose value type is a pointer are not supported"));
1129 fIFuncsRead = RCollectionIterableOnce::GetIteratorFuncs(fProxy.get(),
true );
1130 fIFuncsWrite = RCollectionIterableOnce::GetIteratorFuncs(fProxy.get(),
false );
1138 throw RException(
R__FAIL(
"custom associative collection proxies not supported"));
1140 std::unique_ptr<ROOT::RFieldBase> itemField;
1142 if (
auto valueClass =
fProxy->GetValueClass()) {
1144 itemField = RFieldBase::Create(
"_0", valueClass->GetName()).Unwrap();
1146 switch (fProxy->GetType()) {
1147 case EDataType::kChar_t: itemField = std::make_unique<RField<Char_t>>(
"_0"); break;
1148 case EDataType::kUChar_t: itemField = std::make_unique<RField<UChar_t>>(
"_0"); break;
1149 case EDataType::kShort_t: itemField = std::make_unique<RField<Short_t>>(
"_0"); break;
1150 case EDataType::kUShort_t: itemField = std::make_unique<RField<UShort_t>>(
"_0"); break;
1151 case EDataType::kInt_t: itemField = std::make_unique<RField<Int_t>>(
"_0"); break;
1152 case EDataType::kUInt_t: itemField = std::make_unique<RField<UInt_t>>(
"_0"); break;
1153 case EDataType::kLong_t: itemField = std::make_unique<RField<Long_t>>(
"_0"); break;
1154 case EDataType::kLong64_t: itemField = std::make_unique<RField<Long64_t>>(
"_0"); break;
1155 case EDataType::kULong_t: itemField = std::make_unique<RField<ULong_t>>(
"_0"); break;
1156 case EDataType::kULong64_t: itemField = std::make_unique<RField<ULong64_t>>(
"_0"); break;
1157 case EDataType::kFloat_t: itemField = std::make_unique<RField<Float_t>>(
"_0"); break;
1158 case EDataType::kDouble_t: itemField = std::make_unique<RField<Double_t>>(
"_0"); break;
1159 case EDataType::kBool_t: itemField = std::make_unique<RField<Bool_t>>(
"_0"); break;
1160 default: throw RException(R__FAIL(
"unsupported value type: " + std::to_string(fProxy->GetType())));
1164 fItemSize = itemField->GetValueSize();
1165 Attach(std::move(itemField));
1179 std::size_t nbytes = 0;
1197 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nItems);
1219 return representations;
1248 return std::make_unique<RProxiedCollectionDeleter>(
fProxy);
1252 std::shared_ptr<TVirtualCollectionProxy> proxy)
1253 :
RDeleter(proxy->GetCollectionClass()->GetClassAlignment()),
fProxy(proxy)
1258 std::shared_ptr<TVirtualCollectionProxy> proxy, std::unique_ptr<RDeleter> itemDeleter,
size_t itemSize)
1259 :
RDeleter(proxy->GetCollectionClass()->GetClassAlignment()),
1275 fProxy->Destructor(objPtr,
true );
1276 RDeleter::operator()(objPtr, dtorOnly);
1281 std::vector<RValue>
result;
1282 auto valueRawPtr =
value.GetPtr<
void>().get();
1298 const auto align =
fProxy->GetCollectionClass()->GetClassAlignment();
1299 EnsureValidAlignment(align);
1312 EnsureValidClass(BuildMapTypeName(mapType, itemField.get(), false ))),
1315 if (!itemField->GetTypeAlias().empty())
1316 fTypeAlias = BuildMapTypeName(mapType, itemField.get(),
true );
1318 auto *itemClass =
fProxy->GetValueClass();
1321 Attach(std::move(itemField),
"_0");
1331 static const std::vector<std::string> prefixesRegular = {
"std::map<",
"std::unordered_map<"};
1348 EnsureValidClass(BuildSetTypeName(setType, *itemField, false ))),
1351 if (!itemField->GetTypeAlias().empty())
1352 fTypeAlias = BuildSetTypeName(setType, *itemField,
true );
1356 Attach(std::move(itemField),
"_0");
1366 static const std::vector<std::string> prefixesRegular = {
"std::set<",
"std::unordered_set<",
"std::map<",
1367 "std::unordered_map<"};
1390 RCallbackStreamerInfo fCallbackStreamerInfo;
1394 :
TBufferFile(
mode, bufsize), fCallbackStreamerInfo(callbackStreamerInfo)
1413 std::string renormalizedAlias;
1436 fClass->Streamer(
const_cast<void *
>(from), buffer);
1438 auto nbytes = buffer.Length();
1449 fPrincipalColumn->GetCollectionInfo(globalIndex, &collectionStart, &nbytes);
1453 fClass->Streamer(to, buffer);
1463 return representations;
1499 fClass->Destructor(objPtr,
true );
1500 RDeleter::operator()(objPtr, dtorOnly);
1515 const auto align =
fClass->GetClassAlignment();
1516 EnsureValidAlignment(align);
1522 return fClass->GetClassSize();
1527 return fClass->GetClassVersion();
1532 return fClass->GetCheckSum();
1545 return dataMember->GetOffset();
1570 return std::unique_ptr<RField<TObject>>(
new RField<TObject>(newName, *
this));
1577 auto *obj =
static_cast<const TObject *
>(from);
1582 std::size_t nbytes = 0;
1596 auto *obj =
static_cast<TObject *
>(to);
1605 *
reinterpret_cast<UInt_t *
>(
reinterpret_cast<unsigned char *
>(to) +
GetOffsetBits()) = bits;
1641 std::vector<RValue>
result;
1644 auto charPtr =
static_cast<unsigned char *
>(ptr.get());
1668 :
ROOT::
RRecordField(fieldName,
"std::tuple<" + GetTypeList(itemFields, false ) +
">")
1670 const std::string typeAlias =
"std::tuple<" + GetTypeList(itemFields,
true ) +
">";
1686 for (
unsigned i = 0; i <
fSubfields.size(); ++i) {
1687 std::string memberName(
"_" + std::to_string(i));
1688 auto member =
c->GetRealData(memberName.c_str());
1691 fOffsets.push_back(member->GetThisOffset());
1697 std::vector<std::unique_ptr<RFieldBase>> itemClones;
1700 itemClones.emplace_back(
f->Clone(
f->GetFieldName()));
1702 return std::unique_ptr<RTupleField>(
new RTupleField(newName, std::move(itemClones)));
1707 static const std::vector<std::string> prefixes = {
"std::pair<",
"std::tuple<"};
1713 const auto nOnDiskSubfields = fieldDesc.
GetLinkIds().size();
1715 if (nOnDiskSubfields != nSubfields) {
1717 std::to_string(nOnDiskSubfields) +
" vs. " + std::to_string(nSubfields) +
"\n" +
1727constexpr std::size_t GetVariantTagSize()
1730 std::variant<char> t;
1731 constexpr auto sizeOfT =
sizeof(t);
1733 static_assert(sizeOfT == 2 || sizeOfT == 8,
"unsupported std::variant layout");
1734 return sizeOfT == 2 ? 1 : 4;
1737template <std::
size_t VariantSizeT>
1739 using ValueType_t =
typename std::conditional_t<VariantSizeT == 1, std::uint8_t,
1740 typename std::conditional_t<VariantSizeT == 4, std::uint32_t, void>>;
1754 Attach(
f->Clone(
f->GetFieldName()));
1759 :
ROOT::
RFieldBase(fieldName,
"std::variant<" + GetTypeList(itemFields, false ) +
">",
1765 const std::string typeAlias =
"std::variant<" + GetTypeList(itemFields,
true ) +
">";
1769 auto nFields = itemFields.size();
1774 for (
unsigned int i = 0; i < nFields; ++i) {
1777 fTraits &= itemFields[i]->GetTraits();
1778 Attach(std::move(itemFields[i]),
"_" + std::to_string(i));
1789 const auto tagSize = GetVariantTagSize();
1790 const auto padding = tagSize - (
fMaxItemSize % tagSize);
1796 return std::unique_ptr<RVariantField>(
new RVariantField(newName, *
this));
1801 using TagType_t = RVariantTag<GetVariantTagSize()>::ValueType_t;
1802 auto tag = *
reinterpret_cast<const TagType_t *
>(
reinterpret_cast<const unsigned char *
>(variantPtr) + tagOffset);
1803 return (tag == TagType_t(-1)) ? 0 : tag + 1;
1808 using TagType_t = RVariantTag<GetVariantTagSize()>::ValueType_t;
1809 auto tagPtr =
reinterpret_cast<TagType_t *
>(
reinterpret_cast<unsigned char *
>(variantPtr) + tagOffset);
1810 *tagPtr = (tag == 0) ? TagType_t(-1) :
static_cast<TagType_t
>(tag - 1);
1816 std::size_t nbytes = 0;
1838 void *varPtr =
reinterpret_cast<unsigned char *
>(to) +
fVariantOffset;
1848 return representations;
1863 static const std::vector<std::string> prefixes = {
"std::variant<"};
1869 if (
fSubfields.size() != fieldDesc.GetLinkIds().size()) {
1888 RDeleter::operator()(objPtr, dtorOnly);
1893 std::vector<std::unique_ptr<RDeleter>> itemDeleters;
1903 return std::max(
fMaxAlignment,
alignof(RVariantTag<GetVariantTagSize()>::ValueType_t));
1909 const auto actualSize =
fTagOffset + GetVariantTagSize();
1911 return actualSize + ((padding ==
alignment) ? 0 : padding);
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__LOG_WARNING(...)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
if(isa< VarDecl >(D)||isa< FieldDecl >(D)||isa< EnumConstantDecl >(D))
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 Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t target
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 r
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 char Point_t Rectangle_t WindowAttributes_t index
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 Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char mode
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 Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Abstract base class for classes implementing the visitor design pattern.
virtual void VisitProxiedCollectionField(const ROOT::RProxiedCollectionField &field)
virtual void VisitTObjectField(const ROOT::RField< TObject > &field)
virtual void VisitStreamerField(const ROOT::RStreamerField &field)
virtual void VisitEnumField(const ROOT::REnumField &field)
virtual void VisitSoAField(const ROOT::Experimental::RSoAField &field)
virtual void VisitClassField(const ROOT::RClassField &field)
void operator()(void *objPtr, bool dtorOnly) final
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
std::vector< std::size_t > fSoAMemberOffsets
The offset of the RVec members in the SoA type in the order of subfields of the underlying record typ...
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
const std::type_info * GetPolymorphicTypeInfo() const
For polymorphic classes (that declare or inherit at least one virtual method), return the expected dy...
size_t GetValueSize() const final
What sizeof(T) for this type returns.
std::vector< std::unique_ptr< RDeleter > > fRecordMemberDeleters
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
size_t GetAlignment() const final
What alignof(T) for this type returns.
std::vector< RFieldBase * > fRecordMemberFields
Direct access to the member fields of the underlying record.
RSoAField(std::string_view fieldName, const RSoAField &source)
Used by CloneImpl.
std::uint32_t GetTypeVersion() const final
Indicates an evolution of the C++ type itself.
std::uint32_t GetTypeChecksum() const final
Return the current TClass reported checksum of this class. Only valid if kTraitTypeChecksum is set.
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::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
ROOT::Internal::RColumnIndex fNWritten
std::unique_ptr< std::vector< std::unique_ptr< ROOT::RRVecField > > > fSplitFields
For reading and writing, the RVecs of the SoA class do not have a dedicated field.
std::unique_ptr< std::mutex > fLockSplitFields
protects the fSplitFields member.
Holds the index and the tag of a kSwitch column.
static std::string SerializeStreamerInfos(const StreamerInfoMap_t &infos)
const ROOT::RNTupleDescriptor & GetRef() const
Abstract interface to read data from an ntuple.
void RegisterStreamerInfos()
Builds the streamer info records from the descriptor's extra type info section. This is necessary whe...
const RSharedDescriptorGuard GetSharedDescriptorGuard() const
Takes the read lock for the descriptor. Multiple threads can take the lock concurrently....
void operator()(void *objPtr, bool dtorOnly) final
RClassDeleter(TClass *cl)
std::unique_ptr< RFieldBase > BeforeConnectPageSource(ROOT::Internal::RPageSource &pageSource) final
Called by ConnectPageSource() before connecting; derived classes may override this as appropriate,...
void AddReadCallbacksFromIORule(const TSchemaRule *rule)
Register post-read callback corresponding to a ROOT I/O customization rules.
TClass * fStagingClass
The TClass instance that corresponds to the staging area.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
std::size_t GetAlignment() const final
What alignof(T) for this type returns.
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::vector< RSubfieldInfo > fSubfieldsInfo
void Attach(std::unique_ptr< RFieldBase > child, RSubfieldInfo info)
std::unique_ptr< unsigned char[]> fStagingArea
The staging area stores inputs to I/O rules according to the offsets given by the streamer info of "T...
std::size_t GetValueSize() const final
What sizeof(T) for this type returns.
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...
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
std::vector< const TSchemaRule * > FindRules(const ROOT::RFieldDescriptor *fieldDesc)
Given the on-disk information from the page source, find all the I/O customization rules that apply t...
ROOT::DescriptorId_t LookupMember(const ROOT::RNTupleDescriptor &desc, std::string_view memberName, ROOT::DescriptorId_t classFieldId)
Returns the id of member 'name' in the class field given by 'fieldId', or kInvalidDescriptorId if no ...
void ReadInClusterImpl(RNTupleLocalIndex localIndex, void *to) final
std::uint32_t GetTypeVersion() const final
Indicates an evolution of the C++ type itself.
RClassField(std::string_view fieldName, const RClassField &source)
Used by CloneImpl.
void PrepareStagingArea(const std::vector< const TSchemaRule * > &rules, const ROOT::RNTupleDescriptor &desc, const ROOT::RFieldDescriptor &classFieldId)
If there are rules with inputs (source members), create the staging area according to the TClass inst...
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
const std::type_info * GetPolymorphicTypeInfo() const
For polymorphic classes (that declare or inherit at least one virtual method), return the expected dy...
std::uint32_t GetTypeChecksum() const final
Return the current TClass reported checksum of this class. Only valid if kTraitTypeChecksum is set.
std::unordered_map< std::string, RStagingItem > fStagingItems
Lookup staging items by member name.
void SetStagingClass(const std::string &className, unsigned int classVersion)
Sets fStagingClass according to the given name and version.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
REnumField(std::string_view fieldName, TEnum *enump)
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
Base class for all ROOT issued exceptions.
The list of column representations a field can have.
RDeleter(std::size_t align)
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
What sizeof(T) for this type returns.
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.
std::vector< const RFieldBase * > GetConstSubfields() const
@ kTraitTriviallyDestructible
@ kTraitTriviallyConstructible
@ kTraitSoACollection
The field represents a collection in SoA layout.
@ kTraitTypeChecksum
The TClass checksum is set and valid.
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...
ROOT::Internal::RColumn * fAuxiliaryColumn
Some fields have a second column in its column representation.
RResult< void > EnsureMatchingOnDiskCollection(const RNTupleDescriptor &desc) const
Convenience wrapper for the common case of calling EnsureMatchinOnDiskField() for collections.
static void CallSetArtificialOn(RFieldBase &other)
Allow parents to mark their childs as artificial fields (used in class and record fields)
std::string GetQualifiedFieldName() const
Returns the field name and parent field names separated by dots (grandparent.parent....
const std::string & GetFieldName() const
std::vector< ReadCallback_t > fReadCallbacks
List of functions to be called after reading a value.
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.
const std::string & GetTypeAlias() const
static std::size_t CallAppendOn(RFieldBase &other, const void *from)
Allow derived classes to call Append() and Read() on other (sub)fields.
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.
static RResult< std::unique_ptr< RFieldBase > > Create(const std::string &fieldName, const std::string &typeName, const ROOT::RCreateFieldOptions &options, const ROOT::RNTupleDescriptor *desc, ROOT::DescriptorId_t fieldId)
Factory method to resurrect a field from the stored on-disk type information.
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.
@ kDiffTypeName
The in-memory field and the on-disk field have different type names.
@ kDiffTypeVersion
The in-memory field and the on-disk field differ in the type version.
Metadata stored for every field of an RNTuple.
ROOT::DescriptorId_t GetId() const
const std::vector< ROOT::DescriptorId_t > & GetLinkIds() const
std::optional< std::uint32_t > GetTypeChecksum() const
std::uint32_t GetTypeVersion() const
const std::string & GetTypeName() const
void ReadTObject(void *to, UInt_t uniqueID, UInt_t bits)
RField(std::string_view fieldName, const RField< TObject > &source)
Used by CloneImpl()
static std::size_t GetOffsetBits()
static std::size_t GetOffsetUniqueID()
Classes with dictionaries that can be inspected by TClass.
RField(std::string_view name)
RMapField(std::string_view fieldName, EMapType mapType, 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 > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
The on-storage metadata of an RNTuple.
RFieldDescriptorIterable GetFieldIterable(const RFieldDescriptor &fieldDesc) const
const RFieldDescriptor & GetFieldDescriptor(ROOT::DescriptorId_t fieldId) const
const std::string & GetName() const
std::string GetTypeNameForComparison(const RFieldDescriptor &fieldDesc) const
Adjust the type name of the passed RFieldDescriptor for comparison with another renormalized type nam...
ROOT::DescriptorId_t FindFieldId(std::string_view fieldName, ROOT::DescriptorId_t parentId) const
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
Template specializations for C++ std::pair.
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
RPairField(std::string_view fieldName, std::array< std::unique_ptr< RFieldBase >, 2 > itemFields)
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
Allows for iterating over the elements of a proxied collection.
static RIteratorFuncs GetIteratorFuncs(TVirtualCollectionProxy *proxy, bool readFromDisk)
std::shared_ptr< TVirtualCollectionProxy > fProxy
RCollectionIterableOnce::RIteratorFuncs fIFuncsWrite
std::unique_ptr< RDeleter > fItemDeleter
RProxiedCollectionDeleter(std::shared_ptr< TVirtualCollectionProxy > proxy)
void operator()(void *objPtr, bool dtorOnly) final
std::size_t GetValueSize() const final
What sizeof(T) for this type returns.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
RProxiedCollectionField(std::string_view fieldName, TClass *classp)
Constructor used when the value type of the collection is not known in advance, i....
RCollectionIterableOnce::RIteratorFuncs fIFuncsWrite
ROOT::Internal::RColumnIndex fNWritten
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
RCollectionIterableOnce::RIteratorFuncs fIFuncsRead
Two sets of functions to operate on iterators, to be used depending on the access type.
std::shared_ptr< TVirtualCollectionProxy > fProxy
The collection proxy is needed by the deleters and thus defined as a shared pointer.
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
std::unique_ptr< RDeleter > GetDeleter() const final
void ReconcileOnDiskField(const RNTupleDescriptor &desc) override
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::size_t GetAlignment() const final
What alignof(T) for this type returns.
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given an existing value for this field.
Template specializations for ROOT's RVec.
static unsigned char * ResizeRVec(void *rvec, std::size_t nItems, std::size_t itemSize, const RFieldBase *itemField, RDeleter *itemDeleter)
RRecordField(std::string_view name, const RRecordField &source)
void AttachItemFields(ContainerT &&itemFields)
std::vector< std::size_t > fOffsets
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.
RSetField(std::string_view fieldName, ESetType setType, std::unique_ptr< RFieldBase > itemField)
void operator()(void *objPtr, bool dtorOnly) final
RStreamerFieldDeleter(TClass *cl)
ROOT::RExtraTypeInfoDescriptor GetExtraTypeInfo() const final
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
ROOT::Internal::RNTupleSerializer::StreamerInfoMap_t fStreamerInfos
streamer info records seen during writing
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
std::uint32_t GetTypeVersion() const final
Indicates an evolution of the C++ type itself.
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
ROOT::Internal::RColumnIndex fIndex
number of bytes written in the current cluster
std::uint32_t GetTypeChecksum() const final
Return the current TClass reported checksum of this class. Only valid if kTraitTypeChecksum is set.
std::unique_ptr< RFieldBase > BeforeConnectPageSource(ROOT::Internal::RPageSource &source) final
Called by ConnectPageSource() before connecting; derived classes may override this as appropriate,...
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void AcceptVisitor(ROOT::Detail::RFieldVisitor &visitor) const final
RStreamerField(std::string_view fieldName, TClass *classp)
size_t GetAlignment() const final
What alignof(T) for this type returns.
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
size_t GetValueSize() const final
What sizeof(T) for this type returns.
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
RTupleField(std::string_view fieldName, std::vector< std::unique_ptr< RFieldBase > > itemFields)
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
std::vector< std::unique_ptr< RDeleter > > fItemDeleters
std::size_t fVariantOffset
void operator()(void *objPtr, bool dtorOnly) final
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.
static constexpr std::size_t kMaxVariants
std::vector< ROOT::Internal::RColumnIndex::ValueType > fNWritten
static std::uint8_t GetTag(const void *variantPtr, std::size_t tagOffset)
Extracts the index from an std::variant and transforms it into the 1-based index used for the switch ...
void GenerateColumns() final
Implementations in derived classes should create the backing columns corresponding to the field type ...
size_t fVariantOffset
In the std::variant memory layout, the actual union of types may start at an offset > 0.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
std::size_t GetValueSize() const final
What sizeof(T) for this type returns.
std::unique_ptr< RDeleter > GetDeleter() const final
void ReconcileOnDiskField(const RNTupleDescriptor &desc) final
For non-artificial fields, check compatibility of the in-memory field and the on-disk field.
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void ConstructValue(void *where) const final
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
size_t fTagOffset
In the std::variant memory layout, at which byte number is the index stored.
RVariantField(std::string_view name, const RVariantField &source)
void ReadGlobalImpl(ROOT::NTupleSize_t globalIndex, void *to) final
static void SetTag(void *variantPtr, std::size_t tagOffset, std::uint8_t tag)
void CommitClusterImpl() final
ReadFuncPtr_t GetReadFunctionPointer() const
Get the pointer to the function to be run for the rule (if it is a read rule).
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
TClass instances represent classes, structs and namespaces in the ROOT type system.
UInt_t GetCheckSum(ECheckSum code=kCurrentCheckSum) const
Call GetCheckSum with validity check.
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfRealData() const
Int_t Size() const
Return size of object of this class.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Version_t GetClassVersion() const
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.
The TEnum class implements the enum type.
EDataType GetUnderlyingType() const
Get the underlying integer type of the enum: enum E { kOne }; // ==> int enum F: long; // ==> long Re...
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
static TEnum * GetEnum(const std::type_info &ti, ESearchAction sa=kALoadAndInterpLookup)
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
@ kIsOnHeap
object is on heap
@ kNotDeleted
object has not been deleted
@ kIsReferenced
if object is referenced by a TRef or TRefArray
RAII helper class that ensures that PushProxy() / PopProxy() are called when entering / leaving a C++...
Defines a common interface to inspect/change the contents of an object that represents a collection.
@ kNeedDelete
The collection contains directly or indirectly (via other collection) some pointers that need explici...
virtual Next_t GetFunctionNext(Bool_t read=kTRUE)=0
Return a pointer to a function that can advance an iterator (see Next_t).
virtual DeleteTwoIterators_t GetFunctionDeleteTwoIterators(Bool_t read=kTRUE)=0
virtual TVirtualCollectionProxy * Generate() const =0
Returns a clean object of the actual class that derives from TVirtualCollectionProxy.
virtual CreateIterators_t GetFunctionCreateIterators(Bool_t read=kTRUE)=0
Return a pointer to a function that can create an iterator pair, where each iterator points to the be...
Abstract Interface class describing Streamer information for one class.
virtual Int_t GetNumber() const =0
TRangeCast< T, false > TRangeStaticCast
TRangeStaticCast is an adapter class that allows the typed iteration through a TCollection.
void SetAllowFieldSubstitutions(RFieldZero &fieldZero, bool val)
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...
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
void CallConnectPageSourceOnField(RFieldBase &, ROOT::Internal::RPageSource &)
std::string GetRNTupleSoARecord(const TClass *cl)
Checks if the "rntuple.SoARecord" class attribute is set in the dictionary.
bool NeedsMetaNameAsAlias(const std::string &metaNormalizedName, std::string &renormalizedAlias, bool isArgInTemplatedUserClass=false)
Checks if the meta normalized name is different from the RNTuple normalized name in a way that would ...
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 ...
ERNTupleSerializationMode GetRNTupleSerializationMode(const TClass *cl)
std::string GetRenormalizedTypeName(const std::string &metaNormalizedName)
Given a type name normalized by ROOT meta, renormalize it for RNTuple. E.g., insert std::prefix.
constexpr bool IsValidAlignment(std::size_t align) noexcept
Return true if align is a valid C++ alignment value: strictly positive and a power of two.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
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...
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.
std::size_t fOffset
offset in fStagingArea
std::unique_ptr< RFieldBase > fField
The field used to read the on-disk data.
TVirtualCollectionProxy::Next_t fNext
TVirtualCollectionProxy::CreateIterators_t fCreateIterators
TVirtualCollectionProxy::DeleteTwoIterators_t fDeleteTwoIterators