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