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