269 Bootstrap the application with minimal use of Python bindings. 272 from GaudiKernel.Proxy.Configurable
import expandvars
275 expandvars =
lambda data : data
277 from GaudiKernel.Proxy.Configurable
import Configurable, getNeededConfigurables
280 if _bootstrap
is None:
283 self.log.debug(
'basicInit: instantiate ApplicationMgr')
284 self.
ip = self.
g = _bootstrap.createApplicationMgr()
286 self.log.debug(
'basicInit: apply options')
289 comp =
'ApplicationMgr' 290 props = Configurable.allConfigurables.get(comp, {})
292 props =
expandvars(props.getValuedProperties())
293 for p, v
in props.items() + [(
'JobOptionsType',
'NONE')]:
294 if not self.g.setProperty(p, str(v)):
295 self.log.error(
'Cannot set property %s.%s to %s', comp, p, v)
298 if _bootstrap.ROOT_VERSION < (6, 2, 7):
306 msp = self.g.getService(comp)
308 self.log.error(
'Cannot get service %s', comp)
310 props = Configurable.allConfigurables.get(comp, {})
312 props =
expandvars(props.getValuedProperties())
313 for p, v
in props.items():
314 if not _bootstrap.setProperty(msp, p, str(v)):
315 self.log.error(
'Cannot set property %s.%s to %s', comp, p, v)
319 comp =
'JobOptionsSvc' 320 jos = self.g.getService(comp)
322 self.log.error(
'Cannot get service %s', comp)
325 c = Configurable.allConfigurables[n]
326 if n
in [
'ApplicationMgr',
'MessageSvc']:
328 for p, v
in c.getValuedProperties().items() :
331 if hasattr(Configurable,
"PropertyReference")
and type(v) == Configurable.PropertyReference:
335 if type(v) == str : v =
'"%s"' % v
336 elif type(v) == long: v =
'%d' % v
337 _bootstrap.addPropertyToCatalogue(jos, n, p, str(v))
338 if hasattr(Configurable,
"_configurationLocked"):
339 Configurable._configurationLocked =
True 340 self.log.debug(
'basicInit: done')