The repository of 'rootmap' files (location, content,...)
Definition at line 285 of file Tools/PyUtils/python/Dso.py.
◆ __init__()
def python.Dso.PyDsoDb.__init__ |
( |
|
self, |
|
|
|
name = "DsoDb" |
|
) |
| |
Definition at line 293 of file Tools/PyUtils/python/Dso.py.
294 object.__init__(self)
299 import PyUtils.Logging
as _L
300 self.msg = _L.logging.getLogger(
'DsoDb')
302 self.dsoPath = os.environ[
'LD_LIBRARY_PATH']
303 self.__buildRepository()
◆ __buildRepository()
def python.Dso.PyDsoDb.__buildRepository |
( |
|
self | ) |
|
|
private |
Definition at line 306 of file Tools/PyUtils/python/Dso.py.
306 def __buildRepository(self):
308 self.dsoFiles =
set()
309 dsoPath = [p
for p
in self.dsoPath.
split( os.pathsep )
310 if not p.startswith(os.environ[
'ROOTSYS'])]
312 if not os.path.exists(path):
continue
315 dir_content = os.listdir(path)
319 dir_content = os.listdir(path)
320 except Exception
as err:
321 msg.warning(
"caught:\n%s", err)
322 if dir_content
is None:
323 msg.warning(
"could not run os.listdir on [%s]", path)
325 dsoFiles = [ f
for f
in dir_content
326 if f.endswith(self.RootMap) ]
327 for dsoFile
in dsoFiles:
328 dsoFile = os.path.join( path, dsoFile )
329 if os.path.exists(dsoFile):
331 self.dsoFiles.
add(dsoFile)
332 for line
in open(dsoFile,
'r'):
335 if len(line) <= 0
or line[0] ==
"#":
342 dsoKey, libName = line[0], line[1]
343 except Exception
as err:
345 'could not parse %s:%i', dsoFile, line_nbr
348 '(some) reflex-dicts may fail to be auto-loaded'
357 if dsoKey.startswith( self.PluginNamespace ):
361 if dsoKey
not in db: db[dsoKey] =
list()
362 if _is_rootcint_dict (libName):
365 libName = os.path.join(path,
_libName(libName))
366 db[dsoKey].
append(libName)
◆ __dups()
def python.Dso.PyDsoDb.__dups |
( |
|
self, |
|
|
|
db, |
|
|
|
pedantic |
|
) |
| |
|
private |
Definition at line 384 of file Tools/PyUtils/python/Dso.py.
384 def __dups(self, db, pedantic):
387 if len(db[k]) == 1:
continue
388 if pedantic: libs = db[k]
393 if os.path.basename(lib)
not in baseLibs:
395 baseLibs.add(os.path.basename(lib))
399 dups[k] = [ lib
for lib
in libs ]
◆ __str__()
def python.Dso.PyDsoDb.__str__ |
( |
|
self | ) |
|
Definition at line 372 of file Tools/PyUtils/python/Dso.py.
373 s = os.linesep.join( [
374 "+--- %s ---" % self.name,
375 "|nbr of lib components: %i" % len(self.db.
keys()),
376 "|nbr of pf components: %i" % len(self.pf.
keys()),
377 "|nbr of dso files: %i" % len(self.dsoFiles),
378 "|nbr of known libs: %i" % len(self.libs()),
379 "+-------------------------"
◆ _to_rflx_name()
def python.Dso.PyDsoDb._to_rflx_name |
( |
|
self, |
|
|
|
typename |
|
) |
| |
|
private |
helper method to massage a typename into something understandable
by reflex (which doesn't understand the same thing than rootmaps).
Definition at line 473 of file Tools/PyUtils/python/Dso.py.
474 """helper method to massage a typename into something understandable
475 by reflex (which doesn't understand the same thing than rootmaps).
◆ _to_rootmap_name()
def python.Dso.PyDsoDb._to_rootmap_name |
( |
|
self, |
|
|
|
typename |
|
) |
| |
|
private |
helper method to massage a typename into something understandable
by the rootmap files
Definition at line 466 of file Tools/PyUtils/python/Dso.py.
468 helper method to massage a typename into something understandable
◆ capabilities()
def python.Dso.PyDsoDb.capabilities |
( |
|
self, |
|
|
|
libName |
|
) |
| |
Definition at line 423 of file Tools/PyUtils/python/Dso.py.
426 for db
in [self.db, self.pf]:
428 if libName
in [ os.path.basename(lib)
for lib
in db[k] ]:
430 caps = [ cap
for cap
in caps ]
433 print (
"::: ERROR: No such library [%s] in dsoDb !!" % libName)
434 raise ValueError (
"")
◆ content()
def python.Dso.PyDsoDb.content |
( |
|
self, |
|
|
|
pedantic |
|
) |
| |
Definition at line 449 of file Tools/PyUtils/python/Dso.py.
451 for db
in [self.pf, self.db]:
453 if pedantic: libs = db[k]
458 if os.path.basename(lib)
not in baseLibs:
460 baseLibs.add(os.path.basename(lib))
463 d[k] = [ lib
for lib
in libs ]
◆ dictDuplicates()
def python.Dso.PyDsoDb.dictDuplicates |
( |
|
self, |
|
|
|
pedantic = False |
|
) |
| |
◆ duplicates()
def python.Dso.PyDsoDb.duplicates |
( |
|
self, |
|
|
|
libName, |
|
|
|
pedantic = False |
|
) |
| |
Definition at line 402 of file Tools/PyUtils/python/Dso.py.
402 def duplicates(self, libName, pedantic = False):
403 caps = self.capabilities(libName)
405 for dupDb
in [ self.dictDuplicates(pedantic),
406 self.pfDuplicates(pedantic) ]:
409 if k
not in dups: dups[k] = []
410 dups[k] += [ lib
for lib
in dupDb[k]
411 if libName
not in os.path.basename(lib) ]
413 for k
in dups.keys():
◆ libs()
def python.Dso.PyDsoDb.libs |
( |
|
self, |
|
|
|
detailedDump = False |
|
) |
| |
Definition at line 437 of file Tools/PyUtils/python/Dso.py.
437 def libs(self, detailedDump = False):
438 if detailedDump: fct =
lambda x : x
439 else: fct = os.path.basename
441 for db
in [self.pf, self.db]:
445 libs = [ lib
for lib
in libs ]
◆ pfDuplicates()
def python.Dso.PyDsoDb.pfDuplicates |
( |
|
self, |
|
|
|
pedantic = False |
|
) |
| |
◆ db
◆ dsoFiles
python.Dso.PyDsoDb.dsoFiles |
◆ DsoMap
python.Dso.PyDsoDb.DsoMap |
|
static |
◆ dsoPath
python.Dso.PyDsoDb.dsoPath |
◆ msg
◆ name
◆ pf
◆ PluginNamespace
python.Dso.PyDsoDb.PluginNamespace |
|
static |
◆ RootMap
python.Dso.PyDsoDb.RootMap |
|
static |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.