Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions tree/ntuple/inc/ROOT/REntry.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ namespace ROOT {

class RNTupleFillContext;
class RNTupleReader;

namespace Experimental {
class RNTupleAttrSetReader;

namespace Internal {
struct RNTupleAttrEntry;
}
} // namespace Experimental

// clang-format off
/**
Expand All @@ -55,8 +52,8 @@ class REntry {
friend class RNTupleFillContext;
friend class RNTupleModel;
friend class RNTupleReader;
friend class Experimental::RNTupleAttrSetReader;
friend struct Experimental::Internal::RNTupleAttrEntry;
friend class RNTupleAttrSetReader;
friend struct Internal::RNTupleAttrEntry;

private:
/// The entry must be linked to a specific model, identified by a model ID
Expand Down
11 changes: 3 additions & 8 deletions tree/ntuple/inc/ROOT/RFieldBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ class RFieldVisitor;
class RRawPtrWriteEntry;
} // namespace Detail

namespace Experimental {
class RNTupleAttrSetReader;
}

namespace Internal {

Expand All @@ -65,11 +63,8 @@ ROOT::RResult<std::unique_ptr<ROOT::RFieldBase>>
CallFieldBaseCreate(const std::string &fieldName, const std::string &typeName, const ROOT::RCreateFieldOptions &options,
const ROOT::RNTupleDescriptor *desc, ROOT::DescriptorId_t fieldId);

} // namespace Internal

namespace Experimental::Internal {
struct RNTupleAttrEntry;
}
} // namespace Internal

// clang-format off
/**
Expand All @@ -89,7 +84,7 @@ This is and can only be partially enforced through C++.
class RFieldBase {
friend class RFieldZero; // to reset fParent pointer in ReleaseSubfields()
friend class ROOT::Detail::RRawPtrWriteEntry; // to call Append()
friend class ROOT::Experimental::RNTupleAttrSetReader; // for field->Read() in LoadEntry()
friend class ROOT::RNTupleAttrSetReader; // for field->Read() in LoadEntry()
friend struct ROOT::Internal::RFieldCallbackInjector; // used for unit tests
friend struct ROOT::Internal::RFieldRepresentationModifier; // used for unit tests
friend void Internal::CallFlushColumnsOnField(RFieldBase &);
Expand Down Expand Up @@ -771,7 +766,7 @@ public:
class RFieldBase::RValue final {
friend class RFieldBase;
friend class ROOT::REntry;
friend struct ROOT::Experimental::Internal::RNTupleAttrEntry;
friend struct ROOT::Internal::RNTupleAttrEntry;

private:
RFieldBase *fField = nullptr; ///< The field that created the RValue
Expand Down
9 changes: 3 additions & 6 deletions tree/ntuple/inc/ROOT/RNTupleAttrReading.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ class REntry;
class RNTupleDescriptor;
class RNTupleModel;

namespace Experimental {

class RNTupleAttrEntryIterable;

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrRange
\class ROOT::RNTupleAttrRange
\ingroup NTuple
\brief A range of main entries referred to by an attribute entry

Expand Down Expand Up @@ -83,7 +81,7 @@ public:

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrSetReader
\class ROOT::RNTupleAttrSetReader
\ingroup NTuple
\brief Class used to read a RNTupleAttrSet in the context of a RNTupleReader

Expand Down Expand Up @@ -163,7 +161,7 @@ public:

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrEntryIterable
\class ROOT::RNTupleAttrEntryIterable
\ingroup NTuple
\brief Iterable class used to loop over attribute entries.

Expand Down Expand Up @@ -237,7 +235,6 @@ public:
RIterator end() { return RIterator{fReader->fEntryRanges.end(), fReader->fEntryRanges.end(), fFilter}; }
};

} // namespace Experimental
} // namespace ROOT

#endif
4 changes: 2 additions & 2 deletions tree/ntuple/inc/ROOT/RNTupleAttrUtils.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <cstddef>
#include <cstdint>

namespace ROOT::Experimental::Internal::RNTupleAttributes {
namespace ROOT::Internal::RNTupleAttributes {

/*
Attribute RNTuples have a fixed Model schema that looks like this:
Expand Down Expand Up @@ -48,6 +48,6 @@ enum : std::size_t {
inline constexpr const char *kMetaFieldNames[] = {"_rangeStart", "_rangeLen", "_userData"};
static_assert(kMetaFieldIndex_Count == sizeof(kMetaFieldNames) / sizeof(kMetaFieldNames[0]));

} // namespace ROOT::Experimental::Internal::RNTupleAttributes
} // namespace ROOT::Internal::RNTupleAttributes

#endif
13 changes: 5 additions & 8 deletions tree/ntuple/inc/ROOT/RNTupleAttrWriting.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ class RNTupleModel;
class RNTuple;
class RNTupleWriter;

namespace Experimental {

class RNTupleAttrSetWriter;

namespace Internal {

// clang-format off
/**
\class ROOT::Experimental::Internal::RNTupleAttrEntry
\class ROOT::Internal::RNTupleAttrEntry
\ingroup NTuple
\brief A pair of scoped + meta entry used by the RNTupleAttrSetWriter.

Expand All @@ -49,7 +47,7 @@ struct RNTupleAttrEntry {

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrPendingRange
\class ROOT::RNTupleAttrPendingRange
\ingroup NTuple
\brief A not-yet-finalized Attribute Range used for writing

Expand All @@ -59,7 +57,7 @@ For the same reason, it can only be created by the AttrSetWriter.
*/
// clang-format on
class RNTupleAttrPendingRange final {
friend class ROOT::Experimental::RNTupleAttrSetWriter;
friend class ROOT::RNTupleAttrSetWriter;

ROOT::NTupleSize_t fStart = 0;
std::uint64_t fModelId = 0;
Expand Down Expand Up @@ -113,7 +111,7 @@ public:

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrSetWriter
\class ROOT::RNTupleAttrSetWriter
\ingroup NTuple
\brief Class used to write an RNTupleAttrSet in the context of an RNTupleWriter.

Expand Down Expand Up @@ -205,7 +203,7 @@ public:

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrSetWriterHandle
\class ROOT::RNTupleAttrSetWriterHandle
\ingroup NTuple
\brief Non-owning handle to an RNTupleAttrSetWriter

Expand Down Expand Up @@ -238,7 +236,6 @@ public:
}
};

} // namespace Experimental
} // namespace ROOT

#endif
36 changes: 13 additions & 23 deletions tree/ntuple/inc/ROOT/RNTupleDescriptor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class RClusterGroupDescriptorBuilder;
class RExtraTypeInfoDescriptorBuilder;
class RFieldDescriptorBuilder;
class RNTupleDescriptorBuilder;
class RNTupleAttrSetDescriptorBuilder;

RNTupleDescriptor CloneDescriptorSchema(const RNTupleDescriptor &desc);
struct RNTupleClusterBoundaries {
Expand All @@ -68,18 +69,16 @@ struct RNTupleClusterBoundaries {
std::vector<ROOT::Internal::RNTupleClusterBoundaries> GetClusterBoundaries(const RNTupleDescriptor &desc);
} // namespace Internal

namespace Experimental {

// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrSetDescriptor
\class ROOT::RNTupleAttrSetDescriptor
\ingroup NTuple
\brief Metadata stored for every Attribute Set linked to an RNTuple.
*/
// clang-format on
class RNTupleAttrSetDescriptor final {
friend class Experimental::Internal::RNTupleAttrSetDescriptorBuilder;

friend class Internal::RNTupleAttrSetDescriptorBuilder;
std::uint16_t fSchemaVersionMajor = 0;
std::uint16_t fSchemaVersionMinor = 0;
std::uint32_t fAnchorLength = 0; ///< uncompressed size of the linked anchor
Expand Down Expand Up @@ -108,10 +107,6 @@ public:
RNTupleAttrSetDescriptor Clone() const;
};

class RNTupleAttrSetDescriptorIterable;

} // namespace Experimental

// clang-format off
/**
\class ROOT::RFieldDescriptor
Expand Down Expand Up @@ -765,7 +760,7 @@ private:
/// Potentially a subset of all the available clusters
std::unordered_map<ROOT::DescriptorId_t, RClusterDescriptor> fClusterDescriptors;
/// List of AttributeSets linked to this RNTuple
std::vector<Experimental::RNTupleAttrSetDescriptor> fAttributeSets;
std::vector<RNTupleAttrSetDescriptor> fAttributeSets;

// We don't expose this publicly because when we add sharded clusters, this interface does not make sense anymore
ROOT::DescriptorId_t FindClusterId(ROOT::NTupleSize_t entryIdx) const;
Expand Down Expand Up @@ -806,7 +801,7 @@ public:
class RClusterGroupDescriptorIterable;
class RClusterDescriptorIterable;
class RExtraTypeInfoDescriptorIterable;
friend class Experimental::RNTupleAttrSetDescriptorIterable;
class RNTupleAttrSetDescriptorIterable;

/// Modifiers passed to CreateModel()
struct RCreateModelOptions {
Expand Down Expand Up @@ -907,7 +902,7 @@ public:

RExtraTypeInfoDescriptorIterable GetExtraTypeInfoIterable() const;

ROOT::Experimental::RNTupleAttrSetDescriptorIterable GetAttrSetIterable() const;
RNTupleAttrSetDescriptorIterable GetAttrSetIterable() const;

const std::string &GetName() const { return fName; }
const std::string &GetDescription() const { return fDescription; }
Expand Down Expand Up @@ -1316,16 +1311,15 @@ public:
RIterator end() { return RIterator(fNTuple.fExtraTypeInfoDescriptors.cend()); }
};

namespace Experimental {
// clang-format off
/**
\class ROOT::Experimental::RNTupleAttrSetDescriptorIterable
\class ROOT::RNTupleAttrSetDescriptorIterable
\ingroup NTuple
\brief Used to loop over all the Attribute Sets linked to an RNTuple
*/
// clang-format on
// TODO: move this to RNTupleDescriptor::RNTupleAttrSetDescriptorIterable when it moves out of Experimental.
class RNTupleAttrSetDescriptorIterable final {
class RNTupleDescriptor::RNTupleAttrSetDescriptorIterable final {
private:
/// The associated RNTuple for this range.
const RNTupleDescriptor &fNTuple;
Expand Down Expand Up @@ -1368,7 +1362,6 @@ public:
RIterator begin() { return RIterator(fNTuple.fAttributeSets.cbegin()); }
RIterator end() { return RIterator(fNTuple.fAttributeSets.cend()); }
};
} // namespace Experimental

// clang-format off
/**
Expand Down Expand Up @@ -1444,9 +1437,9 @@ public:
}
};

namespace Experimental::Internal {
namespace Internal {
class RNTupleAttrSetDescriptorBuilder final {
ROOT::Experimental::RNTupleAttrSetDescriptor fDesc;
ROOT::RNTupleAttrSetDescriptor fDesc;

public:
RNTupleAttrSetDescriptorBuilder &Name(std::string_view name)
Expand All @@ -1473,11 +1466,8 @@ public:

/// Attempt to make an AttributeSet descriptor. This may fail if the builder
/// was not given enough information to make a proper descriptor.
RResult<ROOT::Experimental::RNTupleAttrSetDescriptor> MoveDescriptor();
RResult<ROOT::RNTupleAttrSetDescriptor> MoveDescriptor();
};
} // namespace Experimental::Internal

namespace Internal {

// clang-format off
/**
Expand Down Expand Up @@ -1884,7 +1874,7 @@ public:
RResult<void> AddExtraTypeInfo(RExtraTypeInfoDescriptor &&extraTypeInfoDesc);
void ReplaceExtraTypeInfo(RExtraTypeInfoDescriptor &&extraTypeInfoDesc);

RResult<void> AddAttributeSet(Experimental::RNTupleAttrSetDescriptor &&attrSetDesc);
RResult<void> AddAttributeSet(RNTupleAttrSetDescriptor &&attrSetDesc);

/// Mark the beginning of the header extension; any fields and columns added after a call to this function are
/// annotated as begin part of the header extension.
Expand Down
4 changes: 1 addition & 3 deletions tree/ntuple/inc/ROOT/RNTupleFillContext.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@

namespace ROOT {

namespace Experimental {
class RNTupleAttrSetWriter;
}

// clang-format off
/**
Expand All @@ -52,7 +50,7 @@ sequential writing, please refer to RNTupleWriter.
class RNTupleFillContext {
friend class ROOT::RNTupleWriter;
friend class RNTupleParallelWriter;
friend class ROOT::Experimental::RNTupleAttrSetWriter;
friend class ROOT::RNTupleAttrSetWriter;

private:
/// The page sink's parallel page compression scheduler if IMT is on.
Expand Down
2 changes: 1 addition & 1 deletion tree/ntuple/inc/ROOT/RNTupleReader.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ public:
/// Looks for an attribute set with the given name and creates an RNTupleAttrSetReader for it, with the provided
/// read options.
/// The returned reader has an independent lifetime from this RNTupleReader.
std::unique_ptr<Experimental::RNTupleAttrSetReader>
std::unique_ptr<RNTupleAttrSetReader>
OpenAttributeSet(std::string_view attrSetName, const ROOT::RNTupleReadOptions &options = {});
}; // class RNTupleReader

Expand Down
11 changes: 3 additions & 8 deletions tree/ntuple/inc/ROOT/RNTupleSerialize.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,11 @@ namespace ROOT {
class RNTupleDescriptor;
class RClusterDescriptor;
enum class EExtraTypeInfoIds;

namespace Experimental {
class RNTupleAttrSetDescriptor;
namespace Internal {
class RNTupleAttrSetDescriptorBuilder;
} // namespace Internal
} // namespace Experimental

namespace Internal {

class RNTupleAttrSetDescriptorBuilder;
class RClusterDescriptorBuilder;
class RNTupleDescriptorBuilder;

Expand Down Expand Up @@ -279,10 +274,10 @@ public:
ROOT::Internal::RNTupleDescriptorBuilder &descBuilder);

static RResult<std::uint32_t>
SerializeAttributeSet(const Experimental::RNTupleAttrSetDescriptor &attrSetDesc, void *buffer);
SerializeAttributeSet(const RNTupleAttrSetDescriptor &attrSetDesc, void *buffer);
static RResult<std::uint32_t>
DeserializeAttributeSet(const void *buffer, std::uint64_t bufSize,
Experimental::Internal::RNTupleAttrSetDescriptorBuilder &attrSetDescBld);
Internal::RNTupleAttrSetDescriptorBuilder &attrSetDescBld);

static RResult<RContext> SerializeHeader(void *buffer, const RNTupleDescriptor &desc);
static RResult<std::uint32_t> SerializePageList(void *buffer, const RNTupleDescriptor &desc,
Expand Down
Loading
Loading