Dear ROOT experts,
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.
If I write an object like
----(out.py)
import ROOT as r
import pickle
h = r.TH1D('h_test','', 100, -10, 10)
pickle.dump(h, file('h.pkl', 'w'))
and try to get it from gDirectory or gROOT like
----(in.py)
import ROOT as r
import pickle
h = pickle.load(file('h.pkl'))
for t in (r.gDirectory, r.gROOT):
print t.FindObjectAny('h_test')
print t.Get('h_test')
I get nothing:
How would I make these objects known to the usual suspects or if they are already know how do I get them?
Thanks,
Benjamin
This archive was generated by hypermail 2.2.0 : Wed Jan 12 2011 - 05:50:01 CET