File indexing completed on 2025-10-22 08:52:53
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_RSNAPSHOTOPTIONS
0012 #define ROOT_RSNAPSHOTOPTIONS
0013
0014 #include <Compression.h>
0015 #include <optional>
0016 #include <string_view>
0017 #include <string>
0018
0019 namespace ROOT {
0020
0021 namespace RDF {
0022 enum class ESnapshotOutputFormat {
0023 kDefault,
0024 kTTree,
0025 kRNTuple
0026 };
0027
0028
0029 struct RSnapshotOptions {
0030 using ECAlgo = ROOT::RCompressionSetting::EAlgorithm::EValues;
0031 RSnapshotOptions() = default;
0032 RSnapshotOptions(const RSnapshotOptions &) = default;
0033 RSnapshotOptions(RSnapshotOptions &&) = default;
0034 RSnapshotOptions(std::string_view mode, ECAlgo comprAlgo, int comprLevel, int autoFlush, int splitLevel, bool lazy,
0035 bool overwriteIfExists = false, bool vector2RVec = true, int basketSize = -1,
0036 ESnapshotOutputFormat outputFormat = ESnapshotOutputFormat::kDefault)
0037 : fMode(mode),
0038 fCompressionAlgorithm(comprAlgo),
0039 fCompressionLevel{comprLevel},
0040 fAutoFlush(autoFlush),
0041 fSplitLevel(splitLevel),
0042 fLazy(lazy),
0043 fOverwriteIfExists(overwriteIfExists),
0044 fVector2RVec(vector2RVec),
0045 fBasketSize(basketSize),
0046 fOutputFormat(outputFormat)
0047 {
0048 }
0049 std::string fMode = "RECREATE";
0050 ECAlgo fCompressionAlgorithm =
0051 ROOT::RCompressionSetting::EAlgorithm::kZLIB;
0052 int fCompressionLevel = 1;
0053 int fAutoFlush = 0;
0054 int fSplitLevel = 99;
0055 bool fLazy = false;
0056 bool fOverwriteIfExists = false;
0057 bool fVector2RVec = true;
0058 int fBasketSize = -1;
0059
0060 ESnapshotOutputFormat fOutputFormat = ESnapshotOutputFormat::kDefault;
0061 };
0062 }
0063 }
0064
0065 #endif