Definition at line 356 of file root_pickle.py.
◆ __init__()
def python.root_pickle.Unpickler.__init__ |
( |
|
self, |
|
|
|
file, |
|
|
|
use_proxy = True , |
|
|
|
use_hash = False |
|
) |
| |
Create a root unpickler.
FILE should be a Root TFile.
Definition at line 357 of file root_pickle.py.
357 def __init__ (self, file, use_proxy = True, use_hash = False):
358 """Create a root unpickler.
359 FILE should be a Root TFile.
361 self.__use_proxy = use_proxy
363 self.__io = Read_Wrapper()
364 pickle.Unpickler.__init__ (self, self.__io)
372 for k
in file.GetListOfKeys():
376 if cy > ctab.get(nm,0):
393 ret = htab.get ((nm,cy),
None)
395 print (
"did't find", nm, cy, len(htab))
◆ find_class()
def python.root_pickle.Unpickler.find_class |
( |
|
self, |
|
|
|
module, |
|
|
|
name |
|
) |
| |
Definition at line 433 of file root_pickle.py.
433 def find_class (self, module, name):
434 if module ==
'copy_reg':
436 elif module ==
'__builtin__':
441 mod = sys.modules[module]
443 print (
"Making dummy module %s" % (module))
447 sys.modules[module] = mod
448 klass = getattr(mod, name)
450 except AttributeError:
451 print (
"Making dummy class %s.%s" % (module, name))
452 mod = sys.modules[module]
455 setattr (mod, name, Dummy)
◆ load()
def python.root_pickle.Unpickler.load |
( |
|
self, |
|
|
|
key = None |
|
) |
| |
Read a pickled object representation from the open file.
Definition at line 405 of file root_pickle.py.
405 def load (self, key=None):
406 """Read a pickled object representation from the open file."""
411 save = _compat_hooks[0]()
414 s = self.__file.Get (key +
';%d' % self.__n)
415 self.__io.setvalue (s)
416 o = pickle.Unpickler.load(self)
420 save = _compat_hooks[1](save)
◆ persistent_load()
def python.root_pickle.Unpickler.persistent_load |
( |
|
self, |
|
|
|
pid |
|
) |
| |
Definition at line 423 of file root_pickle.py.
423 def persistent_load (self, pid):
425 o = Root_Proxy (self.__file, pid)
427 o = self.__file.Get (pid)
◆ __file
python.root_pickle.Unpickler.__file |
|
private |
◆ __io
python.root_pickle.Unpickler.__io |
|
private |
◆ __n
python.root_pickle.Unpickler.__n |
|
private |
◆ __use_proxy
python.root_pickle.Unpickler.__use_proxy |
|
private |
The documentation for this class was generated from the following file: