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