55 if (fNEntries == fLastCommitted) {
58 if (fSink->GetWriteOptions().GetHasSmallClusters() &&
60 throw RException(
R__FAIL(
"invalid attempt to write a cluster > 512MiB with 'small clusters' option enabled"));
62 for (
auto &
field : fModel->GetFieldZero()) {
67 fNBytesFilled += fUnzippedClusterSize;
71 std::min(1000.f,
static_cast<float>(fNBytesFilled) /
static_cast<float>(fNBytesCommitted));
72 fUnzippedClusterSizeEst =
73 compressionFactor *
static_cast<float>(fSink->GetWriteOptions().GetApproxZippedClusterSize());
75 fLastCommitted = fNEntries;
76 fUnzippedClusterSize = 0;
Detail::RNTupleMetrics fMetrics
std::size_t fUnzippedClusterSizeEst
Estimator of uncompressed cluster size, taking into account the estimated compression ratio.
void CommitCluster()
Ensure that the data from the so far seen Fill calls has been written to storage.
std::unique_ptr< RNTupleModel > fModel
Needs to be destructed before fSink.
std::size_t fMaxUnzippedClusterSize
Limit for committing cluster no matter the other tunables.
RNTupleFillContext(std::unique_ptr< RNTupleModel > model, std::unique_ptr< Internal::RPageSink > sink)
std::unique_ptr< Internal::RPageSink > fSink