Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 {
24
25namespace Experimental {
26class RNTupleFillContext;
27}
28
29// clang-format off
30/**
31\class ROOT::RNTupleFillStatus
32\ingroup NTuple
33\brief A status object after filling an entry
34
35After passing an instance to RNTupleWriter::FillNoFlush or RNTupleFillContext::FillNoFlush, the caller must check
36ShouldFlushCluster and call RNTupleWriter::FlushCluster or RNTupleFillContext::FlushCluster if necessary.
37*/
38// clang-format on
41
42private:
43 /// Number of entries written into the current cluster
45 /// Number of bytes written into the current cluster
46 std::size_t fUnzippedClusterSize = 0;
47 /// Number of bytes written for the last entry
48 std::size_t fLastEntrySize = 0;
49 bool fShouldFlushCluster = false;
50
51public:
52 /// Return the number of entries written into the current cluster.
54 /// Return the number of bytes written into the current cluster.
55 std::size_t GetUnzippedClusterSize() const { return fUnzippedClusterSize; }
56 /// Return the number of bytes for the last entry.
57 std::size_t GetLastEntrySize() const { return fLastEntrySize; }
58 /// Return true if the caller should call FlushCluster.
59 bool ShouldFlushCluster() const { return fShouldFlushCluster; }
60}; // class RNTupleFillContext
61
62namespace Experimental {
63// TODO(gparolini): remove before branching ROOT v6.36
64using RNTupleFillStatus [[deprecated("ROOT::Experimental::RNTupleFillStatus moved to ROOT::RNTupleFillStatus")]] =
66} // namespace Experimental
67} // namespace ROOT
68
69#endif // ROOT7_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.