Skip to content

Commit

Permalink
[ntuple] remove RColumnGroupDescriptor(Builder)
Browse files Browse the repository at this point in the history
  • Loading branch information
jblomer committed Sep 24, 2024
1 parent 02cd078 commit 0550ae7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 79 deletions.
60 changes: 0 additions & 60 deletions tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class RColumnElementBase;

namespace Internal {
class RColumnDescriptorBuilder;
class RColumnGroupDescriptorBuilder;
class RClusterDescriptorBuilder;
class RClusterGroupDescriptorBuilder;
class RExtraTypeInfoDescriptorBuilder;
Expand Down Expand Up @@ -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<DescriptorId_t> 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<DescriptorId_t> &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
Expand Down Expand Up @@ -1318,30 +1282,6 @@ public:
RResult<RClusterGroupDescriptor> 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<RColumnGroupDescriptor> MoveDescriptor();
};

// clang-format off
/**
\class ROOT::Experimental::Internal::RExtraTypeInfoDescriptorBuilder
Expand Down
19 changes: 0 additions & 19 deletions tree/ntuple/v7/src/RNTupleDescriptor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,6 @@ std::unique_ptr<ROOT::Experimental::RNTupleDescriptor> 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 &&
Expand Down Expand Up @@ -745,18 +738,6 @@ ROOT::Experimental::Internal::RClusterGroupDescriptorBuilder::MoveDescriptor()

////////////////////////////////////////////////////////////////////////////////

ROOT::Experimental::RResult<ROOT::Experimental::RColumnGroupDescriptor>
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::RExtraTypeInfoDescriptor>
ROOT::Experimental::Internal::RExtraTypeInfoDescriptorBuilder::MoveDescriptor()
{
Expand Down

0 comments on commit 0550ae7

Please sign in to comment.