@@ -12,7 +12,7 @@ const version_id = 'dev',
12
12
13
13
/** @summary version date
14
14
* @desc Release date in format day/month/year like '14/04/2022' */
15
- version_date = '16 /06/2025',
15
+ version_date = '17 /06/2025',
16
16
17
17
/** @summary version id and date
18
18
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -162326,6 +162326,7 @@ drawFuncs = { lst: [
162326
162326
{ name: /^TBranch/, icon: 'img_branch', draw: () => import_tree().then(h => h.drawTree), dflt: 'expand', opt: ';dump', ctrl: 'dump', shift: kInspect, ignore_online: true, always_draw: true },
162327
162327
{ name: /^TLeaf/, icon: 'img_leaf', noexpand: true, draw: () => import_tree().then(h => h.drawTree), opt: ';dump', ctrl: 'dump', ignore_online: true, always_draw: true },
162328
162328
{ name: 'ROOT::RNTuple', icon: 'img_tree', get_expand: () => Promise.resolve().then(function () { return rntuple; }).then(h => h.tupleHierarchy) },
162329
+ { name: 'ROOT::RNTupleField', icon: 'img_leaf', opt: 'inspect', ctrl: 'inspect' },
162329
162330
{ name: clTList, icon: 'img_list', draw: () => import_h().then(h => h.drawList), get_expand: () => import_h().then(h => h.listHierarchy), dflt: 'expand' },
162330
162331
{ name: clTHashList, sameas: clTList },
162331
162332
{ name: clTObjArray, sameas: clTList },
@@ -162439,8 +162440,9 @@ function getDrawHandle(kind, selector) {
162439
162440
function canDrawHandle(h) {
162440
162441
if (isStr(h))
162441
162442
h = getDrawHandle(h);
162442
- if (!isObject(h)) return false;
162443
- return h.func || h.class || h.draw || h.draw_field;
162443
+ if (!isObject(h))
162444
+ return false;
162445
+ return (h.func || h.class || h.draw || h.draw_field || h.opt === 'inspect');
162444
162446
}
162445
162447
162446
162448
/** @summary Provide draw settings for specified class or kind
@@ -163430,7 +163432,7 @@ function objectHierarchy(top, obj, args = undefined) {
163430
163432
}
163431
163433
}
163432
163434
}
163433
- } else if ((typeof fld === 'number') || (typeof fld === 'boolean')) {
163435
+ } else if ((typeof fld === 'number') || (typeof fld === 'boolean') || (typeof fld === 'bigint') ) {
163434
163436
simple = true;
163435
163437
if (key === 'fBits')
163436
163438
item._value = '0x' + fld.toString(16);
@@ -175239,7 +175241,7 @@ TASImagePainter: TASImagePainter
175239
175241
175240
175242
const LITTLE_ENDIAN = true;
175241
175243
class RBufferReader {
175242
-
175244
+
175243
175245
constructor(buffer) {
175244
175246
if (buffer instanceof ArrayBuffer) {
175245
175247
this.buffer = buffer;
@@ -175249,9 +175251,9 @@ class RBufferReader {
175249
175251
this.buffer = buffer.buffer;
175250
175252
this.byteOffset = buffer.byteOffset;
175251
175253
this.byteLength = buffer.byteLength;
175252
- } else
175254
+ } else
175253
175255
throw new TypeError('Invalid buffer type');
175254
-
175256
+
175255
175257
this.view = new DataView(this.buffer);
175256
175258
this.offset = 0;
175257
175259
}
@@ -175321,7 +175323,7 @@ class RBufferReader {
175321
175323
readString() {
175322
175324
const length = this.readU32();
175323
175325
let str = '';
175324
- for (let i = 0; i < length; i++)
175326
+ for (let i = 0; i < length; i++)
175325
175327
str += String.fromCharCode(this.readU8());
175326
175328
return str;
175327
175329
}
@@ -175339,12 +175341,12 @@ class RBufferReader {
175339
175341
this.offset += 8;
175340
175342
return val;
175341
175343
}
175342
-
175344
+
175343
175345
}
175344
175346
175345
175347
175346
175348
class RNTupleDescriptorBuilder {
175347
-
175349
+
175348
175350
deserializeHeader(header_blob) {
175349
175351
if (!header_blob) return;
175350
175352
@@ -175365,6 +175367,9 @@ deserializeHeader(header_blob) {
175365
175367
175366
175368
// List frame: list of field record frames
175367
175369
this._readFieldDescriptors(reader);
175370
+
175371
+ // List frame: list of column record frames
175372
+ this._readColumnDescriptors(reader);
175368
175373
}
175369
175374
175370
175375
deserializeFooter(footer_blob) {
@@ -175421,7 +175426,7 @@ fieldListIsList = fieldListSize < 0;
175421
175426
175422
175427
const fieldDescriptors = [];
175423
175428
for (let i = 0; i < fieldListCount; ++i) {
175424
- const fieldRecordSize = reader.readS64(),
175429
+ const fieldRecordSize = reader.readS64(),
175425
175430
fieldVersion = reader.readU32(),
175426
175431
typeVersion = reader.readU32(),
175427
175432
parentFieldId = reader.readU32(),
@@ -175457,6 +175462,52 @@ fieldListIsList = fieldListSize < 0;
175457
175462
this.fieldDescriptors = fieldDescriptors;
175458
175463
}
175459
175464
175465
+ _readColumnDescriptors(reader) {
175466
+ const columnListSize = reader.readS64(),
175467
+ columnListIsList = columnListSize < 0;
175468
+ if (!columnListIsList)
175469
+ throw new Error('Column list frame is not a list frame, which is required.');
175470
+ const columnListCount = reader.readU32(); // number of column entries
175471
+ console.log('Column List Count:', columnListCount);
175472
+ const columnDescriptors = [];
175473
+ for (let i = 0; i < columnListCount; ++i) {
175474
+ const columnRecordSize = reader.readS64(),
175475
+ coltype = reader.readU16(),
175476
+ bitsOnStorage = reader.readU16(),
175477
+ fieldId = reader.readU32(),
175478
+ flags = reader.readU16(),
175479
+ representationIndex = reader.readU16();
175480
+ console.log(`Column Record Size: ${columnRecordSize}`);
175481
+ let firstElementIndex = null, minValue = null, maxValue = null;
175482
+ if (flags & 0x1) firstElementIndex = reader.readU64();
175483
+ if (flags & 0x2){
175484
+ minValue = reader.readF64();
175485
+ maxValue = reader.readF64();
175486
+ }
175487
+
175488
+
175489
+ const column = {
175490
+ coltype,
175491
+ bitsOnStorage,
175492
+ fieldId,
175493
+ flags,
175494
+ representationIndex,
175495
+ firstElementIndex,
175496
+ minValue,
175497
+ maxValue
175498
+ };
175499
+ column.isDeferred = function() {
175500
+ return (this.flags & 0x01) !== 0;
175501
+ };
175502
+ column.isSuppressed = function() {
175503
+ return this.firstElementIndex !== null && this.firstElementIndex < 0;
175504
+ };
175505
+
175506
+ columnDescriptors.push(column);
175507
+ }
175508
+ this.columnDescriptors = columnDescriptors;
175509
+ }
175510
+
175460
175511
}
175461
175512
175462
175513
/** @summary Very preliminary function to read header/footer from RNTuple
@@ -175505,16 +175556,14 @@ async function tupleHierarchy(tuple_node, tuple) {
175505
175556
if (!res)
175506
175557
return res;
175507
175558
175508
- // just show which objects belongs to hierarchy
175509
- // one need to fill list of items from tuple.builder ... object
175510
- for (let k = 0; k < 3; ++k) {
175511
- tuple_node._childs.push({
175512
- _name: `dummy${k}`,
175513
- _kind: 'ROOT::SomeBranchName',
175514
- _title: `Any title for dummy${k}`,
175515
- _obj: null
175559
+ tuple.builder?.fieldDescriptors.forEach(field => {
175560
+ tuple_node._childs.push({
175561
+ _name: field.fieldName,
175562
+ _kind: 'ROOT::RNTupleField', // pseudo class name, used in draw.mjs
175563
+ _title: `Filed of type ${field.typeName}`,
175564
+ _obj: field
175516
175565
});
175517
- }
175566
+ });
175518
175567
175519
175568
return true;
175520
175569
});
0 commit comments