ROOT
master
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
ROOT::Experimental::Internal::ROnDiskPageMap::~ROnDiskPageMap
() =
default
;
24
25
////////////////////////////////////////////////////////////////////////////////
26
27
ROOT::Experimental::Internal::ROnDiskPageMapHeap::~ROnDiskPageMapHeap
() =
default
;
28
29
////////////////////////////////////////////////////////////////////////////////
30
31
const
ROOT::Experimental::Internal::ROnDiskPage
*
32
ROOT::Experimental::Internal::RCluster::GetOnDiskPage
(
const
ROnDiskPage::Key
&key)
const
33
{
34
const
auto
itr
=
fOnDiskPages
.find(key);
35
if
(
itr
!=
fOnDiskPages
.
end
())
36
return
&(
itr
->second);
37
return
nullptr
;
38
}
39
40
void
ROOT::Experimental::Internal::RCluster::Adopt
(std::unique_ptr<ROnDiskPageMap>
pageMap
)
41
{
42
auto
&
pages
=
pageMap
->fOnDiskPages;
43
fOnDiskPages.insert(std::make_move_iterator(
pages
.
begin
()), std::make_move_iterator(
pages
.
end
()));
44
pageMap
->fOnDiskPages.clear();
45
fPageMaps.emplace_back(std::move(
pageMap
));
46
}
47
48
void
ROOT::Experimental::Internal::RCluster::Adopt
(
RCluster
&&
other
)
49
{
50
R__ASSERT
(fClusterId ==
other
.fClusterId);
51
52
auto
&
pages
=
other
.fOnDiskPages;
53
fOnDiskPages.insert(std::make_move_iterator(
pages
.
begin
()), std::make_move_iterator(
pages
.
end
()));
54
other
.fOnDiskPages.clear();
55
56
auto
&
columns
=
other
.fAvailPhysicalColumns;
57
fAvailPhysicalColumns.insert(std::make_move_iterator(
columns
.
begin
()), std::make_move_iterator(
columns
.
end
()));
58
other
.fAvailPhysicalColumns.clear();
59
std::move(
other
.fPageMaps.
begin
(),
other
.fPageMaps.
end
(), std::back_inserter(fPageMaps));
60
other
.fPageMaps.clear();
61
}
62
63
void
ROOT::Experimental::Internal::RCluster::SetColumnAvailable
(
ROOT::DescriptorId_t
physicalColumnId
)
64
{
65
fAvailPhysicalColumns.insert(
physicalColumnId
);
66
}
RCluster.hxx
TError.h
R__ASSERT
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
Definition
TError.h:125
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
ROOT::Experimental::Internal::RCluster
An in-memory subset of the packed and compressed pages of a cluster.
Definition
RCluster.hxx:152
ROOT::Experimental::Internal::RCluster::SetColumnAvailable
void SetColumnAvailable(ROOT::DescriptorId_t physicalColumnId)
Marks the column as complete; must be done for all columns, even empty ones without associated pages,...
Definition
RCluster.cxx:63
ROOT::Experimental::Internal::RCluster::fOnDiskPages
std::unordered_map< ROnDiskPage::Key, ROnDiskPage > fOnDiskPages
Lookup table for the on-disk pages.
Definition
RCluster.hxx:169
ROOT::Experimental::Internal::RCluster::GetOnDiskPage
const ROnDiskPage * GetOnDiskPage(const ROnDiskPage::Key &key) const
Definition
RCluster.cxx:32
ROOT::Experimental::Internal::RCluster::Adopt
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:40
ROOT::Experimental::Internal::ROnDiskPageMapHeap::~ROnDiskPageMapHeap
~ROnDiskPageMapHeap() override
ROOT::Experimental::Internal::ROnDiskPageMap::~ROnDiskPageMap
virtual ~ROnDiskPageMap()
ROOT::Experimental::Internal::ROnDiskPage
A page as being stored on disk, that is packed and compressed.
Definition
RCluster.hxx:42
ROOT::RRangeCast::begin
const_iterator begin() const
Definition
RRangeCast.hxx:104
ROOT::RRangeCast::end
const_iterator end() const
Definition
RRangeCast.hxx:105
ROOT::DescriptorId_t
std::uint64_t DescriptorId_t
Distriniguishes elements of the same type within a descriptor, e.g. different fields.
Definition
RNTupleUtil.hxx:128
ROOT::Experimental::Internal::ROnDiskPage::Key
On-disk pages within a page source are identified by the column and page number.
Definition
RCluster.hxx:52
tree
ntuple
v7
src
RCluster.cxx
ROOT master - Reference Guide Generated on Fri Feb 14 2025 04:17:28 (GVA Time) using Doxygen 1.10.0