Logo ROOT  
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/RNTupleUtil.hxx>
18
19#include <cstddef>
20
21namespace ROOT {
22
23namespace Experimental {
24class RNTupleFillContext;
25}
26
27// clang-format off
28/**
29\class ROOT::RNTupleFillStatus
30\ingroup NTuple
31\brief A status object after filling an entry
32
33After passing an instance to RNTupleWriter::FillNoFlush or RNTupleFillContext::FillNoFlush, the caller must check
34ShouldFlushCluster and call RNTupleWriter::FlushCluster or RNTupleFillContext::FlushCluster if necessary.
35*/
36// clang-format on
39
40private:
41 /// Number of entries written into the current cluster
43 /// Number of bytes written into the current cluster
44 std::size_t fUnzippedClusterSize = 0;
45 /// Number of bytes written for the last entry
46 std::size_t fLastEntrySize = 0;
47 bool fShouldFlushCluster = false;
48
49public:
50 /// Return the number of entries written into the current cluster.
52 /// Return the number of bytes written into the current cluster.
53 std::size_t GetUnzippedClusterSize() const { return fUnzippedClusterSize; }
54 /// Return the number of bytes for the last entry.
55 std::size_t GetLastEntrySize() const { return fLastEntrySize; }
56 /// Return true if the caller should call FlushCluster.
57 bool ShouldFlushCluster() const { return fShouldFlushCluster; }
58}; // class RNTupleFillContext
59
60} // namespace ROOT
61
62#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.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
std::uint64_t NTupleSize_t
Integer type long enough to hold the maximum number of entries in a column.