16#ifndef ROOT7_RNTupleFillContext
17#define ROOT7_RNTupleFillContext
34namespace Experimental {
56 std::unique_ptr<Internal::RPageSink>
fSink;
58 std::unique_ptr<RNTupleModel>
fModel;
82 RNTupleFillContext(std::unique_ptr<RNTupleModel> model, std::unique_ptr<Internal::RPageSink> sink);
98 const std::size_t bytesWritten = entry.
Append();
138 throw RException(
R__FAIL(
"cannot disable staged committing with pending clusters"));
#define R__unlikely(expr)
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
A collection of Counter objects with a name, a unit, and a description.
The REntry is a collection of values in an ntuple corresponding to a complete row in the data set.
std::uint64_t GetModelId() const
Base class for all ROOT issued exceptions.
A context for filling entries (data) into clusters of an RNTuple.
std::size_t fUnzippedClusterSize
Keeps track of the number of bytes written into the current cluster.
NTupleSize_t fLastFlushed
bool fStagedClusterCommitting
Whether to enable staged cluster committing, where only an explicit call to CommitStagedClusters() wi...
std::uint64_t fNBytesFilled
The total number of bytes filled into all the so far committed clusters, i.e.
RNTupleFillContext(const RNTupleFillContext &)=delete
bool IsStagedClusterCommittingEnabled() const
void FlushCluster()
Flush so far filled entries to storage.
Detail::RNTupleMetrics fMetrics
void FillNoFlush(REntry &entry, RNTupleFillStatus &status)
Fill an entry into this context, but don't commit the cluster.
std::size_t fUnzippedClusterSizeEst
Estimator of uncompressed cluster size, taking into account the estimated compression ratio.
RNTupleFillContext & operator=(const RNTupleFillContext &)=delete
std::vector< Internal::RPageSink::RStagedCluster > fStagedClusters
Vector of currently staged clusters.
std::size_t Fill(REntry &entry)
Fill an entry into this context.
void EnableStagedClusterCommitting(bool val=true)
std::unique_ptr< RNTupleModel > fModel
Needs to be destructed before fSink.
std::size_t fMaxUnzippedClusterSize
Limit for committing cluster no matter the other tunables.
const Detail::RNTupleMetrics & GetMetrics() const
NTupleSize_t GetNEntries() const
Return the number of entries filled so far.
std::uint64_t fNBytesFlushed
The total number of bytes written to storage (i.e., after compression)
std::unique_ptr< REntry > CreateEntry()
void CommitStagedClusters()
Logically append staged clusters to the RNTuple.
const RNTupleModel & GetModel() const
NTupleSize_t GetLastFlushed() const
Return the entry number that was last flushed in a cluster.
void FlushColumns()
Flush column data, preparing for CommitCluster or to reduce memory usage.
std::unique_ptr< Internal::RPageSink > fSink
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.
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.
The RNTupleModel encapulates the schema of an ntuple.
A writer to fill an RNTuple from multiple contexts.
An RNTuple that gets filled with entries (data) and writes them to storage.
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...