File indexing completed on 2025-01-18 10:10:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROOT7_RNTupleWriteOptions
0017 #define ROOT7_RNTupleWriteOptions
0018
0019 #include <Compression.h>
0020
0021 #include <cstdint>
0022 #include <cstddef>
0023 #include <memory>
0024
0025 namespace ROOT {
0026 namespace Experimental {
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 class RNTupleWriteOptions {
0038 public:
0039 enum class EImplicitMT {
0040 kOff,
0041 kDefault,
0042 };
0043
0044 protected:
0045 int fCompression{RCompressionSetting::EDefaults::kUseGeneralPurpose};
0046
0047 std::size_t fApproxZippedClusterSize = 50 * 1000 * 1000;
0048
0049
0050 std::size_t fMaxUnzippedClusterSize = 512 * 1024 * 1024;
0051
0052
0053
0054
0055 std::size_t fApproxUnzippedPageSize = 64 * 1024;
0056 bool fUseBufferedWrite = true;
0057 EImplicitMT fUseImplicitMT = EImplicitMT::kDefault;
0058
0059
0060 bool fHasSmallClusters = false;
0061
0062 public:
0063
0064
0065
0066 static constexpr std::uint64_t kMaxSmallClusterSize = 512 * 1024 * 1024;
0067
0068 virtual ~RNTupleWriteOptions() = default;
0069 virtual std::unique_ptr<RNTupleWriteOptions> Clone() const;
0070
0071 int GetCompression() const { return fCompression; }
0072 void SetCompression(int val) { fCompression = val; }
0073 void SetCompression(RCompressionSetting::EAlgorithm::EValues algorithm, int compressionLevel)
0074 {
0075 fCompression = CompressionSettings(algorithm, compressionLevel);
0076 }
0077
0078 std::size_t GetApproxZippedClusterSize() const { return fApproxZippedClusterSize; }
0079 void SetApproxZippedClusterSize(std::size_t val);
0080
0081 std::size_t GetMaxUnzippedClusterSize() const { return fMaxUnzippedClusterSize; }
0082 void SetMaxUnzippedClusterSize(std::size_t val);
0083
0084 std::size_t GetApproxUnzippedPageSize() const { return fApproxUnzippedPageSize; }
0085 void SetApproxUnzippedPageSize(std::size_t val);
0086
0087 bool GetUseBufferedWrite() const { return fUseBufferedWrite; }
0088 void SetUseBufferedWrite(bool val) { fUseBufferedWrite = val; }
0089
0090 EImplicitMT GetUseImplicitMT() const { return fUseImplicitMT; }
0091 void SetUseImplicitMT(EImplicitMT val) { fUseImplicitMT = val; }
0092
0093 bool GetHasSmallClusters() const { return fHasSmallClusters; }
0094 void SetHasSmallClusters(bool val) { fHasSmallClusters = val; }
0095 };
0096
0097 }
0098 }
0099
0100 #endif