GSI Object Oriented Online Offline (Go4)
GO4-5.3.2
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
python
go4py
go4.py
Go to the documentation of this file.
1
2
from
internals.facade
import
Facade
3
from
types
import
ModuleType
4
5
6
def
realNone
(obj):
7
"""
8
Replace PyROOT null pointer (== None) with a real Python None (is None)
9
"""
10
return
None
if
obj ==
None
else
obj
11
12
13
14
@Facade(__name__)
15
class
go4Wrapper
(ModuleType):
16
"""
17
Wraps the PyROOT-bound go4 object (transferred here via __builtin__)
18
to provide some safety measures
19
"""
20
try
:
21
analysis = go4
22
except
NameError:
23
analysis =
None
24
25
def
__getattr__
(self, name):
26
"""Forward missing attributes to the internal go4 object"""
27
return
getattr(self.
analysis
, name)
28
29
def
NextMatchingObject
(self, expr="*", folder=None, reset=False):
30
"""Safer proxy for the eponymous go4 method"""
31
if
not
folder:
32
folder =
"Go4"
33
obj = self.analysis.NextMatchingObject(expr, folder, reset)
34
return
self.realNone(obj)
35
36
37
go4py.go4.realNone
def realNone
Definition:
go4.py:6
go4py.go4.go4Wrapper.analysis
analysis
Definition:
go4.py:21
go4py.go4.go4Wrapper.__getattr__
def __getattr__
Definition:
go4.py:25
go4py.go4.go4Wrapper
Definition:
go4.py:15
go4py.go4.go4Wrapper.NextMatchingObject
def NextMatchingObject
Definition:
go4.py:29
Generated on Fri Oct 26 2018 08:34:53 for GSI Object Oriented Online Offline (Go4) by
1.8.8