Skip to content

Commit 63589af

Browse files
committed
Fix in I/O
Support object arrays like TH1F* fMemeber[2]; //->
1 parent e94c40c commit 63589af

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

scripts/JSRootIOEvolution.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,9 +1960,19 @@
19601960
member.func = function(buf,obj) { obj[this.name] = buf.ReadTString(); };
19611961
} else {
19621962
member.classname = classname;
1963-
member.func = function(buf, obj) {
1964-
obj[this.name] = buf.ClassStreamer({}, this.classname);
1965-
};
1963+
1964+
if (element.fArrayLength>1) {
1965+
member.arrlen = element.fArrayLength;
1966+
member.func = function(buf, obj) {
1967+
obj[this.name] = [];
1968+
for (var k=0;k<this.arrlen;++k)
1969+
obj[this.name].push(buf.ClassStreamer({}, this.classname));
1970+
};
1971+
} else {
1972+
member.func = function(buf, obj) {
1973+
obj[this.name] = buf.ClassStreamer({}, this.classname);
1974+
};
1975+
}
19661976
}
19671977
break;
19681978
case JSROOT.IO.kOffsetL + JSROOT.IO.kObject:

0 commit comments

Comments
 (0)