Skip to content

Commit 74870d7

Browse files
committed
Build
1 parent 0b4c42b commit 74870d7

File tree

2 files changed

+70
-21
lines changed

2 files changed

+70
-21
lines changed

build/jsroot.js

Lines changed: 69 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const version_id = 'dev',
1212

1313
/** @summary version date
1414
* @desc Release date in format day/month/year like '14/04/2022' */
15-
version_date = '16/06/2025',
15+
version_date = '17/06/2025',
1616

1717
/** @summary version id and date
1818
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -162326,6 +162326,7 @@ drawFuncs = { lst: [
162326162326
{ 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 },
162327162327
{ name: /^TLeaf/, icon: 'img_leaf', noexpand: true, draw: () => import_tree().then(h => h.drawTree), opt: ';dump', ctrl: 'dump', ignore_online: true, always_draw: true },
162328162328
{ 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' },
162329162330
{ name: clTList, icon: 'img_list', draw: () => import_h().then(h => h.drawList), get_expand: () => import_h().then(h => h.listHierarchy), dflt: 'expand' },
162330162331
{ name: clTHashList, sameas: clTList },
162331162332
{ name: clTObjArray, sameas: clTList },
@@ -162439,8 +162440,9 @@ function getDrawHandle(kind, selector) {
162439162440
function canDrawHandle(h) {
162440162441
if (isStr(h))
162441162442
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');
162444162446
}
162445162447

162446162448
/** @summary Provide draw settings for specified class or kind
@@ -163430,7 +163432,7 @@ function objectHierarchy(top, obj, args = undefined) {
163430163432
}
163431163433
}
163432163434
}
163433-
} else if ((typeof fld === 'number') || (typeof fld === 'boolean')) {
163435+
} else if ((typeof fld === 'number') || (typeof fld === 'boolean') || (typeof fld === 'bigint')) {
163434163436
simple = true;
163435163437
if (key === 'fBits')
163436163438
item._value = '0x' + fld.toString(16);
@@ -175239,7 +175241,7 @@ TASImagePainter: TASImagePainter
175239175241

175240175242
const LITTLE_ENDIAN = true;
175241175243
class RBufferReader {
175242-
175244+
175243175245
constructor(buffer) {
175244175246
if (buffer instanceof ArrayBuffer) {
175245175247
this.buffer = buffer;
@@ -175249,9 +175251,9 @@ class RBufferReader {
175249175251
this.buffer = buffer.buffer;
175250175252
this.byteOffset = buffer.byteOffset;
175251175253
this.byteLength = buffer.byteLength;
175252-
} else
175254+
} else
175253175255
throw new TypeError('Invalid buffer type');
175254-
175256+
175255175257
this.view = new DataView(this.buffer);
175256175258
this.offset = 0;
175257175259
}
@@ -175321,7 +175323,7 @@ class RBufferReader {
175321175323
readString() {
175322175324
const length = this.readU32();
175323175325
let str = '';
175324-
for (let i = 0; i < length; i++)
175326+
for (let i = 0; i < length; i++)
175325175327
str += String.fromCharCode(this.readU8());
175326175328
return str;
175327175329
}
@@ -175339,12 +175341,12 @@ class RBufferReader {
175339175341
this.offset += 8;
175340175342
return val;
175341175343
}
175342-
175344+
175343175345
}
175344175346

175345175347

175346175348
class RNTupleDescriptorBuilder {
175347-
175349+
175348175350
deserializeHeader(header_blob) {
175349175351
if (!header_blob) return;
175350175352

@@ -175365,6 +175367,9 @@ deserializeHeader(header_blob) {
175365175367

175366175368
// List frame: list of field record frames
175367175369
this._readFieldDescriptors(reader);
175370+
175371+
// List frame: list of column record frames
175372+
this._readColumnDescriptors(reader);
175368175373
}
175369175374

175370175375
deserializeFooter(footer_blob) {
@@ -175421,7 +175426,7 @@ fieldListIsList = fieldListSize < 0;
175421175426

175422175427
const fieldDescriptors = [];
175423175428
for (let i = 0; i < fieldListCount; ++i) {
175424-
const fieldRecordSize = reader.readS64(),
175429+
const fieldRecordSize = reader.readS64(),
175425175430
fieldVersion = reader.readU32(),
175426175431
typeVersion = reader.readU32(),
175427175432
parentFieldId = reader.readU32(),
@@ -175457,6 +175462,52 @@ fieldListIsList = fieldListSize < 0;
175457175462
this.fieldDescriptors = fieldDescriptors;
175458175463
}
175459175464

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+
175460175511
}
175461175512

175462175513
/** @summary Very preliminary function to read header/footer from RNTuple
@@ -175505,16 +175556,14 @@ async function tupleHierarchy(tuple_node, tuple) {
175505175556
if (!res)
175506175557
return res;
175507175558

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
175516175565
});
175517-
}
175566+
});
175518175567

175519175568
return true;
175520175569
});

modules/core.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const version_id = 'dev',
44

55
/** @summary version date
66
* @desc Release date in format day/month/year like '14/04/2022' */
7-
version_date = '16/06/2025',
7+
version_date = '17/06/2025',
88

99
/** @summary version id and date
1010
* @desc Produced by concatenation of {@link version_id} and {@link version_date}

0 commit comments

Comments
 (0)