Re: How to register ROOT object read from python pickle

From: Benjamin Bannier <bbannier_at_gmail.com>
Date: Tue, 11 Jan 2011 21:52:10 -0500


Dear Valeri,

> > I am trying to get a ROOT object loaded from a python pickle via
> > name from some global registry like gDirectory or gROOT, but somehow
> > cannot make it work.

> You should use the ROOT I/O (for example, TFile class) to read /
> write ROOT objects.

I could do that, and maybe my example simplified what I wanted to do too much. I will be streaming more complicated objects (e.g. tuples or dictionaries containing ROOT objects). Python's pickle is very nice for that since it requires minimal setup, both for writing and reading.

> ROOT objects are C++ objects.

No, in python they are python objects and in ruby they are ruby objects etc. ;)

Benjamin

Received on Wed Jan 12 2011 - 03:52:19 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 13 2011 - 23:50:01 CET