[ROOT] Streaming templated containers of pointers to disk (Modified by troy d straszheim)

From: troy d straszheim (troy@ifh.de)
Date: Tue Jul 27 2004 - 19:17:59 MEST


Hi roottalk-

I have a problem, I can't get a class to stream.  This another step in 
the road of getting those boost::shared_ptr<> classes to work.  I'm 
almost there, I just need to see that classes that point to one another 
via these shared pointers can get to/from root files OK.

Here' s an example that I think shows the problem.  There is a template 
class, Container<T>, which contains a pointer to a T, and two pointers 
to containers of T, one "left" and one "right".

The idea is to establish that the automatically generated streamers 
properly handle situations where some object is pointed to more than 
once.  We create a "diamond pattern", like this:

       C0
     /      \
   C1    C2
     \      /
      C3

and then ask C0 to Write() itself to disk, with the intention of 
checking later that all three objects are written and that C1 and C2 
point to the same object (c3)

Unfortunately my test case crashes on OSX and on Linux (with root about 
2 weeks old), during the Write() somewhere.  I can't seem to see what's 
wrong, hopefully I just need a fresh pair of eyes.... any ideas?

Run (via ACLiC) with "root -b streamtest.cxx++"




Thanks, Troy Straszhei



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET