52#include <unordered_map>
59 {
"Double_t",
"double"},
60 {
"string",
"std::string"},
62 {
"byte",
"std::byte"},
64 {
"int8_t",
"std::int8_t"},
65 {
"signed char",
"char"},
66 {
"UChar_t",
"std::uint8_t"},
67 {
"unsigned char",
"std::uint8_t"},
68 {
"uint8_t",
"std::uint8_t"},
70 {
"Short_t",
"std::int16_t"},
71 {
"int16_t",
"std::int16_t"},
72 {
"short",
"std::int16_t"},
73 {
"UShort_t",
"std::uint16_t"},
74 {
"unsigned short",
"std::uint16_t"},
75 {
"uint16_t",
"std::uint16_t"},
77 {
"Int_t",
"std::int32_t"},
78 {
"int32_t",
"std::int32_t"},
79 {
"int",
"std::int32_t"},
80 {
"UInt_t",
"std::uint32_t"},
81 {
"unsigned",
"std::uint32_t"},
82 {
"unsigned int",
"std::uint32_t"},
83 {
"uint32_t",
"std::uint32_t"},
86 {
"Long_t",
"std::int64_t"},
87 {
"Long64_t",
"std::int64_t"},
88 {
"int64_t",
"std::int64_t"},
89 {
"long",
"std::int64_t"},
90 {
"ULong_t",
"std::uint64_t"},
91 {
"ULong64_t",
"std::uint64_t"},
92 {
"unsigned long",
"std::uint64_t"},
93 {
"uint64_t",
"std::uint64_t"}
99 std::vector<std::string>
result;
133std::tuple<std::string, std::vector<size_t>>
ParseArrayType(std::string_view typeName)
138 while (typeName.back() ==
']') {
145 if (std::from_chars(typeName.data() +
posLBrace + 1, typeName.data() +
posRBrace,
size).ec != std::errc{})
148 typeName.remove_suffix(typeName.size() -
posLBrace);
150 return std::make_tuple(std::string{typeName},
sizeVec);
158 if (typeName ==
"ROOT::Experimental::ClusterSize_t" || typeName.substr(0, 5) ==
"std::" ||
159 typeName.substr(0, 39) ==
"ROOT::Experimental::RNTupleCardinality<")
209class CreateContextGuard;
211 friend class CreateContextGuard;
213 std::vector<std::string> fClassesOnStack;
216 bool fContinueOnError =
false;
219 CreateContext() =
default;
224class CreateContextGuard {
225 CreateContext &fCreateContext;
226 std::size_t fNOriginalClassesOnStack;
227 bool fOriginalContinueOnError;
230 CreateContextGuard(CreateContext &ctx)
231 : fCreateContext(ctx),
232 fNOriginalClassesOnStack(ctx.fClassesOnStack.
size()),
233 fOriginalContinueOnError(ctx.fContinueOnError)
238 fCreateContext.fClassesOnStack.resize(fNOriginalClassesOnStack);
239 fCreateContext.fContinueOnError = fOriginalContinueOnError;
244 if (std::find(fCreateContext.fClassesOnStack.begin(), fCreateContext.fClassesOnStack.end(), cl) !=
245 fCreateContext.fClassesOnStack.end()) {
248 fCreateContext.fClassesOnStack.emplace_back(cl);
258 void **begin =
reinterpret_cast<void **
>(
rvecPtr);
260 std::int32_t *
size =
reinterpret_cast<std::int32_t *
>(begin + 1);
263 std::int32_t *capacity =
size + 1;
265 return {begin,
size, capacity};
281 iTo->SetOnDiskId(
iFrom->GetOnDiskId());
299 constexpr auto dataMemberSz =
sizeof(
void *) + 2 *
sizeof(std::int32_t);
303#ifdef R__HAS_HARDWARE_INTERFERENCE_SIZE
305 constexpr unsigned cacheLineSize = std::hardware_destructive_interference_size;
307 constexpr unsigned cacheLineSize = 64u;
310 constexpr unsigned maxInlineByteSize = 1024;
312 elementsPerCacheLine >= 8 ? elementsPerCacheLine : (
sizeOfT * 8 > maxInlineByteSize ? 0 : 8);
334 return std::max({
alignof(
void *),
alignof(std::int32_t),
alignOfSubField});
341 constexpr auto dataMemberSz =
sizeof(
void *) + 2 *
sizeof(std::int32_t);
348 if (!isSmall &&
owns)
356 field.CommitCluster();
397 : fField(
other.fField),
399 fCapacity(
other.fCapacity),
401 fIsAdopted(
other.fIsAdopted),
402 fNValidValues(
other.fNValidValues),
403 fFirstIndex(
other.fFirstIndex)
412 std::swap(fField,
other.fField);
413 std::swap(fDeleter,
other.fDeleter);
414 std::swap(fValues,
other.fValues);
416 std::swap(fCapacity,
other.fCapacity);
418 std::swap(fIsAdopted,
other.fIsAdopted);
419 std::swap(fMaskAvail,
other.fMaskAvail);
420 std::swap(fNValidValues,
other.fNValidValues);
421 std::swap(fFirstIndex,
other.fFirstIndex);
441 for (std::size_t i = 0; i < fCapacity; ++i) {
442 fDeleter->operator()(GetValuePtrAt(i),
true );
449 if (fCapacity <
size) {
451 throw RException(
R__FAIL(
"invalid attempt to bulk read beyond the adopted buffer"));
457 for (std::size_t i = 0; i <
size; ++i) {
458 fField->ConstructValue(GetValuePtrAt(i));
462 fMaskAvail = std::make_unique<bool[]>(
size);
466 std::fill(fMaskAvail.get(), fMaskAvail.get() +
size,
false);
476 for (std::size_t i = 0; i <
fSize; ++i)
477 fNValidValues +=
static_cast<std::size_t
>(fMaskAvail[i]);
484 fCapacity = capacity;
487 fMaskAvail = std::make_unique<bool[]>(capacity);
502std::unique_ptr<void, typename ROOT::Experimental::RFieldBase::RCreateObjectDeleter<void>::deleter>
503ROOT::Experimental::RFieldBase::CreateObject<void>()
const
527 auto parent = GetParent();
528 while (parent && !parent->GetFieldName().empty()) {
530 parent = parent->GetParent();
543std::vector<ROOT::Experimental::RFieldBase::RCheckResult>
552 std::vector<RCheckResult>
result;
586 for (
int i =
arraySizes.size() - 1; i >= 0; --i) {
592 std::unique_ptr<ROOT::Experimental::RFieldBase>
result;
635 }
else if (
canonicalType.substr(0, 19) ==
"ROOT::VecOps::RVec<") {
649 std::vector<RFieldBase *>
items;
650 for (
unsigned int i = 0; i <
innerTypes.size(); ++i) {
651 items.emplace_back(Create(
"_" + std::to_string(i),
innerTypes[i]).Unwrap().release());
659 std::array<std::unique_ptr<RFieldBase>, 2>
items{Create(
"_0",
innerTypes[0]).Unwrap(),
664 std::vector<std::unique_ptr<RFieldBase>>
items;
665 for (
unsigned int i = 0; i <
innerTypes.size(); ++i) {
666 items.emplace_back(Create(
"_" + std::to_string(i),
innerTypes[i]).Unwrap());
672 }
else if (
canonicalType.substr(0, 16) ==
"std::unique_ptr<") {
684 }
else if (
canonicalType.substr(0, 19) ==
"std::unordered_set<") {
701 result = std::make_unique<RMapField>(
703 }
else if (
canonicalType.substr(0, 19) ==
"std::unordered_map<") {
713 result = std::make_unique<RMapField>(
722 }
else if (
canonicalType.substr(0, 39) ==
"ROOT::Experimental::RNTupleCardinality<") {
727 result = std::make_unique<RField<RNTupleCardinality<std::uint32_t>>>(
fieldName);
728 }
else if (
innerTypes[0] ==
"std::uint64_t") {
729 result = std::make_unique<RField<RNTupleCardinality<std::uint64_t>>>(
fieldName);
747 if (cl->GetCollectionProxy()) {
755 auto error =
e.GetError();
757 std::unique_ptr<RFieldBase>(std::make_unique<RInvalidField>(
fieldName,
canonicalType, error.GetReport()));
774 return R__FAIL(
"name cannot be empty string \"\"");
775 }
else if (
fieldName.find(
'.') != std::string::npos) {
776 return R__FAIL(
"name '" + std::string(
fieldName) +
"' cannot contain dot characters '.'");
791 clone->fTypeAlias = fTypeAlias;
792 clone->fOnDiskId = fOnDiskId;
793 clone->fDescription = fDescription;
795 clone->fColumnRepresentative = fColumnRepresentative;
801 R__ASSERT(
false &&
"A non-simple RField must implement its own AppendImpl");
813 std::size_t
nRead = 0;
814 for (std::size_t i = 0; i <
bulkSpec.fCount; ++i) {
832 void *
where =
operator new(GetValueSize());
834 ConstructValue(
where);
840 void *obj = CreateObjectRawPtr();
844std::vector<ROOT::Experimental::RFieldBase::RValue>
847 return std::vector<RValue>();
854 if (fState != EState::kUnconnected)
855 throw RException(
R__FAIL(
"invalid attempt to attach subfield to already connected field"));
856 child->fParent =
this;
857 fSubFields.emplace_back(std::move(
child));
864 for (
auto f =
this;
f !=
nullptr;
f =
f->GetParent()) {
865 auto parent =
f->GetParent();
866 if (parent && (parent->GetStructure() ==
kCollection || parent->GetStructure() ==
kVariant))
868 result *= std::max(
f->GetNRepetitions(), std::size_t{1U});
875 std::vector<RFieldBase *>
result;
876 result.reserve(fSubFields.size());
877 for (
const auto &
f : fSubFields) {
885 std::vector<const RFieldBase *>
result;
886 result.reserve(fSubFields.size());
887 for (
const auto &
f : fSubFields) {
895 for (
auto& column : fColumns) {
903 if (fState != EState::kUnconnected)
904 throw RException(
R__FAIL(
"cannot set field description once field is connected"));
910 if (fState != EState::kUnconnected)
918 if (fColumnRepresentative)
919 return *fColumnRepresentative;
920 return GetColumnRepresentations().GetSerializationDefault();
925 if (fState != EState::kUnconnected)
926 throw RException(
R__FAIL(
"cannot set column representative once field is connected"));
927 const auto &
validTypes = GetColumnRepresentations().GetSerializationTypes();
931 fColumnRepresentative = &(*itRepresentative);
938 throw RException(
R__FAIL(
"No on-disk column information for field `" + GetQualifiedFieldName() +
"`"));
944 for (
const auto &t : GetColumnRepresentations().GetDeserializationTypes()) {
956 "` cannot be matched."));
961 fReadCallbacks.push_back(func);
963 return fReadCallbacks.size() - 1;
968 fReadCallbacks.erase(fReadCallbacks.begin() + idx);
969 fIsSimple = (fTraits & kTraitMappable) && fReadCallbacks.empty();
974 if ((options.
GetCompression() == 0) && HasDefaultColumnRepresentative()) {
988 SetColumnRepresentative(
rep);
1000 SetColumnRepresentative(
rep);
1003 if (fTypeAlias ==
"Double32_t")
1010 throw RException(
R__FAIL(
"invalid attempt to connect zero field to page sink"));
1011 if (fState != EState::kUnconnected)
1012 throw RException(
R__FAIL(
"invalid attempt to connect an already connected field to a page sink"));
1014 AutoAdjustColumnTypes(
pageSink.GetWriteOptions());
1016 GenerateColumnsImpl();
1017 if (!fColumns.empty())
1018 fPrincipalColumn = fColumns[0].get();
1019 for (
auto &column : fColumns) {
1024 fState = EState::kConnectedToSink;
1030 throw RException(
R__FAIL(
"invalid attempt to connect zero field to page source"));
1031 if (fState != EState::kUnconnected)
1032 throw RException(
R__FAIL(
"invalid attempt to connect an already connected field to a page source"));
1034 if (fColumnRepresentative)
1035 throw RException(
R__FAIL(
"fixed column representative only valid when connecting to a page sink"));
1036 if (!fDescription.empty())
1037 throw RException(
R__FAIL(
"setting description only valid when connecting to a page sink"));
1039 for (
auto &
f : fSubFields) {
1041 f->SetOnDiskId(
pageSource.GetSharedDescriptorGuard()->FindFieldId(
f->GetFieldName(), GetOnDiskId()));
1049 GenerateColumnsImpl(desc);
1051 for (
const auto &
c : fColumns) {
1054 for (
const auto &t : GetColumnRepresentations().GetDeserializationTypes()) {
1056 fColumnRepresentative = &t;
1062 if (!fColumns.empty())
1063 fPrincipalColumn = fColumns[0].get();
1064 for (
auto& column : fColumns)
1065 column->ConnectPageSource(fOnDiskId,
pageSource);
1066 OnConnectPageSource();
1068 fState = EState::kConnectedToSource;
1078std::unique_ptr<ROOT::Experimental::RFieldBase>
1081 auto result = std::make_unique<RFieldZero>();
1082 for (
auto &
f : fSubFields)
1083 result->Attach(
f->Clone(
f->GetFieldName()));
1090 visitor.VisitFieldZero(*
this);
1107 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1112 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1113 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(RColumnModel(
onDiskTypes[0]), 0));
1118 visitor.VisitClusterSizeField(*
this);
1134 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1140 visitor.VisitCardinalityField(*
this);
1166 fColumns.emplace_back(Internal::RColumn::Create<char>(
RColumnModel(GetColumnRepresentative()[0]), 0));
1171 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1177 visitor.VisitCharField(*
this);
1191 fColumns.emplace_back(Internal::RColumn::Create<char>(RColumnModel(GetColumnRepresentative()[0]), 0));
1196 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1197 fColumns.emplace_back(Internal::RColumn::Create<char>(RColumnModel(
onDiskTypes[0]), 0));
1202 visitor.VisitByteField(*
this);
1216 fColumns.emplace_back(Internal::RColumn::Create<std::int8_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1221 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1222 fColumns.emplace_back(Internal::RColumn::Create<std::int8_t>(RColumnModel(
onDiskTypes[0]), 0));
1227 visitor.VisitInt8Field(*
this);
1241 fColumns.emplace_back(Internal::RColumn::Create<std::uint8_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1246 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1247 fColumns.emplace_back(Internal::RColumn::Create<std::uint8_t>(RColumnModel(
onDiskTypes[0]), 0));
1252 visitor.VisitUInt8Field(*
this);
1266 fColumns.emplace_back(Internal::RColumn::Create<bool>(
RColumnModel(GetColumnRepresentative()[0]), 0));
1271 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1277 visitor.VisitBoolField(*
this);
1292 fColumns.emplace_back(Internal::RColumn::Create<float>(
RColumnModel(GetColumnRepresentative()[0]), 0));
1297 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1303 visitor.VisitFloatField(*
this);
1323 fColumns.emplace_back(Internal::RColumn::Create<double>(
RColumnModel(GetColumnRepresentative()[0]), 0));
1328 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1334 visitor.VisitDoubleField(*
this);
1339 fTypeAlias =
"Double32_t";
1354 fColumns.emplace_back(Internal::RColumn::Create<std::int16_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1359 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1360 fColumns.emplace_back(Internal::RColumn::Create<std::int16_t>(RColumnModel(
onDiskTypes[0]), 0));
1365 visitor.VisitInt16Field(*
this);
1380 fColumns.emplace_back(Internal::RColumn::Create<std::uint16_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1385 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1386 fColumns.emplace_back(Internal::RColumn::Create<std::uint16_t>(RColumnModel(
onDiskTypes[0]), 0));
1391 visitor.VisitUInt16Field(*
this);
1406 fColumns.emplace_back(Internal::RColumn::Create<std::int32_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1411 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1412 fColumns.emplace_back(Internal::RColumn::Create<std::int32_t>(RColumnModel(
onDiskTypes[0]), 0));
1432 fColumns.emplace_back(Internal::RColumn::Create<std::uint32_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1437 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1438 fColumns.emplace_back(Internal::RColumn::Create<std::uint32_t>(RColumnModel(
onDiskTypes[0]), 0));
1443 visitor.VisitUInt32Field(*
this);
1458 fColumns.emplace_back(Internal::RColumn::Create<std::uint64_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1463 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1464 fColumns.emplace_back(Internal::RColumn::Create<std::uint64_t>(RColumnModel(
onDiskTypes[0]), 0));
1469 visitor.VisitUInt64Field(*
this);
1489 fColumns.emplace_back(Internal::RColumn::Create<std::int64_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1494 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1495 fColumns.emplace_back(Internal::RColumn::Create<std::int64_t>(RColumnModel(
onDiskTypes[0]), 0));
1500 visitor.VisitInt64Field(*
this);
1518 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
1519 fColumns.emplace_back(Internal::RColumn::Create<char>(RColumnModel(GetColumnRepresentative()[1]), 1));
1524 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1525 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(RColumnModel(
onDiskTypes[0]), 0));
1526 fColumns.emplace_back(Internal::RColumn::Create<char>(RColumnModel(
onDiskTypes[1]), 1));
1535 fColumns[0]->Append(&fIndex);
1536 return length + fColumns[0]->GetElement()->GetPackedSize();
1555 visitor.VisitStringField(*
this);
1570 throw RException(
R__FAIL(
"RField: no I/O support for type " + std::string(className)));
1578 R__FAIL(std::string(className) +
" has an associated collection proxy; use RProxiedCollectionField instead"));
1593 throw RException(
R__FAIL(std::string(
"virtual inheritance is not supported: ") + std::string(className) +
1594 " virtually inherits from " +
baseClass->GetName()));
1619 for (
int dim = 0,
n =
dataMember->GetArrayDim(); dim <
n; ++dim)
1620 typeName +=
"[" + std::to_string(
dataMember->GetMaxIndex(dim)) +
"]";
1631 fMaxAlignment = std::max(fMaxAlignment,
child->GetAlignment());
1632 fSubFieldsInfo.push_back(
info);
1644 auto func =
rule->GetReadFunctionPointer();
1646 fReadCallbacks.emplace_back([func,
classp](
void *
target) {
1656std::unique_ptr<ROOT::Experimental::RFieldBase>
1667 for (
unsigned i = 0; i < fSubFields.size(); i++) {
1668 nbytes += CallAppendOn(*fSubFields[i],
static_cast<const unsigned char *
>(
from) + fSubFieldsInfo[i].fOffset);
1675 for (
unsigned i = 0; i < fSubFields.size(); i++) {
1676 CallReadOn(*fSubFields[i],
globalIndex,
static_cast<unsigned char *
>(
to) + fSubFieldsInfo[i].fOffset);
1682 for (
unsigned i = 0; i < fSubFields.size(); i++) {
1683 CallReadOn(*fSubFields[i],
clusterIndex,
static_cast<unsigned char *
>(
to) + fSubFieldsInfo[i].fOffset);
1695 if (
rule->GetTarget() ==
nullptr)
1724std::vector<ROOT::Experimental::RFieldBase::RValue>
1727 std::vector<RValue>
result;
1729 for (
unsigned i = 0; i < fSubFields.size(); i++) {
1731 fSubFields[i]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(),
basePtr + fSubFieldsInfo[i].fOffset)));
1739 return fClass->GetClassSize();
1744 return fClass->GetClassVersion();
1749 visitor.VisitClassField(*
this);
1762 if (
enump ==
nullptr) {
1770 switch (
enump->GetUnderlyingType()) {
1788 std::unique_ptr<RFieldBase>
intField)
1795std::unique_ptr<ROOT::Experimental::RFieldBase>
1798 auto newIntField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
1802std::vector<ROOT::Experimental::RFieldBase::RValue>
1805 std::vector<RValue>
result;
1806 result.emplace_back(fSubFields[0]->BindValue(
value.GetPtr<
void>()));
1812 visitor.VisitEnumField(*
this);
1826 (
ifuncs.fNext !=
nullptr));
1835 throw RException(
R__FAIL(
"RField: no I/O support for collection proxy type " + std::string(typeName)));
1836 if (!
classp->GetCollectionProxy())
1837 throw RException(
R__FAIL(std::string(typeName) +
" has no associated collection proxy"));
1839 fProxy.reset(
classp->GetCollectionProxy()->Generate());
1842 if (
fProxy->HasPointers())
1843 throw RException(
R__FAIL(
"collection proxies whose value type is a pointer are not supported"));
1844 if (!
fProxy->GetCollectionClass()->HasDictionary()) {
1854 std::string_view typeName,
1863 std::string_view typeName)
1868 throw RException(
R__FAIL(
"custom associative collection proxies not supported"));
1870 std::unique_ptr<ROOT::Experimental::RFieldBase>
itemField;
1876 switch (
fProxy->GetType()) {
1885 itemField = std::make_unique<RField<std::int64_t>>(
"_0");
1889 itemField = std::make_unique<RField<std::uint64_t>>(
"_0");
1903std::unique_ptr<ROOT::Experimental::RFieldBase>
1906 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
1907 return std::unique_ptr<RProxiedCollectionField>(
1917 (fCollectionType ==
kSTLvector ? fItemSize : 0U)}) {
1918 nbytes += CallAppendOn(*fSubFields[0], ptr);
1923 fColumns[0]->Append(&fNWritten);
1924 return nbytes + fColumns[0]->GetElement()->GetPackedSize();
1939 (fCollectionType ==
kSTLvector || obj !=
to ? fItemSize : 0U)}) {
1943 fProxy->Commit(obj);
1957 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(
RColumnModel(GetColumnRepresentative()[0]), 0));
1962 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
1971std::unique_ptr<ROOT::Experimental::RFieldBase::RDeleter>
1976 return std::make_unique<RProxiedCollectionDeleter>(fProxy, GetDeleterOf(*fSubFields[0]),
itemSize);
1978 return std::make_unique<RProxiedCollectionDeleter>(fProxy);
1986 fItemDeleter->operator()(ptr,
true );
1989 fProxy->Destructor(
objPtr,
true );
1993std::vector<ROOT::Experimental::RFieldBase::RValue>
1996 std::vector<RValue>
result;
2000 (fCollectionType ==
kSTLvector ? fItemSize : 0U)}) {
2001 result.emplace_back(fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(), ptr)));
2008 visitor.VisitProxiedCollectionField(*
this);
2014 std::vector<std::unique_ptr<RFieldBase>> &&
itemFields,
2015 const std::vector<std::size_t> &offsets, std::string_view typeName)
2029 std::vector<std::unique_ptr<RFieldBase>> &&
itemFields)
2037 fSize += item->GetValueSize();
2047 std::vector<std::unique_ptr<RFieldBase>> &
itemFields)
2062std::unique_ptr<ROOT::Experimental::RFieldBase>
2065 std::vector<std::unique_ptr<RFieldBase>>
cloneItems;
2067 for (
auto &item : fSubFields)
2068 cloneItems.emplace_back(item->Clone(item->GetFieldName()));
2075 for (
unsigned i = 0; i < fSubFields.size(); ++i) {
2076 nbytes += CallAppendOn(*fSubFields[i],
static_cast<const unsigned char *
>(
from) + fOffsets[i]);
2083 for (
unsigned i = 0; i < fSubFields.size(); ++i) {
2084 CallReadOn(*fSubFields[i],
globalIndex,
static_cast<unsigned char *
>(
to) + fOffsets[i]);
2090 for (
unsigned i = 0; i < fSubFields.size(); ++i) {
2091 CallReadOn(*fSubFields[i],
clusterIndex,
static_cast<unsigned char *
>(
to) + fOffsets[i]);
2097 for (
unsigned i = 0; i < fSubFields.size(); ++i) {
2098 CallConstructValueOn(*fSubFields[i],
static_cast<unsigned char *
>(
where) + fOffsets[i]);
2104 for (
unsigned i = 0; i < fItemDeleters.size(); ++i) {
2105 fItemDeleters[i]->operator()(
reinterpret_cast<unsigned char *
>(
objPtr) + fOffsets[i],
true );
2114 for (
const auto &
f : fSubFields) {
2117 return std::make_unique<RRecordDeleter>(
itemDeleters, fOffsets);
2120std::vector<ROOT::Experimental::RFieldBase::RValue>
2124 std::vector<RValue>
result;
2125 for (
unsigned i = 0; i < fSubFields.size(); ++i) {
2126 result.emplace_back(fSubFields[i]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(),
basePtr + fOffsets[i])));
2134 visitor.VisitRecordField(*
this);
2150std::unique_ptr<ROOT::Experimental::RFieldBase>
2153 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
2164 if (fSubFields[0]->IsSimple() && count) {
2165 GetPrincipalColumnOf(*fSubFields[0])->AppendV(
typedValue->data(), count);
2166 nbytes += count * GetPrincipalColumnOf(*fSubFields[0])->GetElement()->GetPackedSize();
2168 for (
unsigned i = 0; i < count; ++i) {
2169 nbytes += CallAppendOn(*fSubFields[0],
typedValue->data() + (i * fItemSize));
2174 fColumns[0]->Append(&fNWritten);
2175 return nbytes + fColumns[0]->GetElement()->GetPackedSize();
2180 auto typedValue =
static_cast<std::vector<char> *
>(
to);
2186 if (fSubFields[0]->IsSimple()) {
2200 fItemDeleter->operator()(
typedValue->data() + (i * fItemSize),
true );
2204 if (!(fSubFields[0]->GetTraits() & kTraitTriviallyConstructible)) {
2206 CallConstructValueOn(*fSubFields[0],
typedValue->data() + (i * fItemSize));
2210 for (std::size_t i = 0; i <
nItems; ++i) {
2226 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(
RColumnModel(GetColumnRepresentative()[0]), 0));
2231 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
2237 auto vecPtr =
static_cast<std::vector<char> *
>(
objPtr);
2241 for (std::size_t i = 0; i <
nItems; ++i) {
2242 fItemDeleter->operator()(
vecPtr->data() + (i * fItemSize),
true );
2252 return std::make_unique<RVectorDeleter>(fItemSize, GetDeleterOf(*fSubFields[0]));
2253 return std::make_unique<RVectorDeleter>();
2256std::vector<ROOT::Experimental::RFieldBase::RValue>
2259 auto vec =
value.GetPtr<std::vector<char>>();
2262 std::vector<RValue>
result;
2263 for (
unsigned i = 0; i <
nItems; ++i) {
2265 fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(),
vec->data() + (i * fItemSize))));
2272 visitor.VisitVectorField(*
this);
2290std::unique_ptr<ROOT::Experimental::RFieldBase>
2293 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
2302 if (fSubFields[0]->IsSimple() && *
sizePtr) {
2304 nbytes += *
sizePtr * GetPrincipalColumnOf(*fSubFields[0])->GetElement()->GetPackedSize();
2306 auto begin =
reinterpret_cast<const char *
>(*beginPtr);
2307 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
2308 nbytes += CallAppendOn(*fSubFields[0], begin + i * fItemSize);
2313 fColumns[0]->Append(&fNWritten);
2314 return nbytes + fColumns[0]->GetElement()->GetPackedSize();
2328 char *begin =
reinterpret_cast<char *
>(*beginPtr);
2334 const bool needsConstruct = !(fSubFields[0]->GetTraits() & kTraitTriviallyConstructible);
2340 fItemDeleter->operator()(begin + (i * fItemSize),
true );
2349 for (std::size_t i = 0
u; i <
oldSize; ++i) {
2350 fItemDeleter->operator()(begin + (i * fItemSize),
true );
2363 begin =
reinterpret_cast<char *
>(*beginPtr);
2368 for (std::size_t i = 0
u; i <
oldSize; ++i)
2369 CallConstructValueOn(*fSubFields[0], begin + (i * fItemSize));
2377 CallConstructValueOn(*fSubFields[0], begin + (i * fItemSize));
2380 if (fSubFields[0]->IsSimple() &&
nItems) {
2386 for (std::size_t i = 0; i <
nItems; ++i) {
2387 CallReadOn(*fSubFields[0],
collectionStart + i, begin + (i * fItemSize));
2393 if (!fSubFields[0]->IsSimple())
2399 bulkSpec.fAuxData->resize(
sizeof(std::size_t));
2400 *
reinterpret_cast<std::size_t *
>(
bulkSpec.fAuxData->data()) = fSubFields[0]->GetValueSize();
2426 for (std::size_t i = 0; i <
nBatch; ++i) {
2446 for (std::size_t i = 0; i <
bulkSpec.fCount; ++i) {
2453 return RBulkSpec::kAllSet;
2467 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(
RColumnModel(GetColumnRepresentative()[0]), 0));
2472 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
2481 std::int32_t *
sizePtr =
new (
reinterpret_cast<void *
>(
beginPtr + 1)) std::int32_t(0);
2482 new (
sizePtr + 1) std::int32_t(-1);
2489 char *begin =
reinterpret_cast<char *
>(*beginPtr);
2491 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
2492 fItemDeleter->operator()(begin + i * fItemSize,
true );
2503 return std::make_unique<RRVecDeleter>(fSubFields[0]->GetAlignment(), fItemSize, GetDeleterOf(*fSubFields[0]));
2504 return std::make_unique<RRVecDeleter>(fSubFields[0]->GetAlignment());
2507std::vector<ROOT::Experimental::RFieldBase::RValue>
2512 std::vector<RValue>
result;
2513 char *begin =
reinterpret_cast<char *
>(*beginPtr);
2515 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
2516 result.emplace_back(fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(), begin + i * fItemSize)));
2533 visitor.VisitRVecField(*
this);
2548 for (
unsigned i = 0; i < count; ++i) {
2549 bool bval = (*typedValue)[i];
2550 CallAppendOn(*fSubFields[0], &
bval);
2553 fColumns[0]->Append(&fNWritten);
2554 return count + fColumns[0]->GetElement()->GetPackedSize();
2559 auto typedValue =
static_cast<std::vector<bool> *
>(
to);
2566 for (
unsigned i = 0; i <
nItems; ++i) {
2569 (*typedValue)[i] =
bval;
2584 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(RColumnModel(GetColumnRepresentative()[0]), 0));
2589 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
2590 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(RColumnModel(
onDiskTypes[0]), 0));
2593std::vector<ROOT::Experimental::RFieldBase::RValue>
2598 std::vector<RValue>
result;
2599 for (
unsigned i = 0; i < count; ++i) {
2601 result.emplace_back(fSubFields[0]->BindValue(std::shared_ptr<bool>(
new bool(
true))));
2603 result.emplace_back(fSubFields[0]->BindValue(std::shared_ptr<bool>(
new bool(
false))));
2610 visitor.VisitVectorBoolField(*
this);
2628std::unique_ptr<ROOT::Experimental::RFieldBase>
2631 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
2638 auto arrayPtr =
static_cast<const unsigned char *
>(
from);
2639 for (
unsigned i = 0; i < fArrayLength; ++i) {
2640 nbytes += CallAppendOn(*fSubFields[0],
arrayPtr + (i * fItemSize));
2647 auto arrayPtr =
static_cast<unsigned char *
>(
to);
2648 for (
unsigned i = 0; i < fArrayLength; ++i) {
2655 auto arrayPtr =
static_cast<unsigned char *
>(
to);
2656 for (
unsigned i = 0; i < fArrayLength; ++i) {
2664 if (fSubFields[0]->GetTraits() & kTraitTriviallyConstructible)
2668 for (
unsigned i = 0; i < fArrayLength; ++i) {
2669 CallConstructValueOn(*fSubFields[0],
arrayPtr + (i * fItemSize));
2676 for (
unsigned i = 0; i < fArrayLength; ++i) {
2677 fItemDeleter->operator()(
reinterpret_cast<unsigned char *
>(
objPtr) + i * fItemSize,
true );
2685 if (!(fSubFields[0]->GetTraits() & kTraitTriviallyDestructible))
2686 return std::make_unique<RArrayDeleter>(fItemSize, fArrayLength, GetDeleterOf(*fSubFields[0]));
2687 return std::make_unique<RDeleter>();
2690std::vector<ROOT::Experimental::RFieldBase::RValue>
2694 std::vector<RValue>
result;
2695 for (
unsigned i = 0; i < fArrayLength; ++i) {
2697 fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(),
arrayPtr + (i * fItemSize))));
2704 visitor.VisitArrayField(*
this);
2711 std::unique_ptr<ROOT::Experimental::RFieldBase>
itemField,
2724std::unique_ptr<ROOT::Experimental::RFieldBase>
2727 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
2728 return std::make_unique<RArrayAsRVecField>(
newName, std::move(
newItemField), fArrayLength);
2735 std::int32_t *
sizePtr =
new (
reinterpret_cast<void *
>(
beginPtr + 1)) std::int32_t(0);
2740 char *begin =
reinterpret_cast<char *
>(*beginPtr);
2743 if (*
sizePtr == std::int32_t(fArrayLength))
2750 const bool needsConstruct = !(fSubFields[0]->GetTraits() & kTraitTriviallyConstructible);
2756 for (std::int32_t i = 0; i < *
sizePtr; ++i) {
2757 fItemDeleter->operator()(begin + (i * fItemSize),
true );
2770 begin =
reinterpret_cast<char *
>(*beginPtr);
2777 for (std::size_t i = 0; i < fArrayLength; ++i)
2778 CallConstructValueOn(*fSubFields[0], begin + (i * fItemSize));
2785 return std::make_unique<RRVecField::RRVecDeleter>(fSubFields[0]->GetAlignment(), fItemSize,
2786 GetDeleterOf(*fSubFields[0]));
2788 return std::make_unique<RRVecField::RRVecDeleter>(fSubFields[0]->GetAlignment());
2795 auto rvecBeginPtr =
reinterpret_cast<char *
>(*beginPtr);
2797 if (fSubFields[0]->IsSimple()) {
2803 for (std::size_t i = 0; i < fArrayLength; ++i) {
2811 auto rvecBeginPtr =
reinterpret_cast<char *
>(*beginPtr);
2816 if (fSubFields[0]->IsSimple()) {
2817 GetPrincipalColumnOf(*fSubFields[0])
2823 for (std::size_t i = 0; i < fArrayLength; ++i) {
2834std::vector<ROOT::Experimental::RFieldBase::RValue>
2838 std::vector<ROOT::Experimental::RFieldBase::RValue>
result;
2839 for (
unsigned i = 0; i < fArrayLength; ++i) {
2841 fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(),
arrayPtr + (i * fItemSize))));
2848 visitor.VisitArrayAsRVecField(*
this);
2873 fColumns.emplace_back(Internal::RColumn::Create<bool>(
RColumnModel(GetColumnRepresentative()[0]), 0));
2878 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
2887 for (std::size_t
word = 0;
word < (fN + kBitsPerWord - 1) / kBitsPerWord; ++
word) {
2888 for (std::size_t
mask = 0; (
mask < kBitsPerWord) && (i < fN); ++
mask, ++i) {
2900 for (std::size_t i = 0; i < fN; ++i) {
2910 visitor.VisitBitsetField(*
this);
2918 for (
size_t i = 0; i <
itemFields.size(); ++i) {
2937 for (
unsigned int i = 0; i <
nFields; ++i) {
2946std::unique_ptr<ROOT::Experimental::RFieldBase>
2949 auto nFields = fSubFields.size();
2951 for (
unsigned i = 0; i <
nFields; ++i) {
2953 itemFields.emplace_back(fSubFields[i]->Clone(fSubFields[i]->GetFieldName()).release());
2967 *
index =
static_cast<char>(tag - 1);
2972 auto tag = GetTag(
from, fTagOffset);
2976 nbytes += CallAppendOn(*fSubFields[tag - 1],
from);
2977 index = fNWritten[tag - 1]++;
2994 CallConstructValueOn(*fSubFields[tag - 1],
to);
2997 SetTag(
to, fTagOffset, tag);
3009 fColumns.emplace_back(Internal::RColumn::Create<RColumnSwitch>(
RColumnModel(GetColumnRepresentative()[0]), 0));
3014 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
3021 CallConstructValueOn(*fSubFields[0],
where);
3022 SetTag(
where, fTagOffset, 1);
3027 auto tag = GetTag(
objPtr, fTagOffset);
3029 fItemDeleters[tag - 1]->operator()(
objPtr,
true );
3038 for (
const auto &
f : fSubFields) {
3041 return std::make_unique<RVariantDeleter>(fTagOffset,
itemDeleters);
3046 return fMaxItemSize + fMaxAlignment;
3051 std::fill(fNWritten.begin(), fNWritten.end(), 0);
3064 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
3089 nbytes += CallAppendOn(*fSubFields[0], ptr);
3093 fColumns[0]->Append(&fNWritten);
3094 return nbytes + fColumns[0]->GetElement()->GetPackedSize();
3114 fProxy->Commit(obj);
3119 std::vector<RValue>
result;
3123 result.emplace_back(fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(), ptr)));
3130 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
3154 if (HasDefaultColumnRepresentative()) {
3155 if (fSubFields[0]->GetValueSize() < 4) {
3160 fDefaultItemValue = std::make_unique<RValue>(fSubFields[0]->CreateValue());
3163 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(
RColumnModel(GetColumnRepresentative()[0]), 0));
3169 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
3181 fPrincipalColumn->Append(&
mask);
3182 return 1 + CallAppendOn(*fSubFields[0], fDefaultItemValue->GetPtr<
void>().get());
3184 fPrincipalColumn->Append(&fNWritten);
3194 fPrincipalColumn->Append(&
mask);
3198 fPrincipalColumn->Append(&fNWritten);
3219 visitor.VisitNullableField(*
this);
3230std::unique_ptr<ROOT::Experimental::RFieldBase>
3233 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
3234 return std::make_unique<RUniquePtrField>(
newName, GetTypeName(), std::move(
newItemField));
3239 auto typedValue =
static_cast<const std::unique_ptr<char> *
>(
from);
3243 return AppendNull();
3249 auto ptr =
static_cast<std::unique_ptr<char> *
>(
to);
3261 fItemDeleter->operator()(
valuePtr,
false );
3270 CallConstructValueOn(*fSubFields[0],
valuePtr);
3271 ptr->reset(
reinterpret_cast<char *
>(
valuePtr));
3281 fItemDeleter->operator()(
typedPtr->get(),
false );
3289 return std::make_unique<RUniquePtrDeleter>(GetDeleterOf(*fSubFields[0]));
3292std::vector<ROOT::Experimental::RFieldBase::RValue>
3295 std::vector<RValue>
result;
3296 const auto &ptr =
value.GetRef<std::unique_ptr<char>>();
3298 result.emplace_back(fSubFields[0]->BindValue(std::shared_ptr<void>(
value.GetPtr<
void>(), ptr.get())));
3306ROOT::Experimental::RPairField::RPairField::GetTypeList(
const std::array<std::unique_ptr<RFieldBase>, 2> &
itemFields)
3312 std::array<std::unique_ptr<RFieldBase>, 2> &&
itemFields,
3313 const std::array<std::size_t, 2> &offsets)
3315 "std::pair<" + GetTypeList(
itemFields) +
">")
3320 std::array<std::unique_ptr<RFieldBase>, 2> &
itemFields)
3322 "std::pair<" + GetTypeList(
itemFields) +
">")
3333 fOffsets[0] =
firstElem->GetThisOffset();
3341std::unique_ptr<ROOT::Experimental::RFieldBase>
3344 std::array<std::unique_ptr<RFieldBase>, 2>
items{fSubFields[0]->Clone(fSubFields[0]->GetFieldName()),
3345 fSubFields[1]->Clone(fSubFields[1]->GetFieldName())};
3366ROOT::Experimental::RTupleField::RTupleField::GetTypeList(
const std::vector<std::unique_ptr<RFieldBase>> &
itemFields)
3370 throw RException(
R__FAIL(
"the type list for std::tuple must have at least one element"));
3371 for (
size_t i = 0; i <
itemFields.size(); ++i) {
3379 std::vector<std::unique_ptr<RFieldBase>> &&
itemFields,
3380 const std::vector<std::size_t> &offsets)
3382 "std::tuple<" + GetTypeList(
itemFields) +
">")
3387 std::vector<std::unique_ptr<RFieldBase>> &
itemFields)
3389 "std::tuple<" + GetTypeList(
itemFields) +
">")
3401 for (
unsigned i = 0; i < fSubFields.size(); ++i) {
3402 std::string
memberName(
"_" + std::to_string(i));
3406 fOffsets.push_back(
member->GetThisOffset());
3410std::unique_ptr<ROOT::Experimental::RFieldBase>
3413 std::vector<std::unique_ptr<RFieldBase>>
items;
3414 items.reserve(fSubFields.size());
3415 for (
const auto &item : fSubFields)
3416 items.push_back(item->Clone(item->GetFieldName()));
3442 for (std::size_t i = 0; i <
N; ++i) {
3458 fColumns.emplace_back(Internal::RColumn::Create<ClusterSize_t>(
RColumnModel(GetColumnRepresentative()[0]), 0));
3463 auto onDiskTypes = EnsureCompatibleColumnTypes(desc);
3467std::unique_ptr<ROOT::Experimental::RFieldBase>
3470 auto parent = std::make_unique<RFieldZero>();
3471 for (
auto&
f : fSubFields) {
3472 parent->Attach(
f->Clone(
f->GetFieldName()));
3474 return std::make_unique<RCollectionField>(
newName, fCollectionWriter, std::move(parent));
3481 std::size_t
bytesWritten = fCollectionWriter->fBytesWritten;
3482 fCollectionWriter->fBytesWritten = 0;
3484 fColumns[0]->Append(
from);
3485 return bytesWritten + fColumns[0]->GetElement()->GetPackedSize();
3490 R__ASSERT(
false &&
"should never read an RCollectionField");
3495 *fCollectionWriter->GetOffsetPtr() = 0;
3511std::unique_ptr<ROOT::Experimental::RFieldBase>
3514 auto newItemField = fSubFields[0]->Clone(fSubFields[0]->GetFieldName());
3518std::vector<ROOT::Experimental::RFieldBase::RValue>
3521 std::vector<RValue>
result;
3522 result.emplace_back(fSubFields[0]->BindValue(
value.GetPtr<
void>()));
3528 visitor.VisitAtomicField(*
this);
#define R__FORWARD_RESULT(res)
Short-hand to return an RResult<T> value from a subroutine to the calling stack frame.
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
ROOT::Experimental::RField< T > RField
#define R__LOG_WARNING(...)
TObject * clone(const char *newname) const override
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.
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 mask
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 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 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 length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
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 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.
static std::string GetTypeName(EColumnType type)
Abstract interface to write data into an ntuple.
Abstract interface to read data from an ntuple.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
The size of a value of this field, i.e. an RVec.
std::size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::size_t fValueSize
The length of the arrays in this field.
std::unique_ptr< RDeleter > GetDeleter() const final
Returns an RRVecField::RRVecDeleter.
RArrayAsRVecField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField, std::size_t arrayLength)
Constructor of the field.
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(Detail::RFieldVisitor &visitor) const final
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final
std::vector< RFieldBase::RValue > SplitValue(const RFieldBase::RValue &value) const final
Creates the list of direct child values given a value for this field.
std::unique_ptr< RDeleter > fItemDeleter
void operator()(void *objPtr, bool dtorOnly) final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final
std::unique_ptr< RDeleter > GetDeleter() const final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
RArrayField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField, std::size_t arrayLength)
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
RAtomicField(std::string_view fieldName, std::string_view typeName, std::unique_ptr< RFieldBase > itemField)
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
RBitsetField(std::string_view fieldName, std::size_t N)
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
const RField< RNTupleCardinality< std::uint32_t > > * As32Bit() const
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
const RField< RNTupleCardinality< std::uint64_t > > * As64Bit() const
void operator()(void *objPtr, bool dtorOnly) final
The field for a class with dictionary.
void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final
static constexpr const char * kPrefixInherited
Prefix used in the subfield names generated for base classes.
void Attach(std::unique_ptr< RFieldBase > child, RSubFieldInfo info)
void OnConnectPageSource() final
Called by ConnectPageSource() only once connected; derived classes may override this as appropriate.
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void ReadGlobalImpl(NTupleSize_t globalIndex, 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 AddReadCallbacksFromIORules(const std::span< const TSchemaRule * > rules, TClass *classp=nullptr)
Register post-read callbacks corresponding to a list of ROOT I/O customization rules.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const override
std::uint32_t GetTypeVersion() const final
Indicates an evolution of the C++ type itself.
RClassField(std::string_view fieldName, std::string_view className, TClass *classp)
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void CommitClusterImpl() final
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
Holds the static meta-data of an RNTuple column.
Holds the index and the tag of a kSwitch column.
The field for an unscoped or scoped enum with dictionary.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
REnumField(std::string_view fieldName, std::string_view enumName, TEnum *enump)
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
Base class for all ROOT issued exceptions.
Similar to RValue but manages an array of consecutive values.
std::unique_ptr< bool[]> fMaskAvail
Masks invalid values in the array.
void AdoptBuffer(void *buf, std::size_t capacity)
RBulk & operator=(const RBulk &)=delete
void Reset(RClusterIndex firstIndex, std::size_t size)
Sets a new range for the bulk.
void * fValues
Cached deleter of fField.
std::unique_ptr< RFieldBase::RDeleter > fDeleter
Some fields have multiple possible column representations, e.g.
std::vector< ColumnRepresentation_t > TypesList_t
TypesList_t fSerializationTypes
TypesList_t fDeserializationTypes
The union of the serialization types and the deserialization extra types.
Points to an object with RNTuple I/O support and keeps a pointer to the corresponding field.
void BindRawPtr(void *rawPtr)
A field translates read and write calls from/to underlying columns to/from tree values.
virtual void GenerateColumnsImpl()=0
Creates the backing columns corresponsing to the field type for writing.
static constexpr int kTraitTriviallyDestructible
The type is cleaned up just by freeing its memory. I.e. the destructor performs a no-op.
void Attach(std::unique_ptr< RFieldBase > child)
Add a new subfield to the list of nested fields.
void AutoAdjustColumnTypes(const RNTupleWriteOptions &options)
When connecting a field to a page sink, the field's default column representation is subject to adjus...
const ColumnRepresentation_t & EnsureCompatibleColumnTypes(const RNTupleDescriptor &desc) const
Returns the on-disk column types found in the provided descriptor for fOnDiskId.
ENTupleStructure fStructure
The role of this field in the data model structure.
std::vector< RFieldBase * > GetSubFields()
static std::vector< RCheckResult > Check(const std::string &fieldName, const std::string &typeName)
Checks if the given type is supported by RNTuple.
static constexpr int kTraitMappable
A field of a fundamental type that can be directly mapped via RField<T>::Map(), i....
std::function< void(void *)> ReadCallback_t
static constexpr int kTraitTriviallyConstructible
No constructor needs to be called, i.e.
virtual void AcceptVisitor(Detail::RFieldVisitor &visitor) const
std::size_t fNRepetitions
For fixed sized arrays, the array length.
friend class ROOT::Experimental::RCollectionField
RFieldBase * fParent
Sub fields point to their mother field.
int fTraits
Properties of the type that allow for optimizations of collections of that type.
static std::unique_ptr< RDeleter > GetDeleterOf(const RFieldBase &other)
void ConnectPageSink(Internal::RPageSink &pageSink, NTupleSize_t firstEntry=0)
Fields and their columns live in the void until connected to a physical page storage.
virtual std::size_t AppendImpl(const void *from)
Operations on values of complex types, e.g.
bool fIsSimple
A field qualifies as simple if it is both mappable and has no post-read callback.
std::string GetQualifiedFieldName() const
Returns the field name and parent field names separated by dots ("grandparent.parent....
std::vector< EColumnType > ColumnRepresentation_t
virtual std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec)
General implementation of bulk read.
void RemoveReadCallback(size_t idx)
void * CreateObjectRawPtr() const
Factory method for the field's type. The caller owns the returned pointer.
void CommitCluster()
Flushes data from active columns to disk and calls CommitClusterImpl.
void ConnectPageSource(Internal::RPageSource &pageSource)
Connects the field and its sub field tree to the given page source.
RValue CreateValue()
Generates an object of the field type and wraps the created object in a shared pointer and returns it...
std::unique_ptr< RFieldBase > Clone(std::string_view newName) const
Copies the field and its sub fields using a possibly new name and a new, unconnected set of columns.
static RResult< std::unique_ptr< RFieldBase > > Create(const std::string &fieldName, const std::string &canonicalType, const std::string &typeAlias, bool fContinueOnError=false)
Factory method to resurrect a field from the stored on-disk type information.
size_t AddReadCallback(ReadCallback_t func)
Set a user-defined function to be called after reading a value, giving a chance to inspect and/or mod...
virtual std::vector< RValue > SplitValue(const RValue &value) const
Creates the list of direct child values given a value for this field.
void SetOnDiskId(DescriptorId_t id)
std::string fName
The field name relative to its parent field.
void SetColumnRepresentative(const ColumnRepresentation_t &representative)
Fixes a column representative.
std::vector< std::unique_ptr< RFieldBase > > fSubFields
Collections and classes own sub fields.
std::string fType
The C++ type captured by this field.
Internal::RColumn * fPrincipalColumn
Points into fColumns.
static constexpr int kTraitTrivialType
Shorthand for types that are both trivially constructible and destructible.
const ColumnRepresentation_t & GetColumnRepresentative() const
Returns the fColumnRepresentative pointee or, if unset, the field's default representative.
void SetDescription(std::string_view description)
static RResult< void > EnsureValidFieldName(std::string_view fieldName)
Check whether a given string is a valid field name.
NTupleSize_t EntryToColumnElementIndex(NTupleSize_t globalIndex) const
Translate an entry index to a column element index of the principal column and viceversa.
virtual void ReadGlobalImpl(NTupleSize_t globalIndex, void *to)
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 const RColumnRepresentations & GetColumnRepresentations() const
Implementations in derived classes should return a static RColumnRepresentations object.
The container field for an ntuple model, which itself has no physical representation.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
Classes with dictionaries that can be inspected by TClass.
Used in RFieldBase::Check() to record field creation failures.
The generic field for a std::map<KeyType, ValueType> and std::unordered_map<KeyType,...
RMapField(std::string_view fieldName, std::string_view typeName, std::unique_ptr< RFieldBase > itemField)
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
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 a value for this field.
The on-storage meta-data of an ntuple.
const RFieldDescriptor & GetFieldDescriptor(DescriptorId_t fieldId) const
RColumnDescriptorIterable GetColumnIterable() const
Common user-tunable settings for storing ntuples.
int GetCompression() const
bool GetHasSmallClusters() const
The field for values that may or may not be present in an entry.
const RFieldBase::RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
RClusterIndex GetItemIndex(NTupleSize_t globalIndex)
Given the index of the nullable field, returns the corresponding global index of the subfield or,...
RNullableField(std::string_view fieldName, std::string_view typeName, std::unique_ptr< RFieldBase > itemField)
std::size_t AppendValue(const void *from)
void operator()(void *objPtr, bool dtorOnly) final
The generic field for std::pair<T1, T2> types.
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
RPairField(std::string_view fieldName, std::array< std::unique_ptr< RFieldBase >, 2 > &&itemFields, const std::array< std::size_t, 2 > &offsets)
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
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)
void operator()(void *objPtr, bool dtorOnly) final
The field for a class representing a collection of elements via TVirtualCollectionProxy.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
std::size_t AppendImpl(const void *from) override
Operations on values of complex types, e.g.
std::shared_ptr< TVirtualCollectionProxy > fProxy
The collection proxy is needed by the deleters and thus defined as a shared pointer.
RCollectionIterableOnce::RIteratorFuncs fIFuncsRead
Two sets of functions to operate on iterators, to be used depending on the access type.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const override
std::unique_ptr< RDeleter > GetDeleter() const override
RProxiedCollectionField(std::string_view fieldName, std::string_view typeName, TClass *classp)
Constructor used when the value type of the collection is not known in advance, i....
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
std::vector< RValue > SplitValue(const RValue &value) const override
Creates the list of direct child values given a value for this field.
RCollectionIterableOnce::RIteratorFuncs fIFuncsWrite
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) override
void operator()(void *objPtr, bool dtorOnly) final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
std::unique_ptr< RDeleter > fItemDeleter
std::unique_ptr< RDeleter > GetDeleter() const override
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
size_t GetAlignment() const override
As a rule of thumb, the alignment is equal to the size of the type.
size_t GetValueSize() const override
The number of bytes taken by a value of the appropriate type.
RRVecField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
std::size_t ReadBulkImpl(const RBulkSpec &bulkSpec) final
General implementation of bulk read.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
std::size_t AppendImpl(const void *from) override
Operations on values of complex types, e.g.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) override
void operator()(void *objPtr, bool dtorOnly) final
The field for an untyped record.
std::size_t fMaxAlignment
RRecordField(std::string_view fieldName, std::vector< std::unique_ptr< RFieldBase > > &&itemFields, const std::vector< std::size_t > &offsets, std::string_view typeName="")
std::vector< std::size_t > fOffsets
void ReadInClusterImpl(RClusterIndex clusterIndex, void *to) final
std::unique_ptr< RDeleter > GetDeleter() const override
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
std::size_t GetItemPadding(std::size_t baseOffset, std::size_t itemAlignment) const
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
RSetField(std::string_view fieldName, std::string_view typeName, std::unique_ptr< RFieldBase > itemField)
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void operator()(void *objPtr, bool dtorOnly) final
The generic field for std::tuple<Ts...> types.
RTupleField(std::string_view fieldName, std::vector< std::unique_ptr< RFieldBase > > &&itemFields, const std::vector< std::size_t > &offsets)
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
void operator()(void *objPtr, bool dtorOnly) final
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
RUniquePtrField(std::string_view fieldName, std::string_view typeName, std::unique_ptr< RFieldBase > itemField)
std::unique_ptr< RDeleter > GetDeleter() const final
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
void operator()(void *objPtr, bool dtorOnly) final
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
static void SetTag(void *variantPtr, std::size_t tagOffset, std::uint32_t tag)
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void ConstructValue(void *where) const override
Constructs value in a given location of size at least GetValueSize(). Called by the base class' Creat...
static std::string GetTypeList(const std::vector< RFieldBase * > &itemFields)
std::vector< ClusterSize_t::ValueType > fNWritten
size_t fTagOffset
In the std::variant memory layout, at which byte number is the index stored.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
void CommitClusterImpl() final
std::unique_ptr< RDeleter > GetDeleter() const final
static std::uint32_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 ...
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
RVariantField(std::string_view fieldName, const std::vector< RFieldBase * > &itemFields)
void operator()(void *objPtr, bool dtorOnly) final
std::vector< RValue > SplitValue(const RValue &value) const final
Creates the list of direct child values given a value for this field.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
std::size_t AppendImpl(const void *from) final
Operations on values of complex types, e.g.
std::unique_ptr< RDeleter > fItemDeleter
std::unique_ptr< RDeleter > GetDeleter() const final
RVectorField(std::string_view fieldName, std::unique_ptr< RFieldBase > itemField)
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
void ReadGlobalImpl(NTupleSize_t globalIndex, void *to) final
const_iterator begin() const
const_iterator end() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Int_t Size() const
Return size of object of this class.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Int_t GetClassSize() const
Long_t ClassProperty() const
Return the C++ property of this class, eg.
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
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.
The TEnum class implements the enum type.
static TEnum * GetEnum(const std::type_info &ti, ESearchAction sa=kALoadAndInterpLookup)
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...
Wrapper around an object and giving indirect access to its content even if the object is not of a cla...
auto MakeAliasedSharedPtr(T *rawPtr)
void CallConnectPageSinkOnField(RFieldBase &, RPageSink &, NTupleSize_t firstEntry=0)
void CallConnectPageSourceOnField(RFieldBase &, RPageSource &)
void CallCommitClusterOnField(RFieldBase &)
RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
RClusterSize ClusterSize_t
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
constexpr ClusterSize_t kInvalidClusterIndex(std::uint64_t(-1))
constexpr DescriptorId_t kInvalidDescriptorId
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
std::string CleanType(const char *typeDesc, int mode=0, const char **tail=nullptr)
Cleanup type description, redundant blanks removed and redundant tail ignored return *tail = pointer ...
Wrap the integer in a struct in order to avoid template specialization clash with std::uint64_t.
Input parameter to ReadBulk() and ReadBulkImpl(). See RBulk class for more information.
Used in the return value of the Check() method.
std::default_delete< T > deleter