8 from CommonGaudiConfigurables
import *
13 log = logging.getLogger(__name__)
15 _InstallRootLoggingHandler()
17 allConfigurables = Configurable.allConfigurables
22 log = logging.getLogger(
'PropertyProxy')
23 log.debug(
"Read module info for %d configurables from %d genConfDb files",
25 if len(cfgDb.duplicates()) > 0:
26 log.warning(
"Found %d duplicates among the %d genConfDb files :",
27 len(cfgDb.duplicates()), nFiles)
28 log.warning(
"--------------------------------------------------")
29 log.warning(
" -%s: %s - %s",
30 "<component name>",
"<module>",
"[ <duplicates> ]")
31 log.warning(
"--------------------------------------------------")
32 dups = cfgDb.duplicates()
33 for cfgName
in dups.keys():
34 log.warning(
" -%s: %s - %s",
36 cfgDb[cfgName][
'module'],
37 str([d[
'module']
for d
in dups[cfgName]]))
40 log.warning(
"Fix your cmt/requirements file !!")
43 log.debug(
"No duplicates have been found: that's good !")
56 local[conf] = confDbGetConfigurable(conf)
60 """Return a dictionary representing the configuration. 61 The dictionary contains one entry per configurable which is a dictionary 62 with one entry per property. 63 The optional argument "all" is used to decide if to include only values 64 different from the default or all of them. 68 catalog = allConfigurables
73 if n
not in conf_dict:
75 for p, v
in catalog[n].getDefaultProperties().items():
79 if n
not in conf_dict:
81 for p, v
in catalog[n].getValuedProperties().items():
84 keys = conf_dict.keys()
92 """Helper function to get a configurable with the given name regardless 94 If defaultType can be a class derived from configurable or a string. If not 95 specified, the tool name is used as type.""" 96 if name
in allConfigurables:
97 return allConfigurables[name]
100 if defaultType
is None:
103 if type(defaultType)
is str:
105 if defaultType
in globals():
107 defaultType = globals()[defaultType]
111 defaultType = getattr(Configurables, defaultType)
112 return defaultType(name)
117 Replace the default main execution loop with the specified callable object. 119 @param runner: a callable that accepts an initialized instance of GaudiPython.AppMgr 120 and the number of events to process and returns a StatusCode or a boolean 125 gaudimain.mainLoop =
lambda _self, app, nevt: runner(app, nevt)
129 """Configurable to enable ROOT-based persistency. 131 Note: it requires Gaudi::RootCnvSvc (package RootCnv). 136 """Apply low-level configuration""" 137 from Configurables
import (ApplicationMgr,
143 from Configurables
import (RootCnvSvc,
149 EventPersistencySvc().CnvServices += cnvSvcs
def __apply_configuration__(self)
def getConfigurable(name, defaultType=None)
def importConfiguration(conf, local=locals())
def configurationDict(all=False)
PersistencySvc class implementation definition.
def setCustomMainLoop(runner)
A FileRecordDataSvc is the base class for event services.
The Application Manager class.