The repository of 'rootmap' files (location, content,...)
Definition at line 283 of file Tools/PyUtils/python/Dso.py.
◆ __init__()
def python.Dso.PyDsoDb.__init__ |
( |
|
self, |
|
|
|
name = "DsoDb" |
|
) |
| |
Definition at line 291 of file Tools/PyUtils/python/Dso.py.
292 object.__init__(self)
297 import PyUtils.Logging
as _L
298 self.msg = _L.logging.getLogger(
'DsoDb')
300 self.dsoPath = os.environ[
'LD_LIBRARY_PATH']
301 self.__buildRepository()
◆ __buildRepository()
def python.Dso.PyDsoDb.__buildRepository |
( |
|
self | ) |
|
|
private |
Definition at line 304 of file Tools/PyUtils/python/Dso.py.
304 def __buildRepository(self):
306 self.dsoFiles =
set()
307 dsoPath = [p
for p
in self.dsoPath.
split( os.pathsep )
308 if not p.startswith(os.environ[
'ROOTSYS'])]
310 if not os.path.exists(path):
continue
313 dir_content = os.listdir(path)
317 dir_content = os.listdir(path)
318 except Exception
as err:
319 msg.warning(
"caught:\n%s", err)
320 if dir_content
is None:
321 msg.warning(
"could not run os.listdir on [%s]", path)
323 dsoFiles = [ f
for f
in dir_content
324 if f.endswith(self.RootMap) ]
325 for dsoFile
in dsoFiles:
326 dsoFile = os.path.join( path, dsoFile )
327 if os.path.exists(dsoFile):
329 self.dsoFiles.
add(dsoFile)
330 for line
in open(dsoFile,
'r'):
333 if len(line) <= 0
or line[0] ==
"#":
340 dsoKey, libName = line[0], line[1]
341 except Exception
as err:
343 'could not parse %s:%i', dsoFile, line_nbr
346 '(some) reflex-dicts may fail to be auto-loaded'
355 if dsoKey.startswith( self.PluginNamespace ):
359 if dsoKey
not in db: db[dsoKey] =
list()
360 if _is_rootcint_dict (libName):
363 libName = os.path.join(path,
_libName(libName))
364 db[dsoKey].
append(libName)
◆ __dups()
def python.Dso.PyDsoDb.__dups |
( |
|
self, |
|
|
|
db, |
|
|
|
pedantic |
|
) |
| |
|
private |
Definition at line 382 of file Tools/PyUtils/python/Dso.py.
382 def __dups(self, db, pedantic):
385 if len(db[k]) == 1:
continue
386 if pedantic: libs = db[k]
391 if os.path.basename(lib)
not in baseLibs:
393 baseLibs.add(os.path.basename(lib))
397 dups[k] = [ lib
for lib
in libs ]
◆ __str__()
def python.Dso.PyDsoDb.__str__ |
( |
|
self | ) |
|
Definition at line 370 of file Tools/PyUtils/python/Dso.py.
371 s = os.linesep.join( [
372 "+--- %s ---" % self.name,
373 "|nbr of lib components: %i" % len(self.db.
keys()),
374 "|nbr of pf components: %i" % len(self.pf.
keys()),
375 "|nbr of dso files: %i" % len(self.dsoFiles),
376 "|nbr of known libs: %i" % len(self.libs()),
377 "+-------------------------"
◆ _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 471 of file Tools/PyUtils/python/Dso.py.
472 """helper method to massage a typename into something understandable
473 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 464 of file Tools/PyUtils/python/Dso.py.
466 helper method to massage a typename into something understandable
◆ capabilities()
def python.Dso.PyDsoDb.capabilities |
( |
|
self, |
|
|
|
libName |
|
) |
| |
Definition at line 421 of file Tools/PyUtils/python/Dso.py.
424 for db
in [self.db, self.pf]:
426 if libName
in [ os.path.basename(lib)
for lib
in db[k] ]:
428 caps = [ cap
for cap
in caps ]
431 print (
"::: ERROR: No such library [%s] in dsoDb !!" % libName)
432 raise ValueError (
"")
◆ content()
def python.Dso.PyDsoDb.content |
( |
|
self, |
|
|
|
pedantic |
|
) |
| |
Definition at line 447 of file Tools/PyUtils/python/Dso.py.
449 for db
in [self.pf, self.db]:
451 if pedantic: libs = db[k]
456 if os.path.basename(lib)
not in baseLibs:
458 baseLibs.add(os.path.basename(lib))
461 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 400 of file Tools/PyUtils/python/Dso.py.
400 def duplicates(self, libName, pedantic = False):
401 caps = self.capabilities(libName)
403 for dupDb
in [ self.dictDuplicates(pedantic),
404 self.pfDuplicates(pedantic) ]:
407 if k
not in dups: dups[k] = []
408 dups[k] += [ lib
for lib
in dupDb[k]
409 if libName
not in os.path.basename(lib) ]
411 for k
in dups.keys():
◆ libs()
def python.Dso.PyDsoDb.libs |
( |
|
self, |
|
|
|
detailedDump = False |
|
) |
| |
Definition at line 435 of file Tools/PyUtils/python/Dso.py.
435 def libs(self, detailedDump = False):
436 if detailedDump: fct =
lambda x : x
437 else: fct = os.path.basename
439 for db
in [self.pf, self.db]:
443 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.