Skip to content

Commit

Permalink
[ntuple] minor improvements to RCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jblomer committed Jun 30, 2020
1 parent 7d57a7d commit b9390c1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
20 changes: 10 additions & 10 deletions tree/ntuple/v7/inc/ROOT/RCluster.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/

#ifndef ROOT7_RCluster
#define ROOT7_RCluster

#include <ROOT/RNTupleUtil.hxx>

#include <unordered_map>
#include <unordered_set>
#include <vector>

#ifndef ROOT7_RCluster
#define ROOT7_RCluster

namespace ROOT {
namespace Experimental {
namespace Detail {


// clang-format off
/**
\class ROOT::Experimental::ROnDiskPage
\class ROnDiskPage
\ingroup NTuple
\brief A page as being stored on disk, that is packed and compressed
Expand All @@ -45,14 +45,14 @@ private:
std::size_t fSize = 0;

public:
/// On disk pages within a page source are identified by the column and page number. The key is used for
/// associative collections of on disk pages.
/// On-disk pages within a page source are identified by the column and page number. The key is used for
/// associative collections of on-disk pages.
struct Key {
DescriptorId_t fColumnId;
NTupleSize_t fPageNo;
Key(DescriptorId_t columnId, NTupleSize_t pageNo) : fColumnId(columnId), fPageNo(pageNo) {}
bool operator ==(const Key &other) const {
return fColumnId == other.fColumnId && fPageNo == other.fPageNo;
friend bool operator ==(const Key &lhs, const Key &rhs) {
return lhs.fColumnId == rhs.fColumnId && lhs.fPageNo == rhs.fPageNo;
}
};

Expand Down Expand Up @@ -95,7 +95,7 @@ namespace Detail {
\ingroup NTuple
\brief A memory region that contains packed and compressed pages
Derived classes implement how the on disk pages are stored in memory, e.g. mmap'd or in a special area.
Derived classes implement how the on-disk pages are stored in memory, e.g. mmap'd or in a special area.
*/
// clang-format on
class ROnDiskPageMap {
Expand Down Expand Up @@ -150,7 +150,7 @@ protected:
DescriptorId_t fClusterId;
/// Multiple page maps can be combined in a single RCluster
std::vector<ROnDiskPageMap> fPageMaps;
/// List of the (complete) columns represented by the RCluster
/// Set of the (complete) columns represented by the RCluster
std::unordered_set<DescriptorId_t> fAvailColumns;
/// Lookup table for the on-disk pages
std::unordered_map<ROnDiskPage::Key, ROnDiskPage> fOnDiskPages;
Expand Down
4 changes: 1 addition & 3 deletions tree/ntuple/v7/src/RCluster.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ ROOT::Experimental::Detail::ROnDiskPageMap::operator =(ROnDiskPageMap &&other)
}


ROOT::Experimental::Detail::ROnDiskPageMap::~ROnDiskPageMap()
{
}
ROOT::Experimental::Detail::ROnDiskPageMap::~ROnDiskPageMap() = default;


////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit b9390c1

Please sign in to comment.