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 93 of file TreeCrawler.py.
def TreeCrawler.mymf.__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Definition at line 94 of file TreeCrawler.py.
Definition at line 102 of file TreeCrawler.py.
References TreeCrawler.mymf._last_caller.
def TreeCrawler.mymf.import_module | ( | self, | |
partnam, | |||
fqname, | |||
parent | |||
) |
Definition at line 110 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 125 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 132 of file TreeCrawler.py.
References TreeCrawler.mymf._globalarea, TreeCrawler.mymf._localarea, print(), and beamSpotPI.unpack().
|
private |
Definition at line 95 of file TreeCrawler.py.
Referenced by 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 TreeCrawler.mymf.import_hook(), and TreeCrawler.mymf.import_module().
|
private |
Definition at line 99 of file TreeCrawler.py.
Referenced by TreeCrawler.mymf.import_module(), and TreeCrawler.mymf.scan_opcodes_25().
|
private |
Definition at line 96 of file TreeCrawler.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._convert(), TreeCrawler.mymf.load_module(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setType().