23void EnsureValidTunables(std::size_t zippedClusterSize, std::size_t unzippedClusterSize, std::size_t unzippedPageSize)
26 if (zippedClusterSize == 0) {
27 throw RException(
R__FAIL(
"invalid target cluster size: 0"));
29 if (unzippedPageSize == 0) {
30 throw RException(
R__FAIL(
"invalid target page size: 0"));
32 if (zippedClusterSize > unzippedClusterSize) {
33 throw RException(
R__FAIL(
"compressed target cluster size must not be larger than "
34 "maximum uncompressed cluster size"));
36 if (unzippedPageSize > unzippedClusterSize) {
37 throw RException(
R__FAIL(
"target page size must not be larger than "
38 "maximum uncompressed cluster size"));
44std::unique_ptr<ROOT::Experimental::RNTupleWriteOptions>
47 return std::make_unique<RNTupleWriteOptions>(*
this);
52 EnsureValidTunables(val, fMaxUnzippedClusterSize, fApproxUnzippedPageSize);
53 fApproxZippedClusterSize = val;
58 EnsureValidTunables(fApproxZippedClusterSize, val, fApproxUnzippedPageSize);
59 fMaxUnzippedClusterSize = val;
64 EnsureValidTunables(fApproxZippedClusterSize, fMaxUnzippedClusterSize, val);
65 fApproxUnzippedPageSize = val;
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
Base class for all ROOT issued exceptions.
void SetApproxZippedClusterSize(std::size_t val)
virtual std::unique_ptr< RNTupleWriteOptions > Clone() const
void SetApproxUnzippedPageSize(std::size_t val)
void SetMaxUnzippedClusterSize(std::size_t val)