We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edd1166 commit 9430191Copy full SHA for 9430191
1 file changed
types/fundamental/real32quant/write.C
@@ -7,6 +7,7 @@
7
#endif
8
#include <ROOT/RNTupleWriteOptions.hxx>
9
#include <ROOT/RNTupleWriter.hxx>
10
+#include <ROOT/RVersion.hxx>
11
12
#include <limits>
13
#include <memory>
@@ -21,7 +22,11 @@ static std::shared_ptr<T> MakeFieldReal32Quant(ROOT::RNTupleModel &model,
21
22
assert(nBits >= 1 && nBits <= 32);
23
assert(max > min);
24
auto field = std::make_unique<ROOT::RField<T>>(name);
25
+#if ROOT_VERSION_CODE >= ROOT_VERSION(6, 40, 0)
26
+ field->SetQuantized(nBits, {min, max});
27
+#else
28
field->SetQuantized(min, max, nBits);
29
+#endif
30
model.AddField(std::move(field));
31
return model.GetDefaultEntry().GetPtr<T>(name);
32
}
0 commit comments