The repository of 'rootmap' files (location, content,...) and a set of
operations one can apply on them (load dict, query dicts,...)
Definition at line 42 of file Control/AthenaServices/python/Dso.py.
◆ __init__()
def python.Dso.DsoDb.__init__ |
( |
|
self | ) |
|
Definition at line 47 of file Control/AthenaServices/python/Dso.py.
48 super(DsoDb, self).
__init__(
'AthenaDsoDb')
49 import AthenaCommon.Logging
50 self.msg = AthenaCommon.Logging.logging.getLogger(
"AthenaDsoDb")
54 for k,v
in _aliases.iteritems():
56 self.db[k] = self.db[v]
58 self.msg.
info(
"could not install alias [%s] -> [%s]", k,v)
62 self._rflx_type = cppyy.gbl.RootType.ByName
◆ has_type()
def python.Dso.DsoDb.has_type |
( |
|
self, |
|
|
|
typename |
|
) |
| |
Definition at line 65 of file Control/AthenaServices/python/Dso.py.
65 def has_type (self, typename):
67 if typename
in _cpp_builtins:
70 typename = self._to_rootmap_name (typename)
71 return self.db.has_key (typename)
or \
72 self.pf.has_key (typename)
◆ load_type()
def python.Dso.DsoDb.load_type |
( |
|
self, |
|
|
|
typename |
|
) |
| |
Definition at line 74 of file Control/AthenaServices/python/Dso.py.
74 def load_type (self, typename):
75 rflx_type = self.rflx_type(typename)
76 if not(rflx_type
is None):
77 rflx_name = rflx_type.Name(RflxEnums.DICTSCOPE)
◆ rflx_type()
def python.Dso.DsoDb.rflx_type |
( |
|
self, |
|
|
|
typename |
|
) |
| |
Definition at line 82 of file Control/AthenaServices/python/Dso.py.
82 def rflx_type(self, typename):
83 _rootmap_name = self._to_rootmap_name (typename)
84 _rflx_name = self._to_rflx_name (typename)
85 self.msg.
verbose(
"------- loading type [%s]...", typename)
88 if typename
in _cpp_builtins:
89 self.msg.
verbose(
" ==> [ok] (builtin)")
90 return self._rflx_type (_rflx_name)
92 if not self.has_type (_rootmap_name):
93 self.msg.
verbose(
" ==> [err] (no '%s')",_rootmap_name)
95 libs = (self.db.
get(_rootmap_name)
or
96 self.pf.
get(_rootmap_name))
97 if libs
is None or len(libs) <= 0:
99 from ctypes
import cdll
100 _load = cdll.LoadLibrary
101 from cppyy
import loadDict
as _load
104 _load (os.path.basename(lib.strip()))
105 self.msg.
verbose(
"... %s [done]",lib)
110 rflx_type = self._rflx_type (_rflx_name)
111 if rflx_type.Name() !=
'':
◆ visit()
def python.Dso.DsoDb.visit |
( |
|
self, |
|
|
|
typename, |
|
|
|
visitor = None , |
|
|
|
ctx = None |
|
) |
| |
Definition at line 116 of file Control/AthenaServices/python/Dso.py.
116 def visit(self, typename, visitor=None, ctx=None):
117 self.msg.
verbose(
"=== visiting %s", typename)
120 if isinstance (typename, str):
121 rflx_type = self.load_type (typename)
122 typename = rflx_type.Name (RflxEnums.DICTSCOPE)
127 self.msg.
verbose(
"**warning** no dict for [%s] !!", typename)
134 if rflx_type.IsClass()
or rflx_type.IsStruct():
135 for i
in range(rflx_type.BaseSize()):
136 itype = rflx_type.BaseAt(i).ToType()
137 itype_name = itype.Name(RflxEnums.DICTSCOPE)
138 if itype_name !=
'' and not (itype_name
in ctx):
139 self.load_type (itype_name)
141 ctx.update (self.visit (itype, visitor, ctx))
143 for i
in range(rflx_type.DataMemberSize()):
144 itype = rflx_type.DataMemberAt (i).TypeOf()
145 itype = itype.RawType()
if itype.IsPointer()
else itype
146 itype_name = itype.Name(RflxEnums.DICTSCOPE)
147 if itype_name !=
'' and not (itype_name
in ctx):
148 self.load_type (itype_name)
151 itype = rflx_type.DataMemberAt (i).TypeOf()
152 itype_name = itype.Name(RflxEnums.DICTSCOPE)
153 ctx.update (self.visit (itype, visitor, ctx))
◆ _rflx_type
python.Dso.DsoDb._rflx_type |
|
private |
◆ msg
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.