Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RCluster.cxx
Go to the documentation of this file.
1/// \file RCluster.cxx
2/// \ingroup NTuple ROOT7
3/// \author Jakob Blomer <jblomer@cern.ch>
4/// \date 2020-03-11
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
16#include <ROOT/RCluster.hxx>
17
18#include <TError.h>
19
20#include <iterator>
21#include <utility>
22
23
25
26
27////////////////////////////////////////////////////////////////////////////////
28
29
31
32
33////////////////////////////////////////////////////////////////////////////////
34
35
38{
39 const auto itr = fOnDiskPages.find(key);
40 if (itr != fOnDiskPages.end())
41 return &(itr->second);
42 return nullptr;
43}
44
45void ROOT::Experimental::Detail::RCluster::Adopt(std::unique_ptr<ROnDiskPageMap> pageMap)
46{
47 auto &pages = pageMap->fOnDiskPages;
48 fOnDiskPages.insert(std::make_move_iterator(pages.begin()), std::make_move_iterator(pages.end()));
49 pageMap->fOnDiskPages.clear();
50 fPageMaps.emplace_back(std::move(pageMap));
51}
52
53
55{
56 R__ASSERT(fClusterId == other.fClusterId);
57
58 auto &pages = other.fOnDiskPages;
59 fOnDiskPages.insert(std::make_move_iterator(pages.begin()), std::make_move_iterator(pages.end()));
60 other.fOnDiskPages.clear();
61
62 auto &columns = other.fAvailColumns;
63 fAvailColumns.insert(std::make_move_iterator(columns.begin()), std::make_move_iterator(columns.end()));
64 other.fAvailColumns.clear();
65 std::move(other.fPageMaps.begin(), other.fPageMaps.end(), std::back_inserter(fPageMaps));
66 other.fPageMaps.clear();
67}
68
69
71{
72 fAvailColumns.insert(columnId);
73}
#define R__ASSERT(e)
Definition TError.h:118
An in-memory subset of the packed and compressed pages of a cluster.
Definition RCluster.hxx:154
void Adopt(std::unique_ptr< ROnDiskPageMap > pageMap)
Move the given page map into this cluster; for on-disk pages that are present in both the cluster at ...
Definition RCluster.cxx:45
void SetColumnAvailable(DescriptorId_t columnId)
Marks the column as complete; must be done for all columns, even empty ones without associated pages,...
Definition RCluster.cxx:70
std::unordered_map< ROnDiskPage::Key, ROnDiskPage > fOnDiskPages
Lookup table for the on-disk pages.
Definition RCluster.hxx:171
const ROnDiskPage * GetOnDiskPage(const ROnDiskPage::Key &key) const
Definition RCluster.cxx:37
A page as being stored on disk, that is packed and compressed.
Definition RCluster.hxx:43
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
On-disk pages within a page source are identified by the column and page number.
Definition RCluster.hxx:53