Skip to content

Commit 9430191

Browse files
committed
real32quant: Call changed SetQuantized
It is deprecated for ROOT 6.40 and will be removed in 6.42.
1 parent edd1166 commit 9430191

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • types/fundamental/real32quant

types/fundamental/real32quant/write.C

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#endif
88
#include <ROOT/RNTupleWriteOptions.hxx>
99
#include <ROOT/RNTupleWriter.hxx>
10+
#include <ROOT/RVersion.hxx>
1011

1112
#include <limits>
1213
#include <memory>
@@ -21,7 +22,11 @@ static std::shared_ptr<T> MakeFieldReal32Quant(ROOT::RNTupleModel &model,
2122
assert(nBits >= 1 && nBits <= 32);
2223
assert(max > min);
2324
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
2428
field->SetQuantized(min, max, nBits);
29+
#endif
2530
model.AddField(std::move(field));
2631
return model.GetDefaultEntry().GetPtr<T>(name);
2732
}

0 commit comments

Comments
 (0)