Re: How to stream this?

From: Victor Perevoztchikov (perev@bnl.gov)
Date: Mon Jan 31 2000 - 15:26:13 MET


 Hi Anton,
> I will get two copies of Obj. I could not find a solution except writing a

ROOT I/O does not write the same object twice. Probably you did something in non standard way.
Show please your example how do you write.

Victor


Anton Fokin wrote:
> 
> Hi,
> 
> I would like to stream a structure like this
> 
>   Obj1 *--> Obj <--* Obj2
> 
> where Obj1 and Obj2 have pointers to the same object Obj. If I stream it in
> a "normal" way, Obj1::Streamer() will invoke Streamer() of Obj and
> Obj2::Streamer() will do the same. The same happens if I read it back, i.e.
> I will get two copies of Obj. I could not find a solution except writing a
> numerical id instead of pointers and connecting object after reading. Any
> suggestions?
> 
> Best,
> Anton

-- 
Victor M. Perevoztchikov   perev@bnl.gov  perev@vxcern.cern.ch       
Brookhaven National Laboratory MS 510A PO Box 5000 Upton NY 11973-5000
tel office : 631-344-7894; fax 631-344-4206; home 631-345-2690



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:18 MET