ATLAS Offline Software
Loading...
Searching...
No Matches
python.PyROOTFixes Namespace Reference

Functions

 fix_method (clname, methname)
 enable_tree_fixes ()
 enable_pickling ()
 _getClassIfDictionaryExists (cname)

Variables

str __docformat__ = "restructuredtext en"

Detailed Description

Functions to work around PyROOT bugs for accessing DataVector.

:author: scott snyder
:contact: snyder@bnl.gov

Importing this module will automatically apply workarounds
for known PyROOT issues.

Function Documentation

◆ _getClassIfDictionaryExists()

python.PyROOTFixes._getClassIfDictionaryExists ( cname)
protected

Definition at line 38 of file PyROOTFixes.py.

38def _getClassIfDictionaryExists (cname):
39 cl = ROOT.gROOT.GetListOfClasses().FindObject(cname)
40 if cl:
41 if cl.IsLoaded() and cl.HasDictionary(): return cl
42 return None
43 if ROOT.gInterpreter.GetClassSharedLibs (cname):
44 cl = ROOT.TClass.GetClass (cname)
45 if cl.HasDictionary(): return cl
46 return None
47
48# Force-load the main Gaudi library if it's available. If this package's library
49# is loaded before Gaudi, the application gets into a weird state. Hopefully we
50# will be able to remove this with future compiler versions. (GCC 10?...)

◆ enable_pickling()

python.PyROOTFixes.enable_pickling ( )
Enable pickling of object proxy's

Definition at line 29 of file PyROOTFixes.py.

29def enable_pickling ():
30 """Enable pickling of object proxy's"""
31 import libPyROOT
32 ROOT.RootUtils.PyROOTPickle.Initialize (libPyROOT, ROOT.ObjectProxy)
33 del libPyROOT
34 return
35
36
37# Convert from class name to TClass; try to avoid autoparsing.

◆ enable_tree_fixes()

python.PyROOTFixes.enable_tree_fixes ( )
Additional pythonizations for TTree.

Definition at line 22 of file PyROOTFixes.py.

22def enable_tree_fixes ():
23 """Additional pythonizations for TTree."""
24 ROOT.RootUtils.PyROOTTTreePatch.Initialize (ROOT.TTree,
25 ROOT.TChain,
26 ROOT.TBranch)
27 return
28

◆ fix_method()

python.PyROOTFixes.fix_method ( clname,
methname )

Definition at line 18 of file PyROOTFixes.py.

18def fix_method (clname, methname):
19 # Now only a stub.
20 return
21

Variable Documentation

◆ __docformat__

str python.PyROOTFixes.__docformat__ = "restructuredtext en"
private

Definition at line 12 of file PyROOTFixes.py.