25 InstallRootLoggingHandler
as _InstallRootLoggingHandler,
29 log = logging.getLogger(__name__)
31 _InstallRootLoggingHandler()
33 allConfigurables = Configurable.allConfigurables
38 log = logging.getLogger(
"PropertyProxy")
40 "Read module info for %d configurables from %d genConfDb files",
44 if len(cfgDb.duplicates()) > 0:
46 "Found %d duplicates among the %d genConfDb files :",
47 len(cfgDb.duplicates()),
50 log.warning(
"--------------------------------------------------")
52 " -%s: %s - %s",
"<component name>",
"<module>",
"[ <duplicates> ]"
54 log.warning(
"--------------------------------------------------")
55 dups = cfgDb.duplicates()
56 for cfgName
in dups.keys():
60 cfgDb[cfgName][
"module"],
61 str([d[
"module"]
for d
in dups[cfgName]]),
67 log.debug(
"No duplicates have been found: that's good !")
77 local[conf] = confDbGetConfigurable(conf)
81 """Return a dictionary representing the configuration.
82 The dictionary contains one entry per configurable which is a dictionary
83 with one entry per property.
84 The optional argument "all" is used to decide if to include only values
85 different from the default or all of them.
87 from GaudiKernel.Proxy.Configurable
import getNeededConfigurables
89 catalog = allConfigurables
94 if n
not in conf_dict:
96 for p, v
in catalog[n].getDefaultProperties().items():
100 if n
not in conf_dict:
102 for p, v
in catalog[n].getValuedProperties().items():
105 keys = conf_dict.keys()
109 ret_dict[n] = conf_dict[n]
114 """Helper function to get a configurable with the given name regardless
116 If defaultType can be a class derived from configurable or a string. If not
117 specified, the tool name is used as type."""
118 if name
in allConfigurables:
119 return allConfigurables[name]
122 if defaultType
is None:
125 if type(defaultType)
is str:
127 if defaultType
in globals():
129 defaultType = globals()[defaultType]
134 defaultType = getattr(Configurables, defaultType)
135 return defaultType(name)