otsdaq_utilities  v2_05_02_indev
gaudi.js
1 // this small macro is required to correctly read data from
2 // https://root.cern/files/markus.root
3 // Seems to be, pool::Token is class from Gaudi Framework
4 // There is no streamer information stored in the file
5 // Some idea that is stored there can be found
6 // http://svn.cern.ch/guest/gaudi/Gaudi/trunk/RootCnv/src/RootIOHandler.cpp, line 175
7 // There are 4 bytes mismatch - caused by problem with version reading in JSROOT
8 // Normally version for foreign classes stored with the checksum
9 // JSROOT searches for checksum and rall-back when streamer info not found
10 // This is a case for pool::Token class, therefore checksum should be skipped here
11 
12 JSROOT.addUserStreamer(
13  "pool::Token",
14  function(buf, obj) {
15  obj._typename = "pool::Token";
16  buf.ntou4(); // skip version checksum
17  obj.m_oid = {
18  _typename: "pair<int,int>",
19  first: buf.ntoi4(),
20  second: buf.ntoi4()
21  }
22  }
23 );