ROOT
git-r3/HEAD
Reference Guide
Loading...
Searching...
No Matches
RNTupleFillStatus.hxx
Go to the documentation of this file.
1
/// \file ROOT/RNTupleFillStatus.hxx
2
/// \author Jonas Hahnfeld <jonas.hahnfeld@cern.ch>
3
/// \date 2024-04-15
4
5
/*************************************************************************
6
* Copyright (C) 1995-2024, Rene Brun and Fons Rademakers. *
7
* All rights reserved. *
8
* *
9
* For the licensing terms see $ROOTSYS/LICENSE. *
10
* For the list of contributors see $ROOTSYS/README/CREDITS. *
11
*************************************************************************/
12
13
#ifndef ROOT_RNTupleFillStatus
14
#define ROOT_RNTupleFillStatus
15
16
#include <
ROOT/RNTupleTypes.hxx
>
17
18
#include <cstddef>
19
20
namespace
ROOT
{
21
22
class
RNTupleFillContext
;
23
24
// clang-format off
25
/**
26
\class ROOT::RNTupleFillStatus
27
\ingroup NTuple
28
\brief A status object after filling an entry
29
30
After passing an instance to RNTupleWriter::FillNoFlush() or RNTupleFillContext::FillNoFlush(), the caller must check
31
ShouldFlushCluster() and call RNTupleWriter::FlushCluster() or RNTupleFillContext::FlushCluster() if necessary.
32
*/
33
// clang-format on
34
class
RNTupleFillStatus
{
35
friend
class
RNTupleFillContext
;
36
37
private
:
38
/// Number of entries written into the current cluster
39
ROOT::NTupleSize_t
fNEntriesSinceLastFlush
= 0;
40
/// Number of bytes written into the current cluster
41
std::size_t
fUnzippedClusterSize
= 0;
42
/// Number of bytes written for the last entry
43
std::size_t
fLastEntrySize
= 0;
44
bool
fShouldFlushCluster
=
false
;
45
46
public
:
47
/// Return the number of entries written into the current cluster.
48
ROOT::NTupleSize_t
GetNEntries
()
const
{
return
fNEntriesSinceLastFlush
; }
49
/// Return the number of bytes written into the current cluster.
50
std::size_t
GetUnzippedClusterSize
()
const
{
return
fUnzippedClusterSize
; }
51
/// Return the number of bytes for the last entry.
52
std::size_t
GetLastEntrySize
()
const
{
return
fLastEntrySize
; }
53
/// Return true if the caller should call FlushCluster.
54
bool
ShouldFlushCluster
()
const
{
return
fShouldFlushCluster
; }
55
};
56
57
}
// namespace ROOT
58
59
#endif
// ROOT_RNTupleFillStatus
RNTupleTypes.hxx
ROOT::RNTupleFillContext
A context for filling entries (data) into clusters of an RNTuple.
Definition
RNTupleFillContext.hxx:52
ROOT::RNTupleFillStatus
A status object after filling an entry.
Definition
RNTupleFillStatus.hxx:34
ROOT::RNTupleFillStatus::fShouldFlushCluster
bool fShouldFlushCluster
Definition
RNTupleFillStatus.hxx:44
ROOT::RNTupleFillStatus::GetUnzippedClusterSize
std::size_t GetUnzippedClusterSize() const
Return the number of bytes written into the current cluster.
Definition
RNTupleFillStatus.hxx:50
ROOT::RNTupleFillStatus::fNEntriesSinceLastFlush
ROOT::NTupleSize_t fNEntriesSinceLastFlush
Number of entries written into the current cluster.
Definition
RNTupleFillStatus.hxx:39
ROOT::RNTupleFillStatus::GetNEntries
ROOT::NTupleSize_t GetNEntries() const
Return the number of entries written into the current cluster.
Definition
RNTupleFillStatus.hxx:48
ROOT::RNTupleFillStatus::RNTupleFillContext
friend class RNTupleFillContext
Definition
RNTupleFillStatus.hxx:35
ROOT::RNTupleFillStatus::fUnzippedClusterSize
std::size_t fUnzippedClusterSize
Number of bytes written into the current cluster.
Definition
RNTupleFillStatus.hxx:41
ROOT::RNTupleFillStatus::fLastEntrySize
std::size_t fLastEntrySize
Number of bytes written for the last entry.
Definition
RNTupleFillStatus.hxx:43
ROOT::RNTupleFillStatus::ShouldFlushCluster
bool ShouldFlushCluster() const
Return true if the caller should call FlushCluster.
Definition
RNTupleFillStatus.hxx:54
ROOT::RNTupleFillStatus::GetLastEntrySize
std::size_t GetLastEntrySize() const
Return the number of bytes for the last entry.
Definition
RNTupleFillStatus.hxx:52
ROOT
Definition
EExecutionPolicy.hxx:4
ROOT::NTupleSize_t
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.
Definition
RNTupleTypes.hxx:129
tree
ntuple
inc
ROOT
RNTupleFillStatus.hxx
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1