248 Bootstrap the application with minimal use of Python bindings.
251 from GaudiKernel.Proxy.Configurable
import expandvars
254 expandvars =
lambda data : data
256 from GaudiKernel.Proxy.Configurable
import Configurable, getNeededConfigurables
259 if _bootstrap
is None:
262 self.log.debug(
'basicInit: instantiate ApplicationMgr')
263 self.
ip = self.
g = _bootstrap.createApplicationMgr()
265 self.log.debug(
'basicInit: apply options')
268 comp =
'ApplicationMgr'
269 props = Configurable.allConfigurables.get(comp, {})
271 props =
expandvars(props.getValuedProperties())
272 for p, v
in props.items() + [(
'JobOptionsType',
'NONE')]:
273 if not self.g.setProperty(p, str(v)):
274 self.log.error(
'Cannot set property %s.%s to %s', comp, p, v)
277 if _bootstrap.ROOT_VERSION < (6, 2, 7):
285 msp = self.g.getService(comp)
287 self.log.error(
'Cannot get service %s', comp)
289 props = Configurable.allConfigurables.get(comp, {})
291 props =
expandvars(props.getValuedProperties())
292 for p, v
in props.items():
293 if not _bootstrap.setProperty(msp, p, str(v)):
294 self.log.error(
'Cannot set property %s.%s to %s', comp, p, v)
298 comp =
'JobOptionsSvc'
299 jos = self.g.getService(comp)
301 self.log.error(
'Cannot get service %s', comp)
304 c = Configurable.allConfigurables[n]
305 if n
in [
'ApplicationMgr',
'MessageSvc']:
307 for p, v
in c.getValuedProperties().items() :
310 if hasattr(Configurable,
"PropertyReference")
and type(v) == Configurable.PropertyReference:
314 if type(v) == str : v =
'"%s"' % v
315 elif type(v) == long: v =
'%d' % v
316 _bootstrap.addPropertyToCatalogue(jos, n, p, str(v))
317 if hasattr(Configurable,
"_configurationLocked"):
318 Configurable._configurationLocked =
True
319 self.log.debug(
'basicInit: done')
def getNeededConfigurables()