Skip to content

Commit d1112c3

Browse files
committed
[rntuple] add testing of Real32Quant
Also update generated root file
1 parent 07039fc commit d1112c3

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

demo/node/rntuple_test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ else {
7979
// Setup selector to process all fields (so cluster gets loaded)
8080
const selector = new TSelector(),
8181
fields = ['IntField', 'FloatField', 'DoubleField',
82-
'Float16Field', 'Real32Trunc',
82+
'Float16Field', 'Real32Trunc', 'Real32Quant',
8383
'StringField', 'BoolField',
8484
'ArrayInt', 'VariantField', 'TupleField',
8585
'VectString', 'VectInt', 'VectBool', 'Vect2Float', 'Vect2Bool', 'MultisetField',
8686
'MapStringFloat', 'MapIntDouble', 'MapStringBool'],
87-
epsilonValues = { Real32Trunc: 0.5, Float16Field: 1e-2 };
87+
epsilonValues = { Real32Trunc: 0.3, Real32Quant: 1e-4, Float16Field: 1e-2 };
8888

8989
for (const f of fields)
9090
selector.addBranch(f);
@@ -130,6 +130,7 @@ selector.Process = function(entryIndex) {
130130
DoubleField: entryIndex * 0.5,
131131
Float16Field: entryIndex * 0.1987333,
132132
Real32Trunc: 123.45 * entryIndex,
133+
Real32Quant: 0.03 * (entryIndex % 30),
133134
StringField: `entry_${entryIndex}`,
134135
BoolField: entryIndex % 3 === 1,
135136
ArrayInt: [entryIndex + 1, entryIndex + 2, entryIndex + 3, entryIndex + 4, entryIndex + 5],

demo/node/rntuple_test.root

175 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)