Re: [ROOT] How to convert Object to char[] and backwards?

From: Maarten Ballintijn (maartenb@mit.edu)
Date: Fri Aug 30 2002 - 18:42:51 MEST


Hi Mario,

TBuffer is the way to go. Please attached simple example.
The tricky part might be the ownership of the buffer.
(see the comments in the source for details)

If you still have problems, please provide the ROOT version
you are using, the platform you are running on and a simplified
example of your problem.  

		Cheers,
			Maarten.

On Fri, 2002-08-30 at 11:46, Mario Schubert wrote:
> Hello,
> 
> I need to convert/serialize/marshal an object (in derived from TObject, with 
> dictionary generated) to a simmple char[] array.
> Then it will be sent over and received by the MPICH library.
> After this I want to generate this object from the char[] array.
> 
> How to do this?
> 
> My experiments with TMessage/TBuffer ended in segmentation faults. :-|
> Thank you very much for your help.
> 
> Ciao,
>     Mario Schubert
> ---------------------------------------------
> Beschleunigerlabor der LMU und TU München
> Dipl. Phys. Mario Schubert
> EMail: mario.schubert@physik.uni-muenchen.de
> Phone: (+49 89)289 14283
> FAX:   (+49 89)289 14280
> Am Coulombwall 6, D-85748 Garching, Germany
> 
-- 
Dr. Maarten Ballintijn

MASSACHUSETTS INSTITUTE OF TECHNOLOGY       Email: maartenb@mit.edu
Room 24-410                                 Phone: +1 (617) 253 4184
77 Massachusetts Avenue                     Fax:   +1 (617) 253 4360
Cambridge, MA 02139, USA                    http://www.mit.edu/~maartenb





This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET