From 0550ae70cee401ae54490bebd757c8c9badc1f68 Mon Sep 17 00:00:00 2001 From: Jakob Blomer Date: Mon, 23 Sep 2024 17:44:03 +0200 Subject: [PATCH] [ntuple] remove RColumnGroupDescriptor(Builder) --- tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx | 60 ------------------- tree/ntuple/v7/src/RNTupleDescriptor.cxx | 19 ------ 2 files changed, 79 deletions(-) diff --git a/tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx b/tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx index d0f57a7725f48..a0716cd5281bf 100644 --- a/tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx +++ b/tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx @@ -53,7 +53,6 @@ class RColumnElementBase; namespace Internal { class RColumnDescriptorBuilder; -class RColumnGroupDescriptorBuilder; class RClusterDescriptorBuilder; class RClusterGroupDescriptorBuilder; class RExtraTypeInfoDescriptorBuilder; @@ -200,41 +199,6 @@ public: bool IsSuppressedDeferredColumn() const { return fFirstElementIndex < 0; } }; -// clang-format off -/** -\class ROOT::Experimental::RColumnGroupDescriptor -\ingroup NTuple -\brief Meta-data for a sets of columns; non-trivial column groups are used for sharded clusters - -Clusters can span a subset of columns. Such subsets are described as a column group. An empty column group -is used to denote the column group of all the columns. Every ntuple has at least one column group. -*/ -// clang-format on -class RColumnGroupDescriptor { - friend class Internal::RColumnGroupDescriptorBuilder; - -private: - DescriptorId_t fColumnGroupId = kInvalidDescriptorId; - std::unordered_set fPhysicalColumnIds; - -public: - RColumnGroupDescriptor() = default; - RColumnGroupDescriptor(const RColumnGroupDescriptor &other) = delete; - RColumnGroupDescriptor &operator=(const RColumnGroupDescriptor &other) = delete; - RColumnGroupDescriptor(RColumnGroupDescriptor &&other) = default; - RColumnGroupDescriptor &operator=(RColumnGroupDescriptor &&other) = default; - - bool operator==(const RColumnGroupDescriptor &other) const; - - DescriptorId_t GetId() const { return fColumnGroupId; } - const std::unordered_set &GetPhysicalColumnIds() const { return fPhysicalColumnIds; } - bool Contains(DescriptorId_t physicalId) const - { - return fPhysicalColumnIds.empty() || fPhysicalColumnIds.count(physicalId) > 0; - } - bool HasAllColumns() const { return fPhysicalColumnIds.empty(); } -}; - // clang-format off /** \class ROOT::Experimental::RClusterDescriptor @@ -1318,30 +1282,6 @@ public: RResult MoveDescriptor(); }; -// clang-format off -/** -\class ROOT::Experimental::Internal::RColumnGroupDescriptorBuilder -\ingroup NTuple -\brief A helper class for piece-wise construction of an RColumnGroupDescriptor -*/ -// clang-format on -class RColumnGroupDescriptorBuilder { -private: - RColumnGroupDescriptor fColumnGroup; - -public: - RColumnGroupDescriptorBuilder() = default; - - RColumnGroupDescriptorBuilder &ColumnGroupId(DescriptorId_t columnGroupId) - { - fColumnGroup.fColumnGroupId = columnGroupId; - return *this; - } - void AddColumn(DescriptorId_t physicalId) { fColumnGroup.fPhysicalColumnIds.insert(physicalId); } - - RResult MoveDescriptor(); -}; - // clang-format off /** \class ROOT::Experimental::Internal::RExtraTypeInfoDescriptorBuilder diff --git a/tree/ntuple/v7/src/RNTupleDescriptor.cxx b/tree/ntuple/v7/src/RNTupleDescriptor.cxx index d52f9e06162f5..743da9825e3cb 100644 --- a/tree/ntuple/v7/src/RNTupleDescriptor.cxx +++ b/tree/ntuple/v7/src/RNTupleDescriptor.cxx @@ -534,13 +534,6 @@ std::unique_ptr ROOT::Experimental::RNTup //////////////////////////////////////////////////////////////////////////////// -bool ROOT::Experimental::RColumnGroupDescriptor::operator==(const RColumnGroupDescriptor &other) const -{ - return fColumnGroupId == other.fColumnGroupId && fPhysicalColumnIds == other.fPhysicalColumnIds; -} - -//////////////////////////////////////////////////////////////////////////////// - bool ROOT::Experimental::RClusterGroupDescriptor::operator==(const RClusterGroupDescriptor &other) const { return fClusterGroupId == other.fClusterGroupId && fClusterIds == other.fClusterIds && @@ -745,18 +738,6 @@ ROOT::Experimental::Internal::RClusterGroupDescriptorBuilder::MoveDescriptor() //////////////////////////////////////////////////////////////////////////////// -ROOT::Experimental::RResult -ROOT::Experimental::Internal::RColumnGroupDescriptorBuilder::MoveDescriptor() -{ - if (fColumnGroup.fColumnGroupId == kInvalidDescriptorId) - return R__FAIL("unset column group ID"); - RColumnGroupDescriptor result; - std::swap(result, fColumnGroup); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// - ROOT::Experimental::RResult ROOT::Experimental::Internal::RExtraTypeInfoDescriptorBuilder::MoveDescriptor() {