Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
def | import_hook (self, name, caller=None, fromlist=None, level=-1) |
def | import_module (self, partnam, fqname, parent) |
def | load_module (self, fqname, fp, pathname, aux_info) |
def | scan_opcodes_25 (self, co, unpack=struct.unpack) |
Private Attributes | |
_depgraph | |
_globalarea | |
_last_caller | |
_localarea | |
_types | |
Definition at line 94 of file TreeCrawler.py.
def TreeCrawler.mymf.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Definition at line 95 of file TreeCrawler.py.
def TreeCrawler.mymf.import_module | ( | self, | |
partnam, | |||
fqname, | |||
parent | |||
) |
Definition at line 111 of file TreeCrawler.py.
References TreeCrawler.mymf._depgraph, TreeCrawler.mymf._globalarea, TreeCrawler.mymf._last_caller, TreeCrawler.mymf._localarea, and python.rootplot.root2matplotlib.replace().
def TreeCrawler.mymf.load_module | ( | self, | |
fqname, | |||
fp, | |||
pathname, | |||
aux_info | |||
) |
Definition at line 126 of file TreeCrawler.py.
References TreeCrawler.mymf._types, and hcaldqm::quantity::EventType._types.
def TreeCrawler.mymf.scan_opcodes_25 | ( | self, | |
co, | |||
unpack = struct.unpack |
|||
) |
This is basically just the default opcode scanner from ModuleFinder, but extended to also look for "process.load(<module>)' commands. Since the Process object might not necassarily be called "process", it scans for a call to a "load" method with a single parameter on *any* object. If one is found it checks if the parameter is a string that refers to a valid python module in the local or global area. If it does, the scanner assumes this was a call to a Process object and yields the module name. It's not possible to scan first for Process object declarations to get the name of the objects since often (e.g. for customisation functions) the object is passed to a function in a different file. The ModuleFinder.scan_opcodes_25 implementation this is based was taken from https://hg.python.org/cpython/file/2.7/Lib/modulefinder.py#l364
Definition at line 133 of file TreeCrawler.py.
References TreeCrawler.mymf._globalarea, TreeCrawler.mymf._localarea, edm.print(), and SiPixelPI.unpack().
|
private |
Definition at line 96 of file TreeCrawler.py.
Referenced by TreeCrawler.mymf.import_module().
|
private |
Definition at line 101 of file TreeCrawler.py.
Referenced by TreeCrawler.mymf.import_module(), and TreeCrawler.mymf.scan_opcodes_25().
|
private |
Definition at line 98 of file TreeCrawler.py.
Referenced by TreeCrawler.mymf.import_hook(), and TreeCrawler.mymf.import_module().
|
private |
Definition at line 100 of file TreeCrawler.py.
Referenced by TreeCrawler.mymf.import_module(), and TreeCrawler.mymf.scan_opcodes_25().
|
private |
Definition at line 97 of file TreeCrawler.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._convert(), TreeCrawler.mymf.load_module(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setType().