|
28 | 28 | kByteCountMask: 0x40000000, |
29 | 29 | kNewClassTag: 0xFFFFFFFF, |
30 | 30 | kClassMask: 0x80000000, |
31 | | - Z_DEFLATED: 8, |
32 | | - Z_HDRSIZE: 9, |
33 | 31 | Mode: "array", // could be string or array, enable usage of ArrayBuffer in http requests |
34 | 32 | NativeArray: true, // when true, native arrays like Int32Array or Float64Array are used |
35 | 33 |
|
|
46 | 44 | StlNames: [ "", "vector", "list", "deque", "map", "multimap", "set", "multiset", "bitset"], |
47 | 45 |
|
48 | 46 | // constants of bits in version |
49 | | - kStreamedMemberWise : JSROOT.BIT(14), |
| 47 | + kStreamedMemberWise: JSROOT.BIT(14), |
50 | 48 |
|
51 | 49 | kSplitCollectionOfPointers: 100, |
52 | 50 |
|
|
56 | 54 | CustomStreamers: {}, |
57 | 55 |
|
58 | 56 | // TOBject bits |
59 | | - kIsReferenced : JSROOT.BIT(4), |
| 57 | + kIsReferenced: JSROOT.BIT(4), |
60 | 58 | kHasUUID: JSROOT.BIT(5), |
61 | 59 |
|
62 | | - IsInteger : function(typ) { return ((typ>=this.kChar) && (typ<=this.kLong)) || (typ===this.kCounter) || |
| 60 | + IsInteger: function(typ) { return ((typ>=this.kChar) && (typ<=this.kLong)) || (typ===this.kCounter) || |
63 | 61 | ((typ>=this.kLegacyChar) && (typ<=this.kBool)); }, |
64 | 62 |
|
65 | | - IsNumeric : function(typ) { return (typ>0) && (typ<=this.kBool) && (typ!==this.kCharStar); }, |
| 63 | + IsNumeric: function(typ) { return (typ>0) && (typ<=this.kBool) && (typ!==this.kCharStar); }, |
66 | 64 |
|
67 | | - GetTypeId : function(typname, norecursion) { |
| 65 | + GetTypeId: function(typname, norecursion) { |
68 | 66 | switch (typname) { |
69 | 67 | case "bool": |
70 | 68 | case "Bool_t": return JSROOT.IO.kBool; |
|
115 | 113 | return -1; |
116 | 114 | }, |
117 | 115 |
|
118 | | - GetTypeSize : function(typname) { |
| 116 | + GetTypeSize: function(typname) { |
119 | 117 | switch (typname) { |
120 | 118 | case JSROOT.IO.kBool: return 1; |
121 | 119 | case JSROOT.IO.kChar: return 1; |
|
158 | 156 | return null; |
159 | 157 | } |
160 | 158 |
|
161 | | - if (getChar(curr) == 'Z' && getChar(curr+1) == 'L' && getCode(curr+2) == JSROOT.IO.Z_DEFLATED) { fmt = "new"; off = 2; } else |
162 | | - if (getChar(curr) == 'C' && getChar(curr+1) == 'S' && getCode(curr+2) == JSROOT.IO.Z_DEFLATED) { fmt = "old"; off = 0; } else |
| 159 | + if (getChar(curr) == 'Z' && getChar(curr+1) == 'L' && getCode(curr+2) == 8) { fmt = "new"; off = 2; } else |
| 160 | + if (getChar(curr) == 'C' && getChar(curr+1) == 'S' && getCode(curr+2) == 8) { fmt = "old"; off = 0; } else |
163 | 161 | if (getChar(curr) == 'X' && getChar(curr+1) == 'Z') fmt = "LZMA"; |
164 | 162 |
|
165 | 163 | /* C H E C K H E A D E R */ |
|
601 | 599 | if (obj.fLast > obj.fBufferSize) obj.fBufferSize = obj.fLast; |
602 | 600 | var flag = this.ntoi1(); |
603 | 601 |
|
604 | | - console.log('READ BASKET', ver, flag, obj.fNevBuf, obj.fBufferSize, obj.fNevBufSize, obj.fLast); |
605 | | - |
606 | 602 | if (flag===0) return obj; |
607 | 603 |
|
608 | 604 | if ((flag % 10) != 2) { |
|
613 | 609 | obj.fEntryOffset[i] &= ~kDisplacementMask; |
614 | 610 | } |
615 | 611 |
|
616 | | - if (flag>40) { |
| 612 | + if (flag>40) |
617 | 613 | obj.fDisplacement = this.ReadFastArray(this.ntoi4(), JSROOT.IO.kInt); |
618 | | - console.log('READ DISPLACEMENT', obj.fDisplacement.length); |
619 | | - } |
620 | 614 | } |
621 | 615 |
|
622 | 616 | if ((flag === 1) || (flag > 10)) { |
|
660 | 654 | tag = this.ntou4(); |
661 | 655 | } |
662 | 656 | if (!(tag & JSROOT.IO.kClassMask)) { |
663 | | - classInfo.objtag = tag; // indicate that we have deal with objects tag |
| 657 | + classInfo.objtag = tag + this.fDisplacement; // indicate that we have deal with objects tag |
664 | 658 | return classInfo; |
665 | 659 | } |
666 | 660 | if (tag == JSROOT.IO.kNewClassTag) { |
|
671 | 665 | this.MapClass(this.fTagOffset + startpos + JSROOT.IO.kMapOffset, classInfo.name); |
672 | 666 | } else { |
673 | 667 | // got a tag to an already seen class |
674 | | - var clTag = (tag & ~JSROOT.IO.kClassMask); |
| 668 | + var clTag = (tag & ~JSROOT.IO.kClassMask) + this.fDisplacement; |
675 | 669 | classInfo.name = this.GetMappedClass(clTag); |
676 | 670 |
|
677 | 671 | if (classInfo.name === -1) { |
|
0 commit comments