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",
"<component name>",
"<module>",
31 log.warning(
"--------------------------------------------------")
32 dups = cfgDb.duplicates()
33 for cfgName
in dups.keys():
34 log.warning(
" -%s: %s - %s", cfgName, cfgDb[cfgName][
'module'],
35 str([d[
'module']
for d
in dups[cfgName]]))
38 log.warning(
"Fix your cmt/requirements file !!")
41 log.debug(
"No duplicates have been found: that's good !")
54 local[conf] = confDbGetConfigurable(conf)
58 """Return a dictionary representing the configuration. 59 The dictionary contains one entry per configurable which is a dictionary 60 with one entry per property. 61 The optional argument "all" is used to decide if to include only values 62 different from the default or all of them. 64 from GaudiKernel.Proxy.Configurable
import getNeededConfigurables
66 catalog = allConfigurables
71 if n
not in conf_dict:
73 for p, v
in catalog[n].getDefaultProperties().items():
77 if n
not in conf_dict:
79 for p, v
in catalog[n].getValuedProperties().items():
82 keys = conf_dict.keys()
90 """Helper function to get a configurable with the given name regardless 92 If defaultType can be a class derived from configurable or a string. If not 93 specified, the tool name is used as type.""" 94 if name
in allConfigurables:
95 return allConfigurables[name]
98 if defaultType
is None:
101 if type(defaultType)
is str:
103 if defaultType
in globals():
105 defaultType = globals()[defaultType]
109 defaultType = getattr(Configurables, defaultType)
110 return defaultType(name)
115 Replace the default main execution loop with the specified callable object. 117 @param runner: a callable that accepts an initialized instance of GaudiPython.AppMgr 118 and the number of events to process and returns a StatusCode or a boolean 123 gaudimain.mainLoop =
lambda _self, app, nevt: runner(app, nevt)
127 """Configurable to enable ROOT-based persistency. 129 Note: it requires Gaudi::RootCnvSvc (package RootCnv). 134 """Apply low-level configuration""" 135 from Configurables
import (
142 from Configurables
import (
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.