28 std::unique_ptr<ROOT::Internal::RPageSink> sink)
35 const auto &writeOpts =
fSink->GetWriteOptions();
38 const int scale = writeOpts.GetCompression() ? 2 : 1;
52 << std::to_string(
fStagedClusters.size()) <<
" staged clusters still pending, their data is lost";
73 auto stagedCluster =
fSink->StageCluster(nEntriesInCluster);
82 const float compressionFactor =
85 compressionFactor *
static_cast<float>(
fSink->GetWriteOptions().GetApproxZippedClusterSize());
97 throw RException(
R__FAIL(
"invalid attempt to commit staged clusters after dataset was committed"));
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__LOG_ERROR(...)
Base class for all ROOT issued exceptions.
void FlushCluster()
Flush so far filled entries to storage.
ROOT::NTupleSize_t fLastFlushed
std::size_t fUnzippedClusterSizeEst
Estimator of uncompressed cluster size, taking into account the estimated compression ratio.
std::uint64_t fNBytesFilled
The total number of bytes filled into all the so far committed clusters, i.e.
Experimental::Detail::RNTupleMetrics fMetrics
std::uint64_t fNBytesFlushed
The total number of bytes written to storage (i.e., after compression).
std::vector< ROOT::Internal::RPageSink::RStagedCluster > fStagedClusters
Vector of currently staged clusters.
void FlushColumns()
Flush column data, preparing for CommitCluster or to reduce memory usage.
RNTupleFillContext(std::unique_ptr< ROOT::RNTupleModel > model, std::unique_ptr< ROOT::Internal::RPageSink > sink)
std::size_t fUnzippedClusterSize
Keeps track of the number of bytes written into the current cluster.
ROOT::NTupleSize_t fNEntries
void CommitStagedClusters()
Logically append staged clusters to the RNTuple.
bool fStagedClusterCommitting
Whether to enable staged cluster committing, where only an explicit call to CommitStagedClusters() wi...
std::unique_ptr< ROOT::RNTupleModel > fModel
Needs to be destructed before fSink.
std::unique_ptr< ROOT::Internal::RPageSink > fSink
std::size_t fMaxUnzippedClusterSize
Limit for committing cluster no matter the other tunables.
ROOT::RFieldZero & GetFieldZeroOfModel(RNTupleModel &model)
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
void CallCommitClusterOnField(RFieldBase &)
void CallFlushColumnsOnField(RFieldBase &)