Logo ROOT  
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
20namespace ROOT {
21
23
24// clang-format off
25/**
26\class ROOT::RNTupleFillStatus
27\ingroup NTuple
28\brief A status object after filling an entry
29
30After passing an instance to RNTupleWriter::FillNoFlush() or RNTupleFillContext::FillNoFlush(), the caller must check
31ShouldFlushCluster() and call RNTupleWriter::FlushCluster() or RNTupleFillContext::FlushCluster() if necessary.
32*/
33// clang-format on
35 friend class RNTupleFillContext;
36
37private:
38 /// Number of entries written into the current cluster
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
46public:
47 /// Return the number of entries written into the current cluster.
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
A context for filling entries (data) into clusters of an RNTuple.
A status object after filling an entry.
std::size_t GetUnzippedClusterSize() const
Return the number of bytes written into the current cluster.
ROOT::NTupleSize_t fNEntriesSinceLastFlush
Number of entries written into the current cluster.
ROOT::NTupleSize_t GetNEntries() const
Return the number of entries written into the current cluster.
std::size_t fUnzippedClusterSize
Number of bytes written into the current cluster.
std::size_t fLastEntrySize
Number of bytes written for the last entry.
bool ShouldFlushCluster() const
Return true if the caller should call FlushCluster.
std::size_t GetLastEntrySize() const
Return the number of bytes for the last entry.
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.