ROOT  6.06/09
Reference Guide
ROOT.py
Go to the documentation of this file.
1 from __future__ import generators
2 # @(#)root/pyroot:$Id$
3 # Author: Wim Lavrijsen (WLavrijsen@lbl.gov)
4 # Created: 02/20/03
5 # Last: 03/25/15
6 
7 """PyROOT user module.
8 
9  o) install lazy ROOT class/variable lookup as appropriate
10  o) feed gSystem and gInterpreter for display updates
11  o) add readline completion (if supported by python build)
12  o) enable some ROOT/Cling style commands
13  o) handle a few special cases such as gPad, STL, etc.
14  o) execute rootlogon.py/.C scripts
15 
16 """
17 
18 __version__ = '8.0.0'
19 __author__ = 'Wim Lavrijsen (WLavrijsen@lbl.gov)'
20 
21 
22 ### system and interpreter setup ------------------------------------------------
23 import os, sys, types
24 import cppyy
25 
26 ## there's no version_info in 1.5.2
27 if sys.version[0:3] < '2.2':
28  raise ImportError( 'Python Version 2.2 or above is required.' )
29 
30 ## 2.2 has 10 instructions as default, > 2.3 has 100 ... make same
31 if sys.version[0:3] == '2.2':
32  sys.setcheckinterval( 100 )
33 
34 ## readline support, if available
35 try:
36  import rlcompleter, readline
37 
38  class RootNameCompleter( rlcompleter.Completer ):
39  def file_matches( self, text ):
40  matches = []
41  path, name = os.path.split( text )
42 
43  try:
44  for fn in os.listdir( path or os.curdir ):
45  if fn[:len(name)] == name:
46  full = os.path.join( path, fn )
47  matches.append( full )
48 
49  if os.path.isdir( full ):
50  matches += map( lambda x: os.path.join( full, x ), os.listdir( full ) )
51  except OSError:
52  pass
53 
54  return matches
55 
56  def root_global_matches( self, text, prefix = '' ):
57  gClassTable = _root.GetCppGlobal( 'gClassTable' )
58  all = [ gClassTable.At(i) for i in xrange(gClassTable.Classes()) ]
59  all += [ g.GetName() for g in _root.gROOT.GetListOfGlobals() ]
60  matches = filter( lambda x: x[:len(text)] == text, all )
61  return [prefix + x for x in matches]
62 
63  def global_matches( self, text ):
64  matches = rlcompleter.Completer.global_matches( self, text )
65  if not matches: matches = []
66  matches += self.file_matches( text )
67  return matches
68 
69  def attr_matches( self, text ):
70  matches = rlcompleter.Completer.attr_matches( self, text )
71  if not matches: matches = []
72  b = text.find('.')
73  try:
74  if 0 <= b and self.namespace[text[:b]].__name__ == 'ROOT':
75  matches += self.root_global_matches( text[b+1:], text[:b+1] )
76  except AttributeError: # not all objects have a __name__
77  pass
78  return matches
79 
80  readline.set_completer( RootNameCompleter().complete )
81  readline.set_completer_delims(
82  readline.get_completer_delims().replace( os.sep , '' ) )
83 
84  readline.parse_and_bind( 'tab: complete' )
85  readline.parse_and_bind( 'set show-all-if-ambiguous On' )
86 except:
87  # module readline typically doesn't exist on non-Unix platforms
88  pass
89 
90 ## special filter on MacOS X (warnings caused by linking that is still required)
91 if sys.platform == 'darwin':
92  import warnings
93  warnings.filterwarnings( action='ignore', category=RuntimeWarning, module='ROOT',\
94  message='class \S* already in TClassTable$' )
95 
96 ### load PyROOT C++ extension module, special case for linux and Sun ------------
97 _root = cppyy._backend
98 
99 ## convince 2.2 it's ok to use the expand function
100 if sys.version[0:3] == '2.2':
101  import copy_reg
102  copy_reg.constructor( _root._ObjectProxy__expand__ )
103 
104 ## convince inspect that PyROOT method proxies are possible drop-ins for python
105 ## methods and classes for pydoc
106 import inspect
107 
108 inspect._old_isfunction = inspect.isfunction
109 def isfunction( object ):
110  if type(object) == _root.MethodProxy and not object.im_class:
111  return True
112  return inspect._old_isfunction( object )
113 inspect.isfunction = isfunction
114 
115 inspect._old_ismethod = inspect.ismethod
116 def ismethod( object ):
117  if type(object) == _root.MethodProxy:
118  return True
119  return inspect._old_ismethod( object )
120 inspect.ismethod = ismethod
121 
122 del isfunction, ismethod
123 
124 
125 ### configuration ---------------------------------------------------------------
126 class _Configuration( object ):
127  __slots__ = [ 'IgnoreCommandLineOptions', 'StartGuiThread', 'ExposeCppMacros',
128  '_gts', 'DisableRootLogon' ]
129 
130  def __init__( self ):
132  self.StartGuiThread = True
133  self.ExposeCppMacros = False
134  self._gts = []
135  self.DisableRootLogon = False
136 
137  def __setGTS( self, value ):
138  for c in value:
139  if not callable( c ):
140  raise ValueError( '"%s" is not callable' % str(c) );
141  self._gts = value
142 
143  def __getGTS( self ):
144  return self._gts
145 
146  GUIThreadScheduleOnce = property( __getGTS, __setGTS )
147 
148 PyConfig = _Configuration()
149 del _Configuration
150 
151 
152 ### choose interactive-favored policies -----------------------------------------
153 _root.SetMemoryPolicy( _root.kMemoryHeuristics )
154 _root.SetSignalPolicy( _root.kSignalSafe )
155 
156 
157 ### data ________________________________________________________________________
158 __pseudo__all__ = [ 'gROOT', 'gSystem', 'gInterpreter',
159  'AddressOf', 'MakeNullPointer', 'Template', 'std' ]
160 __all__ = [] # purposedly empty
161 
162 _orig_ehook = sys.excepthook
163 
164 ## for setting memory and speed policies; not exported
165 _memPolicyAPI = [ 'SetMemoryPolicy', 'SetOwnership', 'kMemoryHeuristics', 'kMemoryStrict' ]
166 _sigPolicyAPI = [ 'SetSignalPolicy', 'kSignalFast', 'kSignalSafe' ]
167 
168 
169 ### helpers ---------------------------------------------------------------------
170 def split( str ):
171  npos = str.find( ' ' )
172  if 0 <= npos:
173  return str[:npos], str[npos+1:]
174  else:
175  return str, ''
176 
177 
178 ### put std namespace directly onto ROOT ----------------------------------------
179 _root.std = cppyy.gbl.std
180 sys.modules['ROOT.std'] = cppyy.gbl.std
181 
182 
183 ### special cases for gPad, gVirtualX (are C++ macro's) -------------------------
184 class _ExpandMacroFunction( object ):
185  def __init__( self, klass, func ):
186  c = _root.CreateScopeProxy( klass )
187  self.func = getattr( c, func )
188 
189  def __getattr__( self, what ):
190  return getattr( self.__dict__[ 'func' ](), what )
191 
192  def __cmp__( self, other ):
193  return cmp( self.func(), other )
194 
195  def __nonzero__( self ):
196  if self.func():
197  return True
198  return False
199 
200  def __repr__( self ):
201  return repr( self.func() )
202 
203  def __str__( self ):
204  return str( self.func() )
205 
206 _root.gPad = _ExpandMacroFunction( "TVirtualPad", "Pad" )
207 _root.gVirtualX = _ExpandMacroFunction( "TVirtualX", "Instance" )
208 _root.gDirectory = _ExpandMacroFunction( "TDirectory", "CurrentDirectory" )
209 _root.gFile = _ExpandMacroFunction( "TFile", "CurrentFile" )
210 _root.gInterpreter = _ExpandMacroFunction( "TInterpreter", "Instance" )
211 
212 
213 ### special case pythonization --------------------------------------------------
214 def _TTree__iter__( self ):
215  i = 0
216  bytes_read = self.GetEntry(i)
217  while 0 < bytes_read:
218  yield self # TODO: not sure how to do this w/ C-API ...
219  i += 1
220  bytes_read = self.GetEntry(i)
221 
222  if bytes_read == -1:
223  raise RuntimeError( "TTree I/O error" )
224 
225 _root.CreateScopeProxy( "TTree" ).__iter__ = _TTree__iter__
226 
227 
228 ### RINT command emulation ------------------------------------------------------
229 def _excepthook( exctype, value, traceb ):
230  # catch syntax errors only (they contain the full line)
231  if isinstance( value, SyntaxError ) and value.text:
232  cmd, arg = split( value.text[:-1] )
233 
234  # mimic ROOT/Cling commands
235  if cmd == '.q':
236  sys.exit( 0 )
237  elif cmd == '.?' or cmd == '.help':
238  sys.stdout.write( """PyROOT emulation of Cling commands.
239 All emulated commands must be preceded by a . (dot).
240 ===========================================================================
241 Help: ? : this help
242  help : this help
243 Shell: ![shell] : execute shell command
244 Evaluation: x [file] : load [file] and evaluate {statements} in the file
245 Load/Unload: L [lib] : load [lib]
246 Quit: q : quit python session
247 
248 The standard python help system is available through a call to 'help()' or
249 'help(<id>)' where <id> is an identifier, e.g. a class or function such as
250 TPad or TPad.cd, etc.
251 """ )
252  return
253  elif cmd == '.!' and arg:
254  return os.system( arg )
255  elif cmd == '.x' and arg:
256  import __main__
257  fn = os.path.expanduser( os.path.expandvars( arg ) )
258  execfile( fn, __main__.__dict__, __main__.__dict__ )
259  return
260  elif cmd == '.L':
261  return _root.gSystem.Load( arg )
262  elif cmd == '.cd' and arg:
263  os.chdir( arg )
264  return
265  elif cmd == '.ls':
266  return sys.modules[ __name__ ].gDirectory.ls()
267  elif cmd == '.pwd':
268  return sys.modules[ __name__ ].gDirectory.pwd()
269  elif isinstance( value, SyntaxError ) and \
270  value.msg == "can't assign to function call":
271  sys.stdout.write( """Are you trying to assign a value to a reference return, for example to the
272 result of a call to "double& SMatrix<>::operator()(int,int)"? If so, then
273 please use operator[] instead, as in e.g. "mymatrix[i][j] = somevalue".
274 """ )
275 
276  # normal exception processing
277  _orig_ehook( exctype, value, traceb )
278 
279 if not '__IPYTHON__' in __builtins__:
280  # IPython has its own ways of executing shell commands etc.
281  sys.excepthook = _excepthook
282 
283 
284 ### call EndOfLineAction after each interactive command (to update display etc.)
285 _orig_dhook = sys.displayhook
286 def _displayhook( v ):
287  _root.gInterpreter.EndOfLineAction()
288  return _orig_dhook( v )
289 
290 
291 ### set import hook to be able to trigger auto-loading as appropriate
292 try:
293  import __builtin__
294 except ImportError:
295  import builtins as __builtin__ # name change in p3
296 _orig_ihook = __builtin__.__import__
297 def _importhook( name, *args, **kwds ):
298  if name[0:5] == 'ROOT.':
299  try:
300  sys.modules[ name ] = getattr( sys.modules[ 'ROOT' ], name[5:] )
301  except Exception:
302  pass
303  return _orig_ihook( name, *args, **kwds )
304 
305 __builtin__.__import__ = _importhook
306 
307 
308 ### helper to prevent GUIs from starving
309 def _processRootEvents( controller ):
310  import time
311  gSystemProcessEvents = _root.gSystem.ProcessEvents
312 
313  if sys.platform == 'win32':
314  import thread
315  _root.gROOT.ProcessLineSync('((TGWin32 *)gVirtualX)->SetUserThreadId(%ld)' % (thread.get_ident()))
316 
317  while controller.keeppolling:
318  try:
319  gSystemProcessEvents()
320  if PyConfig.GUIThreadScheduleOnce:
321  for guicall in PyConfig.GUIThreadScheduleOnce:
322  guicall()
323  PyConfig.GUIThreadScheduleOnce = []
324  time.sleep( 0.01 )
325  except: # in case gSystem gets destroyed early on exit
326  pass
327 
328 
329 ### allow loading ROOT classes as attributes ------------------------------------
330 class ModuleFacade( types.ModuleType ):
331  def __init__( self, module ):
332  types.ModuleType.__init__( self, 'ROOT' )
333 
334  self.__dict__[ 'module' ] = module
335 
336  self.__dict__[ '__doc__' ] = self.module.__doc__
337  self.__dict__[ '__name__' ] = self.module.__name__
338  self.__dict__[ '__file__' ] = self.module.__file__
339 
340  self.__dict__[ 'keeppolling' ] = 0
341  self.__dict__[ 'PyConfig' ] = self.module.PyConfig
342 
343  class gROOTWrapper( object ):
344  def __init__( self, gROOT, master ):
345  self.__dict__[ '_master' ] = master
346  self.__dict__[ '_gROOT' ] = gROOT
347 
348  def __getattr__( self, name ):
349  if name != 'SetBatch' and self._master.__dict__[ 'gROOT' ] != self._gROOT:
350  self._master._ModuleFacade__finalSetup()
351  del self._master.__class__._ModuleFacade__finalSetup
352  return getattr( self._gROOT, name )
353 
354  def __setattr__( self, name, value ):
355  return setattr( self._gROOT, name, value )
356 
357  self.__dict__[ 'gROOT' ] = gROOTWrapper( _root.gROOT, self )
358  del gROOTWrapper
359 
360  # begin with startup gettattr/setattr
361  self.__class__.__getattr__ = self.__class__.__getattr1
362  del self.__class__.__getattr1
363  self.__class__.__setattr__ = self.__class__.__setattr1
364  del self.__class__.__setattr1
365 
366  def __setattr1( self, name, value ): # "start-up" setattr
367  # create application, thread etc.
368  self.__finalSetup()
369  del self.__class__.__finalSetup
370 
371  # let "running" setattr handle setting
372  return setattr( self, name, value )
373 
374  def __setattr2( self, name, value ): # "running" getattr
375  # to allow assignments to ROOT globals such as ROOT.gDebug
376  if not name in self.__dict__:
377  try:
378  # assignment to an existing ROOT global (establishes proxy)
379  setattr( self.__class__, name, _root.GetCppGlobal( name ) )
380  except LookupError:
381  # allow a few limited cases where new globals can be set
382  if sys.hexversion >= 0x3000000:
383  pylong = int
384  else:
385  pylong = long
386  tcnv = { bool : 'bool %s = %d;',
387  int : 'int %s = %d;',
388  pylong : 'long %s = %d;',
389  float : 'double %s = %f;',
390  str : 'string %s = "%s";' }
391  try:
392  _root.gROOT.ProcessLine( tcnv[ type(value) ] % (name,value) );
393  setattr( self.__class__, name, _root.GetCppGlobal( name ) )
394  except KeyError:
395  pass # can still assign normally, to the module
396 
397  # actual assignment through descriptor, or normal python way
398  return super( self.__class__, self ).__setattr__( name, value )
399 
400  def __getattr1( self, name ): # "start-up" getattr
401  # special case, to allow "from ROOT import gROOT" w/o starting GUI thread
402  if name == '__path__':
403  raise AttributeError( name )
404 
405  # create application, thread etc.
406  self.__finalSetup()
407  del self.__class__.__finalSetup
408 
409  # let "running" getattr handle lookup
410  return getattr( self, name )
411 
412  def __getattr2( self, name ): # "running" getattr
413  # handle "from ROOT import *" ... can be called multiple times
414  if name == '__all__':
415  if '__IPYTHON__' in __builtins__:
416  import warnings
417  warnings.warn( '"from ROOT import *" is not supported under IPython' )
418  # continue anyway, just in case it works ...
419 
420  caller = sys.modules[ sys._getframe( 1 ).f_globals[ '__name__' ] ]
421 
422  # we may be calling in from __getattr1, verify and if so, go one frame up
423  if caller == self:
424  caller = sys.modules[ sys._getframe( 2 ).f_globals[ '__name__' ] ]
425 
426  # setup the pre-defined globals
427  for name in self.module.__pseudo__all__:
428  caller.__dict__[ name ] = getattr( _root, name )
429 
430  # install the hook
431  _root.SetRootLazyLookup( caller.__dict__ )
432 
433  # return empty list, to prevent further copying
434  return self.module.__all__
435 
436  # lookup into ROOT (which may cause python-side enum/class/global creation)
437  try:
438  attr = _root.LookupCppEntity( name, PyConfig.ExposeCppMacros )
439  if type(attr) == _root.PropertyProxy:
440  setattr( self.__class__, name, attr ) # descriptor
441  return getattr( self, name )
442  else:
443  self.__dict__[ name ] = attr # normal member
444  return attr
445  except AttributeError:
446  pass
447 
448  # reaching this point means failure ...
449  raise AttributeError( name )
450 
451  def __delattr__( self, name ):
452  # this is for convenience, as typically lookup results are kept at two places
453  try:
454  delattr( self.module._root, name )
455  except AttributeError:
456  pass
457 
458  return super( self.__class__, self ).__delattr__( name )
459 
460  def __finalSetup( self ):
461  # prevent this method from being re-entered through the gROOT wrapper
462  self.__dict__[ 'gROOT' ] = _root.gROOT
463 
464  # switch to running gettattr/setattr
465  self.__class__.__getattr__ = self.__class__.__getattr2
466  del self.__class__.__getattr2
467  self.__class__.__setattr__ = self.__class__.__setattr2
468  del self.__class__.__setattr2
469 
470  # normally, you'll want a ROOT application; don't init any further if
471  # one pre-exists from some C++ code somewhere
472  hasargv = hasattr( sys, 'argv' )
473  if hasargv and PyConfig.IgnoreCommandLineOptions:
474  argv = sys.argv
475  sys.argv = []
476 
477  appc = _root.CreateScopeProxy( 'PyROOT::TPyROOTApplication' )
478  if appc.CreatePyROOTApplication():
479  appc.InitROOTGlobals()
480  # TODO Cling equivalent needed: appc.InitCINTMessageCallback();
481  appc.InitROOTMessageCallback();
482 
483  if hasargv and PyConfig.IgnoreCommandLineOptions:
484  sys.argv = argv
485 
486  # must be called after gApplication creation:
487  if '__IPYTHON__' in __builtins__:
488  # IPython's FakeModule hack otherwise prevents usage of python from Cling (TODO: verify necessity)
489  _root.gROOT.ProcessLine( 'TPython::Exec( "" );' )
490  sys.modules[ '__main__' ].__builtins__ = __builtins__
491 
492  # special case for cout (backwards compatibility)
493  if hasattr( cppyy.gbl.std, '__1' ):
494  attr_1 = getattr( cppyy.gbl.std, '__1' )
495  if hasattr( attr_1, 'cout' ):
496  self.__dict__[ 'cout' ] = attr_1.cout
497 
498  # custom logon file (must be after creation of ROOT globals)
499  if hasargv and not '-n' in sys.argv and not PyConfig.DisableRootLogon:
500  rootlogon = os.path.expanduser( '~/.rootlogon.py' )
501  if os.path.exists( rootlogon ):
502  # could also have used execfile, but import is likely to give fewer surprises
503  import imp
504  imp.load_module( 'rootlogon', open( rootlogon, 'r' ), rootlogon, ('.py','r',1) )
505  del imp
506  else: # if the .py version of rootlogon exists, the .C is ignored (the user can
507  # load the .C from the .py, if so desired)
508 
509  # system logon, user logon, and local logon (skip Rint.Logon)
510  name = '.rootlogon.C'
511  logons = [ os.path.join( str(self.gRootDir), 'etc', 'system' + name ),
512  os.path.expanduser( os.path.join( '~', name ) ) ]
513  if logons[-1] != os.path.join( os.getcwd(), name ):
514  logons.append( name )
515  for rootlogon in logons:
516  if os.path.exists( rootlogon ):
517  appc.ExecuteFile( rootlogon )
518  del rootlogon, logons
519 
520  # use either the input hook or thread to send events to GUIs
521  if self.PyConfig.StartGuiThread and \
522  not ( self.keeppolling or _root.gROOT.IsBatch() ):
523  if self.PyConfig.StartGuiThread == 'inputhook' or\
524  _root.gSystem.InheritsFrom( 'TMacOSXSystem' ):
525  # new, PyOS_InputHook based mechanism
526  if PyConfig.GUIThreadScheduleOnce:
527  for guicall in PyConfig.GUIThreadScheduleOnce:
528  guicall()
529  PyConfig.GUIThreadScheduleOnce = []
530  _root.InstallGUIEventInputHook()
531  else:
532  # original, threading based approach
533  import threading
534  self.__dict__[ 'keeppolling' ] = 1
535  self.__dict__[ 'PyGUIThread' ] = \
536  threading.Thread( None, _processRootEvents, None, ( self, ) )
537 
538  def _finishSchedule( ROOT = self ):
539  import threading
540  if threading.currentThread() != self.PyGUIThread:
541  while self.PyConfig.GUIThreadScheduleOnce:
542  self.PyGUIThread.join( 0.1 )
543 
544  self.PyGUIThread.finishSchedule = _finishSchedule
545  self.PyGUIThread.setDaemon( 1 )
546  self.PyGUIThread.start()
547 
548  # store already available ROOT objects to prevent spurious lookups
549  for name in self.module.__pseudo__all__ + _memPolicyAPI + _sigPolicyAPI:
550  self.__dict__[ name ] = getattr( _root, name )
551 
552  # the macro NULL is not available from Cling globals, but might be useful
553  setattr( _root, 'NULL', 0 )
554 
555  for name in cppyy.gbl.std.stlclasses:
556  setattr( _root, name, getattr( cppyy.gbl.std, name ) )
557 
558  # set the display hook
559  sys.displayhook = _displayhook
560 
561  # manually load libMathCore, for example to obtain gRandom
562  # This can be removed once autoloading on selected variables is available
563  _root.gSystem.Load( "libMathCore" )
564 
565 sys.modules[ __name__ ] = ModuleFacade( sys.modules[ __name__ ] )
566 del ModuleFacade
567 
568 ### Add some infrastructure if we are in a Jupiter Notebook ---------------------
569 # We check if the ZMQ shell is in use, which is a sign of usage in the notebook.
570 if '__IPYTHON__' in __builtins__ and __IPYTHON__:
571  from IPython import get_ipython
572  pre_execute_callbacks = get_ipython().events.callbacks['pre_execute']
573  zmqIshellName = 'ZMQInteractiveShell'
574  if any(zmqIshellName == callBack.im_class.__name__ for callBack in pre_execute_callbacks if hasattr(callBack, 'im_class')):
575  import ROOTaaS.iPyROOT
576 
577 ### b/c of circular references, the facade needs explicit cleanup ---------------
578 import atexit
579 def cleanup():
580  # save for later
581  isCocoa = _root.gSystem.InheritsFrom( 'TMacOSXSystem' )
582 
583  # restore hooks
584  import sys
585  sys.displayhook = sys.__displayhook__
586  if not '__IPYTHON__' in __builtins__:
587  sys.excepthook = sys.__excepthook__
588  __builtin__.__import__ = _orig_ihook
589 
590  facade = sys.modules[ __name__ ]
591 
592  # shutdown GUI thread, as appropriate (always save to call)
593  _root.RemoveGUIEventInputHook()
594 
595  # prevent further spurious lookups into ROOT libraries
596  del facade.__class__.__getattr__
597  del facade.__class__.__setattr__
598 
599  # shutdown GUI thread, as appropriate
600  if hasattr( facade, 'PyGUIThread' ):
601  facade.keeppolling = 0
602 
603  # if not shutdown from GUI (often the case), wait for it
604  import threading
605  if threading.currentThread() != facade.PyGUIThread:
606  facade.PyGUIThread.join( 3. ) # arbitrary
607  del threading
608 
609  # remove otherwise (potentially) circular references
610  import types
611  items = facade.module.__dict__.items()
612  for k, v in items:
613  if type(v) == types.ModuleType:
614  facade.module.__dict__[ k ] = None
615  del v, k, items, types
616 
617  # destroy facade
618  facade.__dict__.clear()
619  del facade
620 
621  # run part the gROOT shutdown sequence ... running it here ensures that
622  # it is done before any ROOT libraries are off-loaded, with unspecified
623  # order of static object destruction;
624  gROOT = sys.modules[ 'libPyROOT' ].gROOT
625  gROOT.EndOfProcessCleanups()
626  del gROOT
627 
628  # cleanup cached python strings
629  sys.modules[ 'libPyROOT' ]._DestroyPyStrings()
630 
631  # destroy ROOT extension module and ROOT module
632  del sys.modules[ 'libPyROOT' ]
633  del sys.modules[ 'ROOT' ]
634 
635 atexit.register( cleanup )
636 del cleanup, atexit
def _displayhook(v)
Definition: ROOT.py:286
def __getGTS(self)
Definition: ROOT.py:143
allow loading ROOT classes as attributes ---------------------------------—
Definition: ROOT.py:330
def isfunction(object)
Definition: ROOT.py:109
def ismethod(object)
Definition: ROOT.py:116
configuration ------------------------------------------------------------—
Definition: ROOT.py:126
def __setattr1(self, name, value)
Definition: ROOT.py:366
def __setattr2(self, name, value)
Definition: ROOT.py:374
def __getattr__(self, what)
Definition: ROOT.py:189
def __nonzero__(self)
Definition: ROOT.py:195
def __cmp__(self, other)
Definition: ROOT.py:192
def _importhook(name, args, kwds)
Definition: ROOT.py:297
def global_matches(self, text)
Definition: ROOT.py:63
def split(str)
helpers ------------------------------------------------------------------—
Definition: ROOT.py:170
def _processRootEvents(controller)
helper to prevent GUIs from starving
Definition: ROOT.py:309
def __getattr1(self, name)
Definition: ROOT.py:400
_orig_ihook
Definition: ROOT.py:296
def __finalSetup(self)
Definition: ROOT.py:460
def __setGTS(self, value)
Definition: ROOT.py:137
def file_matches(self, text)
Definition: ROOT.py:39
def cleanup()
Definition: ROOT.py:579
def __getattr2(self, name)
Definition: ROOT.py:412
int type
Definition: TGX11.cxx:120
def __delattr__(self, name)
Definition: ROOT.py:451
def __repr__(self)
Definition: ROOT.py:200
def __init__(self)
Definition: ROOT.py:130
def attr_matches(self, text)
Definition: ROOT.py:69
_orig_dhook
call EndOfLineAction after each interactive command (to update display etc.)
Definition: ROOT.py:285
def _excepthook(exctype, value, traceb)
RINT command emulation ---------------------------------------------------—.
Definition: ROOT.py:229
def root_global_matches
Definition: ROOT.py:56
_orig_ehook
Definition: ROOT.py:162
def _TTree__iter__(self)
Definition: ROOT.py:214
def __init__(self, module)
Definition: ROOT.py:331
put std namespace directly onto ROOT ----------------------------------——
Definition: ROOT.py:184
def __init__(self, klass, func)
Definition: ROOT.py:185