I am trying to store a python class (or just the members) in a ROOT file (CERN, TFile
) via rootpy.
I can easily do this using a Tree
and a TreeModel
but that only works for basic types and does not result in the structure I am looking for.
I had also a quick look at rootpy.io.pickler
but that does not allow the inspection with a TBrowser
(it crashes).
I was wondering if there is a better way. What I would like to have
My file:
- directory of my choosing
- directory with the name of my object
- object basic types (int, float, string)
- histograms (that one is easy)
- other complex objects
As you see this cannot be realised with a Tree
and I do not know how to add the basic types to a Directory
. Any ideas?
I would like to avoid, if possible, the logical work-around of storing the object parameters in a tree and the histograms directly in the same Directory
.