Definition at line 242 of file root_pickle.py.
◆ __init__()
def python.root_pickle.Pickler.__init__ |
( |
|
self, |
|
|
|
file, |
|
|
|
proto = 0 |
|
) |
| |
Create a root pickler.
FILE should be a Root TFile. PROTO is the python pickle protocol
version to use. The python part will be pickled to a Root
TObjString called _pickle; it will contain references to the
Root objects.
Definition at line 243 of file root_pickle.py.
244 """Create a root pickler.
245 FILE should be a Root TFile. PROTO is the python pickle protocol
246 version to use. The python part will be pickled to a Root
247 TObjString called _pickle; it will contain references to the
251 self.__keys = file.GetListOfKeys()
252 self.__io = Write_Wrapper()
253 self.__pickle = pickle.Pickler (self.__io, proto)
254 self.__pickle.persistent_id = self._persistent_id
◆ _persistent_id()
def python.root_pickle.Pickler._persistent_id |
( |
|
self, |
|
|
|
o |
|
) |
| |
|
private |
Definition at line 284 of file root_pickle.py.
284 def _persistent_id (self, o):
285 if hasattr (o,
'_Root_Proxy__obj'):
286 o = o._Root_Proxy__obj()
287 if (isinstance (o, ROOT.TObject)):
307 k = self.__keys.FindObject(nm)
310 k = self.__file.GetKey (nm)
311 pid =
"%s;%d" % (nm, k.GetCycle())
◆ clear_memo()
def python.root_pickle.Pickler.clear_memo |
( |
|
self | ) |
|
Clears the pickler's internal memo.
Definition at line 277 of file root_pickle.py.
277 def clear_memo (self):
278 """Clears the pickler's internal memo."""
279 self.__pickle.memo.clear()
◆ dump()
def python.root_pickle.Pickler.dump |
( |
|
self, |
|
|
|
o, |
|
|
|
key = None |
|
) |
| |
Write a pickled representation of o to the open TFile.
Definition at line 259 of file root_pickle.py.
259 def dump (self, o, key=None):
260 """Write a pickled representation of o to the open TFile."""
266 self.__pickle.dump (o)
267 s = self.__io.getvalue()
◆ __file
python.root_pickle.Pickler.__file |
|
private |
◆ __io
python.root_pickle.Pickler.__io |
|
private |
◆ __keys
python.root_pickle.Pickler.__keys |
|
private |
◆ __pickle
python.root_pickle.Pickler.__pickle |
|
private |
◆ __pmap
python.root_pickle.Pickler.__pmap |
|
private |
The documentation for this class was generated from the following file: