Public Member Functions | |
def | __init__ |
def | import_hook |
def | import_module |
def | load_module |
Private Attributes | |
_depgraph | |
_globalarea | |
_last_caller | |
_localarea | |
_types |
Definition at line 91 of file TreeCrawler.py.
def TreeCrawler::mymf::__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Definition at line 92 of file TreeCrawler.py.
00093 : 00094 self._depgraph = {} 00095 self._types = {} 00096 self._last_caller = None 00097 #TODO - replace by environment variables CMSSW_BASE and CMSSW_RELEASE_BASE (*and* do it only if the global one is not empty like for IB areas) 00098 self._localarea = os.path.expandvars('$CMSSW_BASE') 00099 self._globalarea = os.path.expandvars('$CMSSW_RELEASE_BASE') modulefinder.ModuleFinder.__init__(self,*args,**kwargs)
def TreeCrawler::mymf::import_hook | ( | self, | |
name, | |||
caller = None , |
|||
fromlist = None , |
|||
level = -1 |
|||
) |
Definition at line 100 of file TreeCrawler.py.
def TreeCrawler::mymf::import_module | ( | self, | |
partnam, | |||
fqname, | |||
parent | |||
) |
Definition at line 108 of file TreeCrawler.py.
00109 : 00110 00111 if partnam in ("FWCore","os"): 00112 r = None 00113 else: 00114 r = modulefinder.ModuleFinder.import_module(self,partnam,fqname,parent) 00115 # since the modulefinder is not able to look into the global area when coming from the local area, we force a second try 00116 if parent and not r and self._localarea != '' and self._globalarea != '': 00117 parent.__file__ = parent.__file__.replace(self._localarea,self._globalarea) 00118 parent.__path__[0] = parent.__path__[0].replace(self._localarea,self._globalarea) 00119 r = modulefinder.ModuleFinder.import_module(self,partnam,fqname,parent) 00120 00121 if r is not None: 00122 self._depgraph.setdefault(self._last_caller.__name__,{})[r.__name__] = 1 return r
def TreeCrawler::mymf::load_module | ( | self, | |
fqname, | |||
fp, | |||
pathname, | |||
suffix, | |||
mode, | |||
type | |||
) |
Definition at line 123 of file TreeCrawler.py.
TreeCrawler::mymf::_depgraph [private] |
Definition at line 92 of file TreeCrawler.py.
TreeCrawler::mymf::_globalarea [private] |
Definition at line 92 of file TreeCrawler.py.
TreeCrawler::mymf::_last_caller [private] |
Definition at line 92 of file TreeCrawler.py.
TreeCrawler::mymf::_localarea [private] |
Definition at line 92 of file TreeCrawler.py.
TreeCrawler::mymf::_types [private] |
Definition at line 92 of file TreeCrawler.py.