52namespace Experimental {
54class RCollectionField;
55class RCollectionNTupleWriter;
60struct RFieldCallbackInjector;
242 std::size_t nRepetitions = 0);
286 return value.fMappedElement.GetSize();
323 void Attach(std::unique_ptr<Detail::RFieldBase>
child);
363 RSchemaIterator
begin();
364 RSchemaIterator
end();
441 void AcceptVisitor(Detail::RFieldVisitor &visitor) const override;
467 void *fIterator =
nullptr;
468 void *fElementPtr =
nullptr;
493 void *fBegin = &fBeginSmallBuf;
494 void *fEnd = &fEndSmallBuf;
507 std::unique_ptr<TVirtualCollectionProxy>
fProxy;
537 size_t GetAlignment() const final {
return alignof(std::max_align_t); }
539 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
558 std::size_t GetItemPadding(std::size_t baseOffset, std::size_t itemAlignment)
const;
570 template <std::
size_t N>
576 for (
unsigned i = 0; i <
N; ++i) {
577 fOffsets.push_back(offsets[i]);
580 fTraits &= itemFields[i]->GetTraits();
581 Attach(std::move(itemFields[i]));
628 size_t GetValueSize()
const override {
return sizeof(std::vector<char>); }
629 size_t GetAlignment() const final {
return std::alignment_of<std::vector<char>>(); }
631 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
645 std::size_t EvalValueSize()
const;
675 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
711 size_t GetLength()
const {
return fArrayLength; }
720 size_t fMaxItemSize = 0;
723 size_t fTagOffset = 0;
726 static std::string GetTypeList(
const std::vector<Detail::RFieldBase *> &itemFields);
728 std::uint32_t GetTag(
void *variantPtr)
const;
729 void SetTag(
void *variantPtr, std::uint32_t tag)
const;
757template <typename
T, typename=
void>
769 template <
typename... ArgsT>
777template <
typename T,
typename =
void>
782 T, typename std::enable_if<std::is_same<typename T::IsCollectionProxy, std::true_type>::value>
::type>
823template <
typename T,
typename =
void>
854 template <
typename... ArgsT>
857 return Detail::RFieldValue(
this,
static_cast<T*
>(where), std::forward<ArgsT>(args)...);
875 static std::
string TypeName() {
return ""; }
877 std::shared_ptr<RCollectionNTupleWriter> collectionNTuple,
878 std::unique_ptr<RNTupleModel> collectionModel);
902 static std::string
GetTypeList(
const std::array<std::unique_ptr<Detail::RFieldBase>, 2> &itemFields);
908 const std::array<std::size_t, 2> &offsets);
925 static std::string
GetTypeList(
const std::vector<std::unique_ptr<Detail::RFieldBase>> &itemFields);
931 const std::vector<std::size_t> &offsets);
951 return std::make_unique<RField>(newName);
959 static std::
string TypeName() {
return "ROOT::Experimental::ClusterSize_t"; }
983 template <
typename... ArgsT>
988 this,
static_cast<ClusterSize_t*
>(where), std::forward<ArgsT>(args)...);
1016 return std::make_unique<RField<RNTupleCardinality>>(newName);
1025 static std::string
TypeName() {
return "ROOT::Experimental::RNTupleCardinality"; }
1035 template <
typename... ArgsT>
1073 return std::make_unique<RField>(newName);
1081 static std::
string TypeName() {
return "bool"; }
1105 template <
typename... ArgsT>
1110 this,
static_cast<bool*
>(where), std::forward<ArgsT>(args)...);
1126 return std::make_unique<RField>(newName);
1134 static std::
string TypeName() {
return "float"; }
1158 template <
typename... ArgsT>
1163 this,
static_cast<float*
>(where), std::forward<ArgsT>(args)...);
1180 return std::make_unique<RField>(newName);
1188 static std::
string TypeName() {
return "double"; }
1212 template <
typename... ArgsT>
1217 this,
static_cast<double*
>(where), std::forward<ArgsT>(args)...);
1233 return std::make_unique<RField>(newName);
1241 static std::
string TypeName() {
return "char"; }
1265 template <
typename... ArgsT>
1270 this,
static_cast<char*
>(where), std::forward<ArgsT>(args)...);
1283class RField<std::int8_t> :
public Detail::RFieldBase {
1286 return std::make_unique<RField>(newName);
1294 static std::
string TypeName() {
return "std::int8_t"; }
1307 std::int8_t *
Map(
const RClusterIndex &clusterIndex) {
1313 std::int8_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1318 template <
typename... ArgsT>
1321 return Detail::RFieldValue(
1322 Detail::RColumnElement<std::int8_t>(
static_cast<std::int8_t*
>(where)),
1323 this,
static_cast<std::int8_t*
>(where), std::forward<ArgsT>(args)...);
1327 return Detail::RFieldValue(
true ,
1328 Detail::RColumnElement<std::int8_t>(
static_cast<std::int8_t*
>(where)),
this, where);
1330 size_t GetValueSize() const final {
return sizeof(std::int8_t); }
1331 size_t GetAlignment() const final {
return alignof(std::int8_t); }
1332 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1336class RField<std::uint8_t> :
public Detail::RFieldBase {
1339 return std::make_unique<RField>(newName);
1347 static std::
string TypeName() {
return "std::uint8_t"; }
1360 std::uint8_t *
Map(
const RClusterIndex &clusterIndex) {
1366 std::uint8_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1371 template <
typename... ArgsT>
1374 return Detail::RFieldValue(
1375 Detail::RColumnElement<std::uint8_t>(
static_cast<std::uint8_t*
>(where)),
1376 this,
static_cast<std::uint8_t*
>(where), std::forward<ArgsT>(args)...);
1380 return Detail::RFieldValue(
true ,
1381 Detail::RColumnElement<std::uint8_t>(
static_cast<std::uint8_t*
>(where)),
this, where);
1383 size_t GetValueSize() const final {
return sizeof(std::uint8_t); }
1384 size_t GetAlignment() const final {
return alignof(std::uint8_t); }
1385 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1389class RField<std::int16_t> :
public Detail::RFieldBase {
1392 return std::make_unique<RField>(newName);
1400 static std::
string TypeName() {
return "std::int16_t"; }
1413 std::int16_t *
Map(
const RClusterIndex &clusterIndex) {
1419 std::int16_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1424 template <
typename... ArgsT>
1427 return Detail::RFieldValue(
1428 Detail::RColumnElement<std::int16_t>(
static_cast<std::int16_t*
>(where)),
1429 this,
static_cast<std::int16_t*
>(where), std::forward<ArgsT>(args)...);
1433 return Detail::RFieldValue(
true ,
1434 Detail::RColumnElement<std::int16_t>(
static_cast<std::int16_t*
>(where)),
this, where);
1436 size_t GetValueSize() const final {
return sizeof(std::int16_t); }
1437 size_t GetAlignment() const final {
return alignof(std::int16_t); }
1438 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1442class RField<std::uint16_t> :
public Detail::RFieldBase {
1445 return std::make_unique<RField>(newName);
1453 static std::
string TypeName() {
return "std::uint16_t"; }
1466 std::uint16_t *
Map(
const RClusterIndex &clusterIndex) {
1472 std::uint16_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1477 template <
typename... ArgsT>
1480 return Detail::RFieldValue(
1481 Detail::RColumnElement<std::uint16_t>(
static_cast<std::uint16_t*
>(where)),
1482 this,
static_cast<std::uint16_t*
>(where), std::forward<ArgsT>(args)...);
1486 return Detail::RFieldValue(
true ,
1487 Detail::RColumnElement<std::uint16_t>(
static_cast<std::uint16_t*
>(where)),
this, where);
1489 size_t GetValueSize() const final {
return sizeof(std::uint16_t); }
1490 size_t GetAlignment() const final {
return alignof(std::uint16_t); }
1491 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1495class RField<std::int32_t> :
public Detail::RFieldBase {
1498 return std::make_unique<RField>(newName);
1506 static std::
string TypeName() {
return "std::int32_t"; }
1519 std::int32_t *
Map(
const RClusterIndex &clusterIndex) {
1525 std::int32_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1530 template <
typename... ArgsT>
1533 return Detail::RFieldValue(
1534 Detail::RColumnElement<std::int32_t>(
static_cast<std::int32_t*
>(where)),
1535 this,
static_cast<std::int32_t*
>(where), std::forward<ArgsT>(args)...);
1539 return Detail::RFieldValue(
true ,
1540 Detail::RColumnElement<std::int32_t>(
static_cast<std::int32_t*
>(where)),
this, where);
1542 size_t GetValueSize() const final {
return sizeof(std::int32_t); }
1543 size_t GetAlignment() const final {
return alignof(std::int32_t); }
1544 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1548class RField<std::uint32_t> :
public Detail::RFieldBase {
1551 return std::make_unique<RField>(newName);
1559 static std::
string TypeName() {
return "std::uint32_t"; }
1572 std::uint32_t *
Map(
const RClusterIndex clusterIndex) {
1578 std::uint32_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1583 template <
typename... ArgsT>
1586 return Detail::RFieldValue(
1587 Detail::RColumnElement<std::uint32_t>(
static_cast<std::uint32_t*
>(where)),
1588 this,
static_cast<std::uint32_t*
>(where), std::forward<ArgsT>(args)...);
1592 return Detail::RFieldValue(
true ,
1593 Detail::RColumnElement<std::uint32_t>(
static_cast<std::uint32_t*
>(where)),
this, where);
1595 size_t GetValueSize() const final {
return sizeof(std::uint32_t); }
1596 size_t GetAlignment() const final {
return alignof(std::uint32_t); }
1597 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1601class RField<std::uint64_t> :
public Detail::RFieldBase {
1604 return std::make_unique<RField>(newName);
1612 static std::
string TypeName() {
return "std::uint64_t"; }
1625 std::uint64_t *
Map(
const RClusterIndex &clusterIndex) {
1631 std::uint64_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1636 template <
typename... ArgsT>
1639 return Detail::RFieldValue(
1640 Detail::RColumnElement<std::uint64_t>(
static_cast<std::uint64_t*
>(where)),
1641 this,
static_cast<std::uint64_t*
>(where), std::forward<ArgsT>(args)...);
1645 return Detail::RFieldValue(
true ,
1646 Detail::RColumnElement<std::uint64_t>(
static_cast<std::uint64_t*
>(where)),
this, where);
1648 size_t GetValueSize() const final {
return sizeof(std::uint64_t); }
1649 size_t GetAlignment() const final {
return alignof(std::uint64_t); }
1650 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1654class RField<std::int64_t> :
public Detail::RFieldBase {
1657 return std::make_unique<RField>(newName);
1665 static std::
string TypeName() {
return "std::int64_t"; }
1678 std::int64_t *
Map(
const RClusterIndex &clusterIndex) {
1684 std::int64_t *MapV(
const RClusterIndex &clusterIndex,
NTupleSize_t &nItems) {
1689 template <
typename... ArgsT>
1692 return Detail::RFieldValue(
1693 Detail::RColumnElement<std::int64_t>(
static_cast<std::int64_t*
>(where)),
1694 this,
static_cast<std::int64_t*
>(where), std::forward<ArgsT>(args)...);
1698 return Detail::RFieldValue(
true ,
1699 Detail::RColumnElement<std::int64_t>(
static_cast<std::int64_t*
>(where)),
this, where);
1701 size_t GetValueSize() const final {
return sizeof(std::int64_t); }
1702 size_t GetAlignment() const final {
return alignof(std::int64_t); }
1703 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1707class RField<std::string> :
public Detail::RFieldBase {
1710 Detail::RColumnElement<ClusterSize_t, EColumnType::kIndex32> fElemIndex;
1713 return std::make_unique<RField>(newName);
1723 static std::
string TypeName() {
return "std::string"; }
1734 template <
typename... ArgsT>
1737 return Detail::RFieldValue(
this,
static_cast<std::string*
>(where), std::forward<ArgsT>(args)...);
1740 void DestroyValue(
const Detail::RFieldValue&
value,
bool dtorOnly =
false)
override {
1741 auto str =
value.Get<std::string>();
1742 str->~basic_string();
1746 Detail::RFieldValue
CaptureValue(
void *where)
override {
1747 return Detail::RFieldValue(
true ,
this, where);
1749 size_t GetValueSize() const final {
return sizeof(std::string); }
1750 size_t GetAlignment() const final {
return std::alignment_of<std::string>(); }
1752 void AcceptVisitor(Detail::RFieldVisitor &visitor) const final;
1756template <typename ItemT, std::
size_t N>
1757class
RField<std::array<ItemT,
N>> : public RArrayField {
1758 using ContainerT =
typename std::array<ItemT, N>;
1760 static std::string TypeName() {
1764 : RArrayField(
name, std::make_unique<
RField<ItemT>>(
RField<ItemT>::TypeName()),
N)
1771 template <
typename... ArgsT>
1774 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
1781template <
typename ItemT, std::
size_t N>
1790template <
typename... ItemTs>
1792 using ContainerT =
typename std::variant<ItemTs...>;
1794 template <
typename HeadT,
typename... TailTs>
1795 static std::string BuildItemTypes()
1798 if constexpr(
sizeof...(TailTs) > 0)
1799 result +=
"," + BuildItemTypes<TailTs...>();
1803 template <
typename HeadT,
typename... TailTs>
1804 static std::vector<Detail::RFieldBase *> BuildItemFields(
unsigned int index = 0)
1806 std::vector<Detail::RFieldBase *>
result;
1808 if constexpr(
sizeof...(TailTs) > 0) {
1809 auto tailFields = BuildItemFields<TailTs...>(
index + 1);
1810 result.insert(
result.end(), tailFields.begin(), tailFields.end());
1816 static std::string TypeName() {
return "std::variant<" + BuildItemTypes<ItemTs...>() +
">"; }
1823 template <
typename... ArgsT>
1826 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
1833template <
typename ItemT>
1834class RField<std::vector<ItemT>> :
public RVectorField {
1835 using ContainerT =
typename std::vector<ItemT>;
1839 : RVectorField(
name, std::make_unique<
RField<ItemT>>(
"_0"))
1846 template <
typename... ArgsT>
1849 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
1855 return Detail::RFieldValue(
true ,
this, where);
1857 size_t GetValueSize() const final {
return sizeof(ContainerT); }
1862class RField<std::vector<bool>> :
public Detail::RFieldBase {
1868 return std::make_unique<RField>(newName);
1878 static std::
string TypeName() {
return "std::vector<bool>"; }
1885 template <
typename... ArgsT>
1888 return Detail::RFieldValue(
this,
static_cast<std::vector<bool>*
>(where), std::forward<ArgsT>(args)...);
1894 return Detail::RFieldValue(
true ,
this, where);
1896 std::vector<Detail::RFieldValue>
SplitValue(
const Detail::RFieldValue &
value)
const final;
1897 void DestroyValue(
const Detail::RFieldValue&
value,
bool dtorOnly =
false) final;
1899 size_t GetValueSize() const final {
return sizeof(std::vector<bool>); }
1900 size_t GetAlignment() const final {
return std::alignment_of<std::vector<bool>>(); }
1902 void AcceptVisitor(Detail::RFieldVisitor &visitor)
const final;
1906 void GetCollectionInfo(
const RClusterIndex &clusterIndex, RClusterIndex *collectionStart,
ClusterSize_t *
size)
const
1912template <
typename ItemT>
1918 return std::make_unique<RField<ROOT::VecOps::RVec<ItemT>>>(newName, std::move(newItemField));
1923 auto count = typedValue->size();
1924 for (
unsigned i = 0; i < count; ++i) {
1925 auto itemValue =
fSubFields[0]->CaptureValue(&typedValue->data()[i]);
1929 this->fNWritten += count;
1931 return nbytes +
sizeof(elemIndex);
1938 typedValue->resize(nItems);
1939 for (
unsigned i = 0; i < nItems; ++i) {
1940 auto itemValue =
fSubFields[0]->CaptureValue(&typedValue->data()[i]);
1941 fSubFields[0]->Read(collectionStart + i, &itemValue);
1947 :
RRVecField(fieldName, std::move(itemField))
1969 template <
typename... ArgsT>
1981 size_t GetAlignment() const final {
return std::alignment_of<ContainerT>(); }
1984template <
typename T1,
typename T2>
1985class RField<std::pair<T1, T2>> :
public RPairField {
1986 using ContainerT =
typename std::pair<T1,T2>;
1988 template <
typename Ty1,
typename Ty2>
1989 static std::array<std::unique_ptr<Detail::RFieldBase>, 2> BuildItemFields()
1991 return {std::make_unique<RField<Ty1>>(
"_0"), std::make_unique<
RField<Ty2>>(
"_1")};
1999 return std::make_unique<RField<std::pair<T1, T2>>>(newName, std::move(items));
2003 static std::string TypeName() {
2007 : RPairField(
name, std::move(itemFields), {offsetof(ContainerT,
first), offsetof(ContainerT,
second)})
2010 fSize =
sizeof(ContainerT);
2018 template <
typename... ArgsT>
2021 return Detail::RFieldValue(
this,
static_cast<ContainerT*
>(where), std::forward<ArgsT>(args)...);
2026 void DestroyValue(
const Detail::RFieldValue &
value,
bool dtorOnly =
false) final
2028 reinterpret_cast<ContainerT *
>(
value.GetRawPtr())->~pair();
2030 free(
reinterpret_cast<ContainerT *
>(
value.GetRawPtr()));
2034template <
typename... ItemTs>
2035class RField<std::tuple<ItemTs...>> :
public RTupleField {
2036 using ContainerT =
typename std::tuple<ItemTs...>;
2038 template <
typename HeadT,
typename... TailTs>
2039 static std::string BuildItemTypes()
2042 if constexpr (
sizeof...(TailTs) > 0)
2043 result +=
"," + BuildItemTypes<TailTs...>();
2047 template <
typename HeadT,
typename... TailTs>
2048 static void _BuildItemFields(std::vector<std::unique_ptr<Detail::RFieldBase>> &itemFields,
unsigned int index = 0)
2051 if constexpr (
sizeof...(TailTs) > 0)
2052 _BuildItemFields<TailTs...>(itemFields,
index + 1);
2054 template <
typename... Ts>
2055 static std::vector<std::unique_ptr<Detail::RFieldBase>> BuildItemFields()
2057 std::vector<std::unique_ptr<Detail::RFieldBase>>
result;
2058 _BuildItemFields<Ts...>(
result);
2062 template <
unsigned Index,
typename HeadT,
typename... TailTs>
2063 static void _BuildItemOffsets(std::vector<std::size_t> &offsets,
const ContainerT &tuple)
2066 reinterpret_cast<std::uintptr_t
>(&std::get<Index>(tuple)) -
reinterpret_cast<std::uintptr_t
>(&tuple);
2067 offsets.emplace_back(
offset);
2068 if constexpr (
sizeof...(TailTs) > 0)
2069 _BuildItemOffsets<
Index + 1, TailTs...>(offsets, tuple);
2071 template <
typename... Ts>
2072 static std::vector<std::size_t> BuildItemOffsets()
2074 std::vector<std::size_t>
result;
2075 _BuildItemOffsets<0, Ts...>(
result, ContainerT());
2082 std::vector<std::unique_ptr<Detail::RFieldBase>> items;
2084 items.push_back(item->Clone(item->GetName()));
2085 return std::make_unique<
RField<std::tuple<ItemTs...>>>(newName, std::move(items));
2089 static std::string TypeName() {
return "std::tuple<" + BuildItemTypes<ItemTs...>() +
">"; }
2091 : RTupleField(
name, std::move(itemFields), BuildItemOffsets<ItemTs...>())
2094 fSize =
sizeof(ContainerT);
2102 template <
typename... ArgsT>
2105 return Detail::RFieldValue(
this,
static_cast<ContainerT *
>(where), std::forward<ArgsT>(args)...);
2111 void DestroyValue(
const Detail::RFieldValue &
value,
bool dtorOnly =
false) final
2113 reinterpret_cast<ContainerT *
>(
value.GetRawPtr())->~tuple();
2115 free(
reinterpret_cast<ContainerT *
>(
value.GetRawPtr()));
#define R__unlikely(expr)
#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
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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 offset
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 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
Pairs of C++ type and column type, like float and EColumnType::kReal32.
void Append(const RColumnElementBase &element)
CppT * MapV(const NTupleSize_t globalIndex, NTupleSize_t &nItems)
CppT * Map(const NTupleSize_t globalIndex)
void Read(const NTupleSize_t globalIndex, RColumnElementBase *element)
NTupleSize_t GetGlobalIndex(const RClusterIndex &clusterIndex)
NTupleSize_t GetNElements() const
void GetCollectionInfo(const NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *collectionSize)
For offset columns only, look at the two adjacent values that define a collection's coordinates.
Some fields have multiple possible column representations, e.g.
TypesList_t fSerializationTypes
const TypesList_t & GetDeserializationTypes() const
TypesList_t fDeserializationTypes
The union of the serialization types and the deserialization extra types.
const TypesList_t & GetSerializationTypes() const
std::vector< ColumnRepresentation_t > TypesList_t
const ColumnRepresentation_t & GetSerializationDefault() const
The first column list from fSerializationTypes is the default for writing.
Iterates over the sub tree of fields in depth-first search order.
void Advance()
Given that the iterator points to a valid field which is not the end iterator, go to the next field i...
std::vector< Position > fStack
The stack of nodes visited when walking down the tree of fields.
std::ptrdiff_t difference_type
pointer operator->() const
bool operator!=(const iterator &rh) const
reference operator*() const
std::forward_iterator_tag iterator_category
RSchemaIterator(pointer val, int idxInParent)
bool operator==(const iterator &rh) const
virtual std::uint32_t GetFieldVersion() const
Indicates an evolution of the mapping scheme from C++ type to columns.
RFieldBase * GetParent() const
virtual RFieldValue CaptureValue(void *where)=0
Creates a value from a memory location with an already constructed object.
std::string GetDescription() const
Get the field's description.
virtual size_t GetAlignment() const =0
As a rule of thumb, the alignment is equal to the size of the type.
static constexpr std::uint32_t kInvalidTypeVersion
void SetOnDiskId(DescriptorId_t id)
virtual void GenerateColumnsImpl(const RNTupleDescriptor &desc)=0
Creates the backing columns corresponsing to the field type for reading.
virtual void GenerateColumnsImpl()=0
Creates the backing columns corresponsing to the field type for writing.
std::vector< std::unique_ptr< RFieldBase > > fSubFields
Collections and classes own sub fields.
RFieldBase * fParent
Sub fields point to their mother field.
std::string GetName() const
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.
std::size_t GetNRepetitions() const
std::string fDescription
Free text set by the user.
virtual std::uint32_t GetTypeVersion() const
Indicates an evolution of the C++ type itself.
int fTraits
Properties of the type that allow for optimizations of collections of that type.
friend struct ROOT::Experimental::Internal::RFieldCallbackInjector
virtual void DestroyValue(const RFieldValue &value, bool dtorOnly=false)
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
DescriptorId_t GetOnDiskId() const
static constexpr int kTraitTrivialType
Shorthand for types that are both trivially constructible and destructible.
void ConnectPageSink(RPageSink &pageSink)
Fields and their columns live in the void until connected to a physical page storage.
std::uint32_t GetOnDiskTypeVersion() const
Return the C++ type version stored in the field descriptor; only valid after a call to ConnectPageSou...
void RemoveReadCallback(size_t idx)
void Flush() const
Ensure that all received items are written from page buffers to the storage.
virtual void ReadInClusterImpl(const RClusterIndex &clusterIndex, RFieldValue *value)
virtual void CommitCluster()
Perform housekeeping tasks for global to cluster-local index translation.
virtual std::unique_ptr< RFieldBase > CloneImpl(std::string_view newName) const =0
Called by Clone(), which additionally copies the on-disk ID.
virtual size_t GetValueSize() const =0
The number of bytes taken by a value of the appropriate type.
void SetDescription(std::string_view description)
virtual std::vector< RFieldValue > SplitValue(const RFieldValue &value) const
Creates the list of direct child values given a value for this field.
std::string GetType() const
static RResult< void > EnsureValidFieldName(std::string_view fieldName)
Check whether a given string is a valid field name.
RFieldBase(RFieldBase &&)=default
bool fIsSimple
A field qualifies as simple if it is both mappable and has no post-read callback.
std::string fType
The C++ type captured by this field.
static RResult< std::unique_ptr< RFieldBase > > Create(const std::string &fieldName, const std::string &typeName)
Factory method to resurrect a field from the stored on-disk type information.
std::string fName
The field name relative to its parent field.
const ColumnRepresentation_t * fColumnRepresentative
Points into the static vector GetColumnRepresentations().GetSerializationTypes() when SetColumnRepres...
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 void OnConnectPageSource()
Called by ConnectPageSource() only once connected; derived classes may override this as appropriate.
NTupleSize_t GetNElements() const
void ConnectPageSource(RPageSource &pageSource)
std::uint32_t fOnDiskTypeVersion
C++ type version cached from the descriptor after a call to ConnectPageSource()
std::size_t Append(const RFieldValue &value)
Write the given value into columns.
virtual std::size_t AppendImpl(const RFieldValue &value)
Operations on values of complex types, e.g.
std::function< void(RFieldValue &)> ReadCallback_t
virtual const RColumnRepresentations & GetColumnRepresentations() const
Implementations in derived classes should return a static RColumnRepresentations object.
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.
std::size_t fNRepetitions
For fixed sized arrays, the array length.
RFieldBase(const RFieldBase &)=delete
virtual void AcceptVisitor(RFieldVisitor &visitor) const
DescriptorId_t fOnDiskId
When the columns are connected to a page source or page sink, the field represents a field id in the ...
virtual void ReadGlobalImpl(NTupleSize_t globalIndex, RFieldValue *value)
ENTupleStructure fStructure
The role of this field in the data model structure.
void Read(const RClusterIndex &clusterIndex, RFieldValue *value)
void InvokeReadCallbacks(RFieldValue &value)
std::vector< std::unique_ptr< RColumn > > fColumns
The columns are connected either to a sink or to a source (not to both); they are owned by the field.
std::string GetQualifiedFieldName() const
Returns the field name and parent field names separated by dots ("grandparent.parent....
const ColumnRepresentation_t & GetColumnRepresentative() const
Returns the fColumnRepresentative pointee or, if unset, the field's default representative.
static constexpr int kTraitMappable
A field of a fundamental type that can be directly mapped via RField<T>::Map(), i....
void Attach(std::unique_ptr< Detail::RFieldBase > child)
Add a new subfield to the list of nested fields.
std::vector< RFieldBase * > GetSubFields() const
bool HasReadCallbacks() const
virtual RFieldValue GenerateValue(void *where)=0
Generates a tree value in a given location of size at least GetValueSize().
RFieldBase & operator=(const RFieldBase &)=delete
void SetColumnRepresentative(const ColumnRepresentation_t &representative)
Fixes a column representative.
ENTupleStructure GetStructure() const
void Read(NTupleSize_t globalIndex, RFieldValue *value)
Populate a single value with data from the tree, which needs to be of the fitting type.
bool HasDefaultColumnRepresentative() const
Whether or not an explicit column representative was set.
static constexpr int kTraitTriviallyConstructible
No constructor needs to be called, i.e.
static constexpr int kTraitTriviallyDestructible
The type is cleaned up just by freeing its memory. I.e. DestroyValue() is a no-op.
const ColumnRepresentation_t & EnsureCompatibleColumnTypes(const RNTupleDescriptor &desc) const
Returns the on-disk column types found in the provided descriptor for fOnDiskId.
RFieldValue GenerateValue()
Generates an object of the field type and allocates new initialized memory according to the type.
std::vector< ReadCallback_t > fReadCallbacks
List of functions to be called after reading a value.
std::vector< EColumnType > ColumnRepresentation_t
RColumn * fPrincipalColumn
Points into fColumns.
Abstract base class for classes implementing the visitor design pattern.
Abstract interface to write data into an ntuple.
Abstract interface to read data from an ntuple.
The generic field for fixed size arrays, which do not need an offset column.
void GenerateColumnsImpl(const RNTupleDescriptor &) final
Creates the backing columns corresponsing to the field type for reading.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
RArrayField(RArrayField &&other)=default
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
~RArrayField() override=default
The field for a class with dictionary.
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
static constexpr const char * kPrefixInherited
Prefix used in the subfield names generated for base classes.
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 Attach(std::unique_ptr< Detail::RFieldBase > child, RSubFieldInfo info)
std::vector< Detail::RFieldValue > SplitValue(const Detail::RFieldValue &value) const final
Creates the list of direct child values given a value for this field.
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
std::size_t AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
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.
RClassField & operator=(RClassField &&other)=default
void AcceptVisitor(Detail::RFieldVisitor &visitor) const override
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::uint32_t GetTypeVersion() const final
Indicates an evolution of the C++ type itself.
void GenerateColumnsImpl(const RNTupleDescriptor &) final
Creates the backing columns corresponsing to the field type for reading.
void ReadInClusterImpl(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
RClassField(std::string_view fieldName, std::string_view className, TClass *classp)
std::vector< RSubFieldInfo > fSubFieldsInfo
Additional information kept for each entry in fSubFields
std::size_t fMaxAlignment
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
Addresses a column element or field item relative to a particular cluster, instead of a global NTuple...
bool operator!=(const iterator &rh) const
pointer operator*() const
RIterator(const RCollectionIterableOnce &owner, void *iter)
bool operator==(const iterator &rh) const
std::ptrdiff_t difference_type
std::forward_iterator_tag iterator_category
RIterator(const RCollectionIterableOnce &owner)
const RCollectionIterableOnce & fOwner
Allows for iterating over the elements of a proxied collection.
RCollectionIterableOnce(void *collection, const RIteratorFuncs &ifuncs, TVirtualCollectionProxy *proxy)
const RIteratorFuncs & fIFuncs
~RCollectionIterableOnce()
The field for a class representing a collection of elements via TVirtualCollectionProxy.
std::unique_ptr< TVirtualCollectionProxy > fProxy
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
RCollectionIterableOnce::RIteratorFuncs fIFuncsWrite
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
RCollectionIterableOnce::RIteratorFuncs fIFuncsRead
Two sets of functions to operate on iterators, to be used depending on the access type.
The collection field is only used for writing; when reading, untyped collections are projected to an ...
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::shared_ptr< RCollectionNTupleWriter > fCollectionNTuple
Save the link to the collection ntuple in order to reset the offset counter when committing the clust...
~RCollectionField() override=default
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
RCollectionField(RCollectionField &&other)=default
Base class for all ROOT issued exceptions.
A field translates read and write calls from/to underlying columns to/from tree values.
Represents transient storage of simple or complex C++ values.
The container field for an ntuple model, which itself has no physical representation.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const override
Called by Clone(), which additionally copies the on-disk ID.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
Detail::RFieldValue GenerateValue(void *) override
Generates a tree value in a given location of size at least GetValueSize().
Detail::RFieldValue CaptureValue(void *) final
Creates a value from a memory location with an already constructed object.
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
void GenerateColumnsImpl(const RNTupleDescriptor &) final
Creates the backing columns corresponsing to the field type for reading.
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size)
ClusterSize_t * MapV(NTupleSize_t globalIndex, NTupleSize_t &nItems)
RField(std::string_view name)
ClusterSize_t * Map(const RClusterIndex &clusterIndex)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
~RField() override=default
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
RField(RField &&other)=default
ClusterSize_t * Map(NTupleSize_t globalIndex)
ClusterSize_t * MapV(const RClusterIndex &clusterIndex, NTupleSize_t &nItems)
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void GetCollectionInfo(NTupleSize_t globalIndex, RClusterIndex *collectionStart, ClusterSize_t *size)
Special help for offset fields.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
RField & operator=(RField &&other)=default
RField(RField &&other)=default
~RField() override=default
RField(std::string_view name)
void AcceptVisitor(Detail::RFieldVisitor &visitor) const final
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
void ReadInClusterImpl(const RClusterIndex &clusterIndex, Detail::RFieldValue *value) final
Get the number of elements of the collection identified by clusterIndex.
RField & operator=(RField &&other)=default
RField(RField &&other)=default
const RColumnRepresentations & GetColumnRepresentations() const final
Implementations in derived classes should return a static RColumnRepresentations object.
void GenerateColumnsImpl(const RNTupleDescriptor &) final
Creates the backing columns corresponsing to the field type for reading.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
Detail::RFieldValue CaptureValue(void *where) override
Creates a value from a memory location with an already constructed object.
std::unique_ptr< ROOT::Experimental::Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
static std::string TypeName()
RField(std::string_view name)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&...args)
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
Get the number of elements of the collection identified by globalIndex.
RField(std::string_view name)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
void ReadGlobalImpl(NTupleSize_t globalIndex, Detail::RFieldValue *value) final
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
std::size_t AppendImpl(const Detail::RFieldValue &value) final
Operations on values of complex types, e.g.
typename ROOT::VecOps::RVec< ItemT > ContainerT
static std::string TypeName()
~RField() override=default
RField(RField &&other)=default
RField(std::string_view fieldName, std::unique_ptr< Detail::RFieldBase > itemField)
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
void DestroyValue(const Detail::RFieldValue &value, bool dtorOnly=false) final
Releases the resources acquired during GenerateValue (memory and constructor) This implementation wor...
bool * MapV(NTupleSize_t globalIndex, NTupleSize_t &nItems)
RField(std::string_view name)
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
bool * MapV(const RClusterIndex &clusterIndex, NTupleSize_t &nItems)
~RField() override=default
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
RField(RField &&other)=default
bool * Map(const RClusterIndex &clusterIndex)
bool * Map(NTupleSize_t globalIndex)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
char * MapV(NTupleSize_t globalIndex, NTupleSize_t &nItems)
RField(std::string_view name)
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
char * Map(NTupleSize_t globalIndex)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
RField(RField &&other)=default
char * MapV(const RClusterIndex &clusterIndex, NTupleSize_t &nItems)
~RField() override=default
char * Map(const RClusterIndex &clusterIndex)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
double * Map(const RClusterIndex &clusterIndex)
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
double * MapV(NTupleSize_t globalIndex, NTupleSize_t &nItems)
double * MapV(const RClusterIndex &clusterIndex, NTupleSize_t &nItems)
RField(std::string_view name)
~RField() override=default
double * Map(NTupleSize_t globalIndex)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
RField(RField &&other)=default
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
RField(RField &&other)=default
float * MapV(NTupleSize_t globalIndex, NTupleSize_t &nItems)
float * MapV(const RClusterIndex &clusterIndex, NTupleSize_t &nItems)
RField(std::string_view name)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&... args)
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
float * Map(NTupleSize_t globalIndex)
float * Map(const RClusterIndex &clusterIndex)
Detail::RFieldValue CaptureValue(void *where) final
Creates a value from a memory location with an already constructed object.
~RField() override=default
std::unique_ptr< Detail::RFieldBase > CloneImpl(std::string_view newName) const final
Called by Clone(), which additionally copies the on-disk ID.
Classes with dictionaries that can be inspected by TClass.
RField(std::string_view name)
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where, ArgsT &&...args)
RField & operator=(RField &&other)=default
RField(RField &&other)=default
ROOT::Experimental::Detail::RFieldValue GenerateValue(void *where) final
Generates a tree value in a given location of size at least GetValueSize().
static std::string TypeName()
~RField() override=default
The on-storage meta-data of an ntuple.
The generic field for std::pair<T1, T2> types.
~RPairField() override=default
static std::string GetTypeList(const std::array< std::unique_ptr< Detail::RFieldBase >, 2 > &itemFields)
RPairField(RPairField &&other)=default
RPairField & operator=(RPairField &&other)=default
The type-erased field for a RVec<Type>
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
The field for an untyped record.
size_t GetValueSize() const final
The number of bytes taken by a value of the appropriate type.
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
std::vector< std::size_t > fOffsets
RRecordField(RRecordField &&other)=default
RRecordField(std::string_view fieldName, std::array< std::unique_ptr< Detail::RFieldBase >, N > &&itemFields, const std::array< std::size_t, N > &offsets, std::string_view typeName="")
void GenerateColumnsImpl(const RNTupleDescriptor &) final
Creates the backing columns corresponsing to the field type for reading.
~RRecordField() override=default
void GenerateColumnsImpl() final
Creates the backing columns corresponsing to the field type for writing.
RResult<void> has no data member and no Inspect() method but instead a Success() factory method.
The class is used as a return type for operations that can fail; wraps a value of type T or an RError...
The generic field for std::tuple<Ts...> types.
static std::string GetTypeList(const std::vector< std::unique_ptr< Detail::RFieldBase > > &itemFields)
RTupleField & operator=(RTupleField &&other)=default
~RTupleField() override=default
RTupleField(RTupleField &&other)=default
The generic field for std::variant types.
std::vector< ClusterSize_t::ValueType > fNWritten
The generic field for a (nested) std::vector<Type> except for std::vector<bool>
void GetCollectionInfo(const RClusterIndex &clusterIndex, RClusterIndex *collectionStart, ClusterSize_t *size) const
size_t GetAlignment() const final
As a rule of thumb, the alignment is equal to the size of the type.
A "std::vector"-like collection of values implementing handy operation to analyse them.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void(* CreateIterators_t)(void *collection, void **begin_arena, void **end_arena, TVirtualCollectionProxy *proxy)
void *(* Next_t)(void *iter, const void *end)
void(* DeleteTwoIterators_t)(void *begin, void *end)
static const Int_t fgIteratorArenaSize
RooCmdArg Index(RooCategory &icat)
auto Map(Args &&... args)
Create new collection applying a callable to the elements of the input collection.
basic_string_view< char > string_view
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
RClusterSize ClusterSize_t
ENTupleStructure
The fields in the ntuple model tree can carry different structural information about the type system.
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
constexpr DescriptorId_t kInvalidDescriptorId
void(off) SmallVectorTemplateBase< T
std::string GetDemangledTypeName(const std::type_info &t)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
static constexpr double second
Position(RFieldBase *fieldPtr, int idxInParent)
The point here is that we can only tell at run time if a class has an associated collection proxy.
Wrap the integer in a struct in order to avoid template specialization clash with std::uint32_t.
TVirtualCollectionProxy::DeleteTwoIterators_t fDeleteTwoIterators
TVirtualCollectionProxy::CreateIterators_t fCreateIterators
TVirtualCollectionProxy::Next_t fNext
Helper type to present an offset column as array of collection sizes. See RField<RNTupleCardinality> ...