GaudiPython.Bindings.AppMgr Class Reference
Inheritance diagram for GaudiPython.Bindings.AppMgr:
Collaboration diagram for GaudiPython.Bindings.AppMgr:

Public Member Functions

def __new__ (cls, args, kwargs)
 
def __reset__ (self)
 
def __init__
 
def state (self)
 
def FSMState (self)
 
def targetFSMState (self)
 
def service
 
def declSvcType (self, svcname, svctype)
 
def createSvc (self, name)
 
def services (self)
 
def algorithm
 
def algorithms (self)
 
def tool (self, name)
 
def property (self, name)
 
def datasvc (self, name)
 
def evtsvc (self)
 
def detsvc (self)
 
def filerecordsvc (self)
 
def evtsel (self)
 
def histsvc
 
def ntuplesvc
 
def partsvc (self)
 
def toolsvc
 
def optSvc
 
def readOptions (self, file)
 
def addAlgorithm (self, alg)
 
def setAlgorithms (self, algs)
 
def removeAlgorithm (self, alg)
 
def printAlgsSequences (self)
 
def config (self, args)
 
def configure (self)
 
def start (self)
 
def terminate (self)
 
def run (self, n)
 
def executeEvent (self)
 
def execute (self)
 
def runSelectedEvents (self, pfn, events)
 
def exit (self)
 
def __del__ (self)
 Custom destructor to ensure that the application is correctly finalized when exiting from python. More...
 
def __new__ (cls, args, kwargs)
 
def __reset__ (self)
 
def __init__
 
def state (self)
 
def FSMState (self)
 
def targetFSMState (self)
 
def service
 
def declSvcType (self, svcname, svctype)
 
def createSvc (self, name)
 
def services (self)
 
def algorithm
 
def algorithms (self)
 
def tool (self, name)
 
def property (self, name)
 
def datasvc (self, name)
 
def evtsvc (self)
 
def detsvc (self)
 
def filerecordsvc (self)
 
def evtsel (self)
 
def histsvc
 
def ntuplesvc
 
def partsvc (self)
 
def toolsvc
 
def optSvc
 
def readOptions (self, file)
 
def addAlgorithm (self, alg)
 
def setAlgorithms (self, algs)
 
def removeAlgorithm (self, alg)
 
def printAlgsSequences (self)
 
def config (self, args)
 
def configure (self)
 
def start (self)
 
def terminate (self)
 
def run (self, n)
 
def executeEvent (self)
 
def execute (self)
 
def runSelectedEvents (self, pfn, events)
 
def exit (self)
 
def __del__ (self)
 Custom destructor to ensure that the application is correctly finalized when exiting from python. More...
 
- Public Member Functions inherited from GaudiPython.Bindings.iService
def __init__
 
def retrieveInterface (self)
 
def isValid (self)
 
def __init__
 
def retrieveInterface (self)
 
def isValid (self)
 
- Public Member Functions inherited from GaudiPython.Bindings.iProperty
def __init__
 
def getInterface (self)
 
def retrieveInterface (self)
 
def __call_interface_method__ (self, ifname, method, args)
 
def __setattr__ (self, name, value)
 
def __getattr__ (self, name)
 
def properties (self)
 
def name (self)
 
def __init__
 
def getInterface (self)
 
def retrieveInterface (self)
 
def __call_interface_method__ (self, ifname, method, args)
 
def __setattr__ (self, name, value)
 
def __getattr__ (self, name)
 
def properties (self)
 
def name (self)
 

Public Attributes

 JobOptionsType
 
 OutputLevel
 
 topAlg
 

Static Public Attributes

 evtSvc = evtsvc
 
 histSvc = histsvc
 
 ntupleSvc = ntuplesvc
 
 evtSel = evtsel
 
 detSvc = detsvc
 
 toolSvc = toolsvc
 
 partSvc = partsvc
 
- Static Public Attributes inherited from GaudiPython.Bindings.iService
tuple initialize = lambdaself:self.__call_interface_method__("_isvc","initialize")
 
tuple start = lambdaself:self.__call_interface_method__("_isvc","start")
 
tuple stop = lambdaself:self.__call_interface_method__("_isvc","stop")
 
tuple finalize = lambdaself:self.__call_interface_method__("_isvc","finalize")
 
tuple reinitialize = lambdaself:self.__call_interface_method__("_isvc","reinitialize")
 
tuple restart = lambdaself:self.__call_interface_method__("_isvc","restart")
 

Detailed Description

Definition at line 653 of file Bindings.py.

Constructor & Destructor Documentation

def GaudiPython.Bindings.AppMgr.__init__ (   self,
  outputlevel = -1,
  joboptions = None,
  selfoptions = {},
  dllname = None,
  factname = None 
)

Definition at line 675 of file Bindings.py.

675  dllname = None, factname = None) :
676  global _gaudi
677  if _gaudi : return
678  # Protection against multiple calls to exit() if the finalization fails
679  self.__dict__['_exit_called'] = False
680  # keep the Gaudi namespace around (so it is still available during atexit shutdown)...
681  self.__dict__['_gaudi_ns'] = Gaudi
682  try:
683  from GaudiKernel.Proxy.Configurable import expandvars
684  except ImportError:
685  # pass-through implementation if expandvars is not defined (AthenaCommon)
686  expandvars = lambda data : data
687  if dllname and factname:
688  self.__dict__['_appmgr'] = gbl.Gaudi.createApplicationMgr(dllname,factname)
689  elif dllname:
690  self.__dict__['_appmgr'] = gbl.Gaudi.createApplicationMgr(dllname)
691  else:
692  self.__dict__['_appmgr'] = gbl.Gaudi.createApplicationMgr()
693  self.__dict__['_svcloc'] = gbl.Gaudi.svcLocator()
694  self.__dict__['_algmgr'] = InterfaceCast(gbl.IAlgManager)(self._appmgr)
695  self.__dict__['_evtpro'] = InterfaceCast(gbl.IEventProcessor)(self._appmgr)
696  self.__dict__['_svcmgr'] = InterfaceCast(gbl.ISvcManager)(self._appmgr)
697  self.__dict__['pyalgorithms'] = []
698  iService.__init__(self, 'ApplicationMgr', self._appmgr )
699  #------python specific initialization-------------------------------------
700  if self.FSMState() < Gaudi.StateMachine.CONFIGURED : # Not yet configured
701  self.JobOptionsType = 'NONE'
702  if joboptions :
703  from GaudiKernel.ProcessJobOptions import importOptions
704  importOptions(joboptions)
705  # Ensure that the ConfigurableUser instances have been applied
707  if hasattr(GaudiKernel.Proxy.Configurable, "applyConfigurableUsers"):
708  GaudiKernel.Proxy.Configurable.applyConfigurableUsers()
709  # This is the default and could be overridden with "selfopts"
710  self.OutputLevel = 3
711  selfprops = Configurable.allConfigurables.get('ApplicationMgr',{})
712  if selfprops : selfprops = expandvars(selfprops.getValuedProperties())
713  for p,v in selfprops.items() : setattr(self, p, v)
714  for p,v in selfoptions.items() : setattr(self, p, v)
715  # Override job options
716  if outputlevel != -1 : self.OutputLevel = outputlevel
717  self.configure()
718  #---MessageSvc------------------------------------------------------------
719  ms = self.service('MessageSvc')
720  if 'MessageSvc' in Configurable.allConfigurables:
721  msprops = Configurable.allConfigurables['MessageSvc']
722  ms = self.service('MessageSvc')
723  if hasattr(msprops,"getValuedProperties"):
724  msprops = expandvars(msprops.getValuedProperties())
725  for p,v in msprops.items():
726  setattr(ms, p, v)
727  if outputlevel != -1 : ms.OutputLevel = outputlevel
728  #---JobOptions------------------------------------------------------------
729  self.__dict__['_optsvc'] = InterfaceCast(gbl.IJobOptionsSvc)(Helper.service(self._svcloc,'JobOptionsSvc'))
730  #------Configurables initialization (part2)-------------------------------
731  for n in getNeededConfigurables():
732  c = Configurable.allConfigurables[n]
733  if n in ['ApplicationMgr','MessageSvc'] : continue # These are already done---
734  for p, v in c.getValuedProperties().items() :
735  v = expandvars(v)
736  # Note: AthenaCommon.Configurable does not have Configurable.PropertyReference
737  if hasattr(Configurable,"PropertyReference") and type(v) == Configurable.PropertyReference:
738  # this is done in "getFullName", but the exception is ignored,
739  # so we do it again to get it
740  v = v.__resolve__()
741  if type(v) == str : v = '"%s"' % v # need double quotes
742  elif type(v) == long: v = '%d' % v # prevent pending 'L'
743  self._optsvc.addPropertyToCatalogue(n, StringProperty(p,str(v)))
744  if hasattr(Configurable,"_configurationLocked"):
745  Configurable._configurationLocked = True
746 
747  # Ensure that the exit method is called when exiting from Python
748  import atexit
749  atexit.register(self.exit)
750 
751  #---Hack to avoid bad interactions with the ROOT exit handler
752  # Look for an exit handler installed by ROOT
753  root_handler_installed = False
754  for h in atexit._exithandlers:
755  func = h[0]
756  if hasattr(func, "__module__") and func.__module__ == "ROOT":
757  root_handler_installed = True
758  break
759 
760  # If the handler is not yet installed, let's install our private version
761  # that detects that the ROOT exit handler is installed and add our own
762  # after it to ensure it is called before.
763  if not root_handler_installed:
764  orig_register = atexit.register
765  def register(func, *targs, **kargs):
766  orig_register(func, *targs, **kargs)
767  if hasattr(func, "__module__") and func.__module__ == "ROOT":
768  orig_register(self.exit)
769  # we do not need to remove out handler from the list because
770  # it can be safely called more than once
771  register.__doc__ = (orig_register.__doc__ +
772  "\nNote: version hacked by GaudiPython to work " +
773  "around a problem with the ROOT exit handler")
774  atexit.register = register
775 
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.__del__ (   self)

Custom destructor to ensure that the application is correctly finalized when exiting from python.

Definition at line 1014 of file Bindings.py.

1014  def __del__(self):
1015  self.exit()
def __del__(self)
Custom destructor to ensure that the application is correctly finalized when exiting from python...
Definition: Bindings.py:1014
def GaudiPython.Bindings.AppMgr.__init__ (   self,
  outputlevel = -1,
  joboptions = None,
  selfoptions = {},
  dllname = None,
  factname = None 
)

Definition at line 675 of file Bindings.py.

675  dllname = None, factname = None) :
676  global _gaudi
677  if _gaudi : return
678  # Protection against multiple calls to exit() if the finalization fails
679  self.__dict__['_exit_called'] = False
680  # keep the Gaudi namespace around (so it is still available during atexit shutdown)...
681  self.__dict__['_gaudi_ns'] = Gaudi
682  try:
683  from GaudiKernel.Proxy.Configurable import expandvars
684  except ImportError:
685  # pass-through implementation if expandvars is not defined (AthenaCommon)
686  expandvars = lambda data : data
687  if dllname and factname:
688  self.__dict__['_appmgr'] = gbl.Gaudi.createApplicationMgr(dllname,factname)
689  elif dllname:
690  self.__dict__['_appmgr'] = gbl.Gaudi.createApplicationMgr(dllname)
691  else:
692  self.__dict__['_appmgr'] = gbl.Gaudi.createApplicationMgr()
693  self.__dict__['_svcloc'] = gbl.Gaudi.svcLocator()
694  self.__dict__['_algmgr'] = InterfaceCast(gbl.IAlgManager)(self._appmgr)
695  self.__dict__['_evtpro'] = InterfaceCast(gbl.IEventProcessor)(self._appmgr)
696  self.__dict__['_svcmgr'] = InterfaceCast(gbl.ISvcManager)(self._appmgr)
697  self.__dict__['pyalgorithms'] = []
698  iService.__init__(self, 'ApplicationMgr', self._appmgr )
699  #------python specific initialization-------------------------------------
700  if self.FSMState() < Gaudi.StateMachine.CONFIGURED : # Not yet configured
701  self.JobOptionsType = 'NONE'
702  if joboptions :
703  from GaudiKernel.ProcessJobOptions import importOptions
704  importOptions(joboptions)
705  # Ensure that the ConfigurableUser instances have been applied
707  if hasattr(GaudiKernel.Proxy.Configurable, "applyConfigurableUsers"):
708  GaudiKernel.Proxy.Configurable.applyConfigurableUsers()
709  # This is the default and could be overridden with "selfopts"
710  self.OutputLevel = 3
711  selfprops = Configurable.allConfigurables.get('ApplicationMgr',{})
712  if selfprops : selfprops = expandvars(selfprops.getValuedProperties())
713  for p,v in selfprops.items() : setattr(self, p, v)
714  for p,v in selfoptions.items() : setattr(self, p, v)
715  # Override job options
716  if outputlevel != -1 : self.OutputLevel = outputlevel
717  self.configure()
718  #---MessageSvc------------------------------------------------------------
719  ms = self.service('MessageSvc')
720  if 'MessageSvc' in Configurable.allConfigurables:
721  msprops = Configurable.allConfigurables['MessageSvc']
722  ms = self.service('MessageSvc')
723  if hasattr(msprops,"getValuedProperties"):
724  msprops = expandvars(msprops.getValuedProperties())
725  for p,v in msprops.items():
726  setattr(ms, p, v)
727  if outputlevel != -1 : ms.OutputLevel = outputlevel
728  #---JobOptions------------------------------------------------------------
729  self.__dict__['_optsvc'] = InterfaceCast(gbl.IJobOptionsSvc)(Helper.service(self._svcloc,'JobOptionsSvc'))
730  #------Configurables initialization (part2)-------------------------------
731  for n in getNeededConfigurables():
732  c = Configurable.allConfigurables[n]
733  if n in ['ApplicationMgr','MessageSvc'] : continue # These are already done---
734  for p, v in c.getValuedProperties().items() :
735  v = expandvars(v)
736  # Note: AthenaCommon.Configurable does not have Configurable.PropertyReference
737  if hasattr(Configurable,"PropertyReference") and type(v) == Configurable.PropertyReference:
738  # this is done in "getFullName", but the exception is ignored,
739  # so we do it again to get it
740  v = v.__resolve__()
741  if type(v) == str : v = '"%s"' % v # need double quotes
742  elif type(v) == long: v = '%d' % v # prevent pending 'L'
743  self._optsvc.addPropertyToCatalogue(n, StringProperty(p,str(v)))
744  if hasattr(Configurable,"_configurationLocked"):
745  Configurable._configurationLocked = True
746 
747  # Ensure that the exit method is called when exiting from Python
748  import atexit
749  atexit.register(self.exit)
750 
751  #---Hack to avoid bad interactions with the ROOT exit handler
752  # Look for an exit handler installed by ROOT
753  root_handler_installed = False
754  for h in atexit._exithandlers:
755  func = h[0]
756  if hasattr(func, "__module__") and func.__module__ == "ROOT":
757  root_handler_installed = True
758  break
759 
760  # If the handler is not yet installed, let's install our private version
761  # that detects that the ROOT exit handler is installed and add our own
762  # after it to ensure it is called before.
763  if not root_handler_installed:
764  orig_register = atexit.register
765  def register(func, *targs, **kargs):
766  orig_register(func, *targs, **kargs)
767  if hasattr(func, "__module__") and func.__module__ == "ROOT":
768  orig_register(self.exit)
769  # we do not need to remove out handler from the list because
770  # it can be safely called more than once
771  register.__doc__ = (orig_register.__doc__ +
772  "\nNote: version hacked by GaudiPython to work " +
773  "around a problem with the ROOT exit handler")
774  atexit.register = register
775 
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.__del__ (   self)

Custom destructor to ensure that the application is correctly finalized when exiting from python.

Definition at line 1014 of file Bindings.py.

1014  def __del__(self):
1015  self.exit()
def __del__(self)
Custom destructor to ensure that the application is correctly finalized when exiting from python...
Definition: Bindings.py:1014

Member Function Documentation

def GaudiPython.Bindings.AppMgr.__new__ (   cls,
  args,
  kwargs 
)

Definition at line 654 of file Bindings.py.

654  def __new__ ( cls, *args, **kwargs ):
655  global _gaudi
656  if not _gaudi :
657  newobj = object.__new__( cls )
658  cls.__init__(newobj, *args, **kwargs)
659  _gaudi = newobj
660  return _gaudi
def __new__(cls, args, kwargs)
Definition: Bindings.py:654
def GaudiPython.Bindings.AppMgr.__new__ (   cls,
  args,
  kwargs 
)

Definition at line 654 of file Bindings.py.

654  def __new__ ( cls, *args, **kwargs ):
655  global _gaudi
656  if not _gaudi :
657  newobj = object.__new__( cls )
658  cls.__init__(newobj, *args, **kwargs)
659  _gaudi = newobj
660  return _gaudi
def __new__(cls, args, kwargs)
Definition: Bindings.py:654
def GaudiPython.Bindings.AppMgr.__reset__ (   self)

Definition at line 661 of file Bindings.py.

661  def __reset__(self):
662  global _gaudi
663  # Stop, Finalize and Terminate the current AppMgr
664  self.exit()
665  # release interfaces
666  self._evtpro.release()
667  self._svcloc.release()
668  self._appmgr.release()
669  # Reset the C++ globals
670  gbl.Gaudi.setInstance(makeNullPointer('ISvcLocator'))
671  gbl.Gaudi.setInstance(makeNullPointer('IAppMgrUI'))
672  # Reset the Python global
673  _gaudi = None
def GaudiPython.Bindings.AppMgr.__reset__ (   self)

Definition at line 661 of file Bindings.py.

661  def __reset__(self):
662  global _gaudi
663  # Stop, Finalize and Terminate the current AppMgr
664  self.exit()
665  # release interfaces
666  self._evtpro.release()
667  self._svcloc.release()
668  self._appmgr.release()
669  # Reset the C++ globals
670  gbl.Gaudi.setInstance(makeNullPointer('ISvcLocator'))
671  gbl.Gaudi.setInstance(makeNullPointer('IAppMgrUI'))
672  # Reset the Python global
673  _gaudi = None
def GaudiPython.Bindings.AppMgr.addAlgorithm (   self,
  alg 
)
Add an Algorithm to the list of Top algorithms. It can be either a instance of
    an Algorithm class or it name 

Definition at line 839 of file Bindings.py.

839  def addAlgorithm(self, alg) :
840  """ Add an Algorithm to the list of Top algorithms. It can be either a instance of
841  an Algorithm class or it name """
842  if type(alg) is str :
843  self.topAlg += [alg]
844  else :
845  self.pyalgorithms.append(alg)
846  setOwnership(alg,0)
847  if self.targetFSMState() >= Gaudi.StateMachine.INITIALIZED :
848  alg.sysInitialize()
849  if self.targetFSMState() == Gaudi.StateMachine.RUNNING :
850  alg.sysStart()
851  self.topAlg += [alg.name()]
def addAlgorithm(self, alg)
Definition: Bindings.py:839
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.addAlgorithm (   self,
  alg 
)
Add an Algorithm to the list of Top algorithms. It can be either a instance of
    an Algorithm class or it name 

Definition at line 839 of file Bindings.py.

839  def addAlgorithm(self, alg) :
840  """ Add an Algorithm to the list of Top algorithms. It can be either a instance of
841  an Algorithm class or it name """
842  if type(alg) is str :
843  self.topAlg += [alg]
844  else :
845  self.pyalgorithms.append(alg)
846  setOwnership(alg,0)
847  if self.targetFSMState() >= Gaudi.StateMachine.INITIALIZED :
848  alg.sysInitialize()
849  if self.targetFSMState() == Gaudi.StateMachine.RUNNING :
850  alg.sysStart()
851  self.topAlg += [alg.name()]
def addAlgorithm(self, alg)
Definition: Bindings.py:839
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.algorithm (   self,
  name,
  createIf = False 
)

Definition at line 792 of file Bindings.py.

792  def algorithm(self, name , createIf = False ) :
793  alg = Helper.algorithm( self._algmgr, name , createIf )
794  if not alg : return iAlgorithm ( name , alg )
795  else : return iAlgorithm ( alg.name() , alg )
def GaudiPython.Bindings.AppMgr.algorithm (   self,
  name,
  createIf = False 
)

Definition at line 792 of file Bindings.py.

792  def algorithm(self, name , createIf = False ) :
793  alg = Helper.algorithm( self._algmgr, name , createIf )
794  if not alg : return iAlgorithm ( name , alg )
795  else : return iAlgorithm ( alg.name() , alg )
def GaudiPython.Bindings.AppMgr.algorithms (   self)

Definition at line 796 of file Bindings.py.

796  def algorithms(self) :
797  l = self._algmgr.getAlgorithms()
798  return [a.name() for a in l]
def GaudiPython.Bindings.AppMgr.algorithms (   self)

Definition at line 796 of file Bindings.py.

796  def algorithms(self) :
797  l = self._algmgr.getAlgorithms()
798  return [a.name() for a in l]
def GaudiPython.Bindings.AppMgr.config (   self,
  args 
)
Simple utility to perform the configuration of Gaudi application.
It reads the set of input job-options files, and set few
additional parameters 'options' through the usage of temporary *.opts file
Usage:
gaudi.config( files   = [ '$GAUSSOPTS/Gauss.opts'                     ,
                  '$DECFILESROOT/options/10022_010.0GeV.opts' ] ,
      options = [ 'EventSelector.PrintFreq   =   5  '         ] )

Definition at line 894 of file Bindings.py.

894  def config ( self, **args ):
895  """
896  Simple utility to perform the configuration of Gaudi application.
897  It reads the set of input job-options files, and set few
898  additional parameters 'options' through the usage of temporary *.opts file
899  Usage:
900  gaudi.config( files = [ '$GAUSSOPTS/Gauss.opts' ,
901  '$DECFILESROOT/options/10022_010.0GeV.opts' ] ,
902  options = [ 'EventSelector.PrintFreq = 5 ' ] )
903  """
904  files = args.get('files',[])
905  for file in files :
906  sc = self.readOptions(file)
907  if sc.isFailure() :
908  raise RuntimeError , ' Unable to read file "' + file +'" '
909  options = args.get('options',None)
910  if options :
911  import tempfile
912  tmpfilename = tempfile.mktemp()
913  tmpfile = open( tmpfilename, 'w' )
914  tmpfile.write ( '#pragma print on \n' )
915  tmpfile.write ( '/// File "' + tmpfilename+'" generated by GaudiPython \n\n' )
916  for opt in options :
917  if type(options) is dict :
918  tmpfile.write( ' \t ' + opt + ' = '+ options[opt]+ ' ; // added by GaudiPython \n' )
919  else :
920  tmpfile.write( ' \t ' + opt + ' ; // added by GaudiPython \n' )
921  tmpfile.write ( '/// End of file "' + tmpfilename+'" generated by GaudiPython \n\n' )
922  tmpfile.close()
923  sc = self.readOptions( tmpfilename )
924  if sc.isFailure() :
925  raise RuntimeError , ' Unable to read file "' + tmpfilename +'" '
926  os.remove( tmpfilename )
927  # We need to make sure that the options are taken by the ApplicationMgr
928  if self.FSMState() != Gaudi.StateMachine.OFFLINE : # The state is already configured, so we need to do something....
929 
930  ## get job-options-service, @see class iJobOptSvc
931  jos = self.optSvc()
932 
933  ## list of all libraries
934  _dlls = jos.getProperty ( self.name() , 'DLLs' )
935  ## take care about libraries : APPEND if not done yet
936  if _dlls :
937  libs = [ l for l in _dlls if not l in self.DLLs ]
938  if libs : self.DLLs += libs
939 
940  ## all external services
941  _svcs = jos.getProperty ( self.name() , 'ExtSvc' )
942  ## take care about services : APPEND if not done yet
943  if _svcs :
944  svcs = [ s for s in _svcs if not s in self.ExtSvc ]
945  if svcs : self.ExtSvc += svcs
946 
947  ## get all properties
948  props = jos.getProperties ( self.name() )
949  ## finally treat all other properties (presumably scalar properties)
950  for key in props :
951  if 'DLLS' == key or 'EXTSVC' == key : continue
952  self.__setattr__( key , props[key] )
953  return SUCCESS # RETURN
def config(self, args)
Definition: Bindings.py:894
string type
Definition: gaudirun.py:151
def readOptions(self, file)
Definition: Bindings.py:837
def __setattr__(self, name, value)
Definition: Bindings.py:195
def GaudiPython.Bindings.AppMgr.config (   self,
  args 
)
Simple utility to perform the configuration of Gaudi application.
It reads the set of input job-options files, and set few
additional parameters 'options' through the usage of temporary *.opts file
Usage:
gaudi.config( files   = [ '$GAUSSOPTS/Gauss.opts'                     ,
                  '$DECFILESROOT/options/10022_010.0GeV.opts' ] ,
      options = [ 'EventSelector.PrintFreq   =   5  '         ] )

Definition at line 894 of file Bindings.py.

894  def config ( self, **args ):
895  """
896  Simple utility to perform the configuration of Gaudi application.
897  It reads the set of input job-options files, and set few
898  additional parameters 'options' through the usage of temporary *.opts file
899  Usage:
900  gaudi.config( files = [ '$GAUSSOPTS/Gauss.opts' ,
901  '$DECFILESROOT/options/10022_010.0GeV.opts' ] ,
902  options = [ 'EventSelector.PrintFreq = 5 ' ] )
903  """
904  files = args.get('files',[])
905  for file in files :
906  sc = self.readOptions(file)
907  if sc.isFailure() :
908  raise RuntimeError , ' Unable to read file "' + file +'" '
909  options = args.get('options',None)
910  if options :
911  import tempfile
912  tmpfilename = tempfile.mktemp()
913  tmpfile = open( tmpfilename, 'w' )
914  tmpfile.write ( '#pragma print on \n' )
915  tmpfile.write ( '/// File "' + tmpfilename+'" generated by GaudiPython \n\n' )
916  for opt in options :
917  if type(options) is dict :
918  tmpfile.write( ' \t ' + opt + ' = '+ options[opt]+ ' ; // added by GaudiPython \n' )
919  else :
920  tmpfile.write( ' \t ' + opt + ' ; // added by GaudiPython \n' )
921  tmpfile.write ( '/// End of file "' + tmpfilename+'" generated by GaudiPython \n\n' )
922  tmpfile.close()
923  sc = self.readOptions( tmpfilename )
924  if sc.isFailure() :
925  raise RuntimeError , ' Unable to read file "' + tmpfilename +'" '
926  os.remove( tmpfilename )
927  # We need to make sure that the options are taken by the ApplicationMgr
928  if self.FSMState() != Gaudi.StateMachine.OFFLINE : # The state is already configured, so we need to do something....
929 
930  ## get job-options-service, @see class iJobOptSvc
931  jos = self.optSvc()
932 
933  ## list of all libraries
934  _dlls = jos.getProperty ( self.name() , 'DLLs' )
935  ## take care about libraries : APPEND if not done yet
936  if _dlls :
937  libs = [ l for l in _dlls if not l in self.DLLs ]
938  if libs : self.DLLs += libs
939 
940  ## all external services
941  _svcs = jos.getProperty ( self.name() , 'ExtSvc' )
942  ## take care about services : APPEND if not done yet
943  if _svcs :
944  svcs = [ s for s in _svcs if not s in self.ExtSvc ]
945  if svcs : self.ExtSvc += svcs
946 
947  ## get all properties
948  props = jos.getProperties ( self.name() )
949  ## finally treat all other properties (presumably scalar properties)
950  for key in props :
951  if 'DLLS' == key or 'EXTSVC' == key : continue
952  self.__setattr__( key , props[key] )
953  return SUCCESS # RETURN
def config(self, args)
Definition: Bindings.py:894
string type
Definition: gaudirun.py:151
def readOptions(self, file)
Definition: Bindings.py:837
def __setattr__(self, name, value)
Definition: Bindings.py:195
def GaudiPython.Bindings.AppMgr.configure (   self)

Definition at line 954 of file Bindings.py.

954  def configure(self) :
955  return self._appmgr.configure()
def GaudiPython.Bindings.AppMgr.configure (   self)

Definition at line 954 of file Bindings.py.

954  def configure(self) :
955  return self._appmgr.configure()
def GaudiPython.Bindings.AppMgr.createSvc (   self,
  name 
)

Definition at line 787 of file Bindings.py.

787  def createSvc(self, name ) :
788  return Helper.service( self._svcloc, name, True )
def createSvc(self, name)
Definition: Bindings.py:787
def GaudiPython.Bindings.AppMgr.createSvc (   self,
  name 
)

Definition at line 787 of file Bindings.py.

787  def createSvc(self, name ) :
788  return Helper.service( self._svcloc, name, True )
def createSvc(self, name)
Definition: Bindings.py:787
def GaudiPython.Bindings.AppMgr.datasvc (   self,
  name 
)

Definition at line 805 of file Bindings.py.

805  def datasvc(self, name) :
806  if self.state() == Gaudi.StateMachine.CONFIGURED : self.initialize()
807  svc = Helper.service( self._svcloc, name )
808  return iDataSvc(name, svc)
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.datasvc (   self,
  name 
)

Definition at line 805 of file Bindings.py.

805  def datasvc(self, name) :
806  if self.state() == Gaudi.StateMachine.CONFIGURED : self.initialize()
807  svc = Helper.service( self._svcloc, name )
808  return iDataSvc(name, svc)
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.declSvcType (   self,
  svcname,
  svctype 
)

Definition at line 785 of file Bindings.py.

785  def declSvcType(self, svcname, svctype ) :
786  self._svcmgr.declareSvcType(svcname, svctype)
def declSvcType(self, svcname, svctype)
Definition: Bindings.py:785
def GaudiPython.Bindings.AppMgr.declSvcType (   self,
  svcname,
  svctype 
)

Definition at line 785 of file Bindings.py.

785  def declSvcType(self, svcname, svctype ) :
786  self._svcmgr.declareSvcType(svcname, svctype)
def declSvcType(self, svcname, svctype)
Definition: Bindings.py:785
def GaudiPython.Bindings.AppMgr.detsvc (   self)

Definition at line 811 of file Bindings.py.

811  def detsvc(self) :
812  return self.datasvc('DetectorDataSvc')
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.detsvc (   self)

Definition at line 811 of file Bindings.py.

811  def detsvc(self) :
812  return self.datasvc('DetectorDataSvc')
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.evtsel (   self)

Definition at line 815 of file Bindings.py.

815  def evtsel(self):
816  if self.state() == Gaudi.StateMachine.CONFIGURED : self.initialize()
817  if not hasattr(self,'_evtsel') : self.__dict__['_evtsel'] = iEventSelector()
818  return self._evtsel
def GaudiPython.Bindings.AppMgr.evtsel (   self)

Definition at line 815 of file Bindings.py.

815  def evtsel(self):
816  if self.state() == Gaudi.StateMachine.CONFIGURED : self.initialize()
817  if not hasattr(self,'_evtsel') : self.__dict__['_evtsel'] = iEventSelector()
818  return self._evtsel
def GaudiPython.Bindings.AppMgr.evtsvc (   self)

Definition at line 809 of file Bindings.py.

809  def evtsvc(self) :
810  return self.datasvc('EventDataSvc')
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.evtsvc (   self)

Definition at line 809 of file Bindings.py.

809  def evtsvc(self) :
810  return self.datasvc('EventDataSvc')
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.execute (   self)

Definition at line 972 of file Bindings.py.

972  def execute(self) :
973  return self._evtpro.executeEvent()
def GaudiPython.Bindings.AppMgr.execute (   self)

Definition at line 972 of file Bindings.py.

972  def execute(self) :
973  return self._evtpro.executeEvent()
def GaudiPython.Bindings.AppMgr.executeEvent (   self)

Definition at line 970 of file Bindings.py.

970  def executeEvent(self) :
971  return self._evtpro.executeEvent()
def GaudiPython.Bindings.AppMgr.executeEvent (   self)

Definition at line 970 of file Bindings.py.

970  def executeEvent(self) :
971  return self._evtpro.executeEvent()
def GaudiPython.Bindings.AppMgr.exit (   self)

Definition at line 1001 of file Bindings.py.

1001  def exit(self):
1002  # Protection against multiple calls to exit() if the finalization fails
1003  if not self._exit_called:
1004  self.__dict__['_exit_called'] = True
1005  Gaudi = self._gaudi_ns
1006  if self.FSMState() == Gaudi.StateMachine.RUNNING:
1007  self._appmgr.stop().ignore()
1008  if self.FSMState() == Gaudi.StateMachine.INITIALIZED:
1009  self._appmgr.finalize().ignore()
1010  if self.FSMState() == Gaudi.StateMachine.CONFIGURED:
1011  self._appmgr.terminate()
1012  return SUCCESS
def GaudiPython.Bindings.AppMgr.exit (   self)

Definition at line 1001 of file Bindings.py.

1001  def exit(self):
1002  # Protection against multiple calls to exit() if the finalization fails
1003  if not self._exit_called:
1004  self.__dict__['_exit_called'] = True
1005  Gaudi = self._gaudi_ns
1006  if self.FSMState() == Gaudi.StateMachine.RUNNING:
1007  self._appmgr.stop().ignore()
1008  if self.FSMState() == Gaudi.StateMachine.INITIALIZED:
1009  self._appmgr.finalize().ignore()
1010  if self.FSMState() == Gaudi.StateMachine.CONFIGURED:
1011  self._appmgr.terminate()
1012  return SUCCESS
def GaudiPython.Bindings.AppMgr.filerecordsvc (   self)

Definition at line 813 of file Bindings.py.

813  def filerecordsvc(self) :
814  return self.datasvc('FileRecordDataSvc')
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.filerecordsvc (   self)

Definition at line 813 of file Bindings.py.

813  def filerecordsvc(self) :
814  return self.datasvc('FileRecordDataSvc')
def datasvc(self, name)
Definition: Bindings.py:805
def GaudiPython.Bindings.AppMgr.FSMState (   self)

Definition at line 777 of file Bindings.py.

777  def FSMState(self) : return self._isvc.FSMState()
def GaudiPython.Bindings.AppMgr.FSMState (   self)

Definition at line 777 of file Bindings.py.

777  def FSMState(self) : return self._isvc.FSMState()
def GaudiPython.Bindings.AppMgr.histsvc (   self,
  name = 'HistogramDataSvc' 
)

Definition at line 819 of file Bindings.py.

819  def histsvc(self, name='HistogramDataSvc') :
820  svc = Helper.service( self._svcloc, name )
821  return iHistogramSvc(name, svc)
def GaudiPython.Bindings.AppMgr.histsvc (   self,
  name = 'HistogramDataSvc' 
)

Definition at line 819 of file Bindings.py.

819  def histsvc(self, name='HistogramDataSvc') :
820  svc = Helper.service( self._svcloc, name )
821  return iHistogramSvc(name, svc)
def GaudiPython.Bindings.AppMgr.ntuplesvc (   self,
  name = 'NTupleSvc' 
)

Definition at line 822 of file Bindings.py.

822  def ntuplesvc(self, name='NTupleSvc') :
823  if name not in self.ExtSvc : self.ExtSvc += [name]
824 # if self.HistogramPersistency == 'NONE' : self.HistogramPersistency = 'ROOT'
825  svc = Helper.service( self._svcloc, name, True )
826  return iNTupleSvc(name, svc)
def GaudiPython.Bindings.AppMgr.ntuplesvc (   self,
  name = 'NTupleSvc' 
)

Definition at line 822 of file Bindings.py.

822  def ntuplesvc(self, name='NTupleSvc') :
823  if name not in self.ExtSvc : self.ExtSvc += [name]
824 # if self.HistogramPersistency == 'NONE' : self.HistogramPersistency = 'ROOT'
825  svc = Helper.service( self._svcloc, name, True )
826  return iNTupleSvc(name, svc)
def GaudiPython.Bindings.AppMgr.optSvc (   self,
  name = 'JobOptionsSvc' 
)

Definition at line 834 of file Bindings.py.

834  def optSvc (self, name='JobOptionsSvc') :
835  svc = Helper.service( self._svcloc, name, True )
836  return iJobOptSvc(name, svc)
def GaudiPython.Bindings.AppMgr.optSvc (   self,
  name = 'JobOptionsSvc' 
)

Definition at line 834 of file Bindings.py.

834  def optSvc (self, name='JobOptionsSvc') :
835  svc = Helper.service( self._svcloc, name, True )
836  return iJobOptSvc(name, svc)
def GaudiPython.Bindings.AppMgr.partsvc (   self)

Definition at line 827 of file Bindings.py.

827  def partsvc(self ) :
828  if self.FSMState() == Gaudi.StateMachine.CONFIGURED : self.initialize()
829  svc = Helper.service( self._svcloc, 'ParticlePropertySvc' )
830  return InterfaceCast(gbl.IParticlePropertySvc)(svc)
def GaudiPython.Bindings.AppMgr.partsvc (   self)

Definition at line 827 of file Bindings.py.

827  def partsvc(self ) :
828  if self.FSMState() == Gaudi.StateMachine.CONFIGURED : self.initialize()
829  svc = Helper.service( self._svcloc, 'ParticlePropertySvc' )
830  return InterfaceCast(gbl.IParticlePropertySvc)(svc)
def GaudiPython.Bindings.AppMgr.printAlgsSequences (   self)
Print the sequence of Algorithms.

Definition at line 878 of file Bindings.py.

879  """
880  Print the sequence of Algorithms.
881  """
882  def printAlgo( algName, appMgr, prefix = ' ') :
883  print prefix + algName
884  alg = appMgr.algorithm( algName.split( "/" )[ -1 ] )
885  prop = alg.properties()
886  if prop.has_key( "Members" ) :
887  subs = prop[ "Members" ].value()
888  for i in subs : printAlgo( i.strip( '"' ), appMgr, prefix + " " )
889  mp = self.properties()
890  prefix = 'ApplicationMgr SUCCESS '
891  print prefix + "****************************** Algorithm Sequence ****************************"
892  for i in mp["TopAlg"].value(): printAlgo( i, self, prefix )
893  print prefix + "******************************************************************************"
def GaudiPython.Bindings.AppMgr.printAlgsSequences (   self)
Print the sequence of Algorithms.

Definition at line 878 of file Bindings.py.

879  """
880  Print the sequence of Algorithms.
881  """
882  def printAlgo( algName, appMgr, prefix = ' ') :
883  print prefix + algName
884  alg = appMgr.algorithm( algName.split( "/" )[ -1 ] )
885  prop = alg.properties()
886  if prop.has_key( "Members" ) :
887  subs = prop[ "Members" ].value()
888  for i in subs : printAlgo( i.strip( '"' ), appMgr, prefix + " " )
889  mp = self.properties()
890  prefix = 'ApplicationMgr SUCCESS '
891  print prefix + "****************************** Algorithm Sequence ****************************"
892  for i in mp["TopAlg"].value(): printAlgo( i, self, prefix )
893  print prefix + "******************************************************************************"
def GaudiPython.Bindings.AppMgr.property (   self,
  name 
)

Definition at line 801 of file Bindings.py.

801  def property( self , name ) :
802  if name in self.algorithms() : return self.algorithm( name )
803  elif name in self.services() : return self.service(name )
804  else : return iProperty( name )
def property(self, name)
Definition: Bindings.py:801
def GaudiPython.Bindings.AppMgr.property (   self,
  name 
)

Definition at line 801 of file Bindings.py.

801  def property( self , name ) :
802  if name in self.algorithms() : return self.algorithm( name )
803  elif name in self.services() : return self.service(name )
804  else : return iProperty( name )
def property(self, name)
Definition: Bindings.py:801
def GaudiPython.Bindings.AppMgr.readOptions (   self,
  file 
)

Definition at line 837 of file Bindings.py.

837  def readOptions(self, file) :
838  return self._optsvc.readOptions(file)
def readOptions(self, file)
Definition: Bindings.py:837
def GaudiPython.Bindings.AppMgr.readOptions (   self,
  file 
)

Definition at line 837 of file Bindings.py.

837  def readOptions(self, file) :
838  return self._optsvc.readOptions(file)
def readOptions(self, file)
Definition: Bindings.py:837
def GaudiPython.Bindings.AppMgr.removeAlgorithm (   self,
  alg 
)
Remove an Algorithm to the list of Top algorithms. It can be either a instance of
    an Algorithm class or it name 

Definition at line 867 of file Bindings.py.

867  def removeAlgorithm(self, alg) :
868  """ Remove an Algorithm to the list of Top algorithms. It can be either a instance of
869  an Algorithm class or it name """
870  tmp = self.topAlg
871  if type(alg) is str :
872  tmp.remove(alg)
873  else :
874  tmp.remove(alg.name())
875  self.pyalgorithms.remove(alg)
876  setOwnership(alg,1)
877  self.topAlg = tmp
def removeAlgorithm(self, alg)
Definition: Bindings.py:867
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.removeAlgorithm (   self,
  alg 
)
Remove an Algorithm to the list of Top algorithms. It can be either a instance of
    an Algorithm class or it name 

Definition at line 867 of file Bindings.py.

867  def removeAlgorithm(self, alg) :
868  """ Remove an Algorithm to the list of Top algorithms. It can be either a instance of
869  an Algorithm class or it name """
870  tmp = self.topAlg
871  if type(alg) is str :
872  tmp.remove(alg)
873  else :
874  tmp.remove(alg.name())
875  self.pyalgorithms.remove(alg)
876  setOwnership(alg,1)
877  self.topAlg = tmp
def removeAlgorithm(self, alg)
Definition: Bindings.py:867
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.run (   self,
  n 
)

Definition at line 960 of file Bindings.py.

960  def run(self, n) :
961  if self.FSMState() == Gaudi.StateMachine.CONFIGURED :
962  sc = self.initialize()
963  if sc.isFailure() or self.ReturnCode != 0:
964  return sc
965  if self.FSMState() == Gaudi.StateMachine.INITIALIZED :
966  sc = self.start()
967  if sc.isFailure() or self.ReturnCode != 0:
968  return sc
969  return self._evtpro.executeRun(n)
def GaudiPython.Bindings.AppMgr.run (   self,
  n 
)

Definition at line 960 of file Bindings.py.

960  def run(self, n) :
961  if self.FSMState() == Gaudi.StateMachine.CONFIGURED :
962  sc = self.initialize()
963  if sc.isFailure() or self.ReturnCode != 0:
964  return sc
965  if self.FSMState() == Gaudi.StateMachine.INITIALIZED :
966  sc = self.start()
967  if sc.isFailure() or self.ReturnCode != 0:
968  return sc
969  return self._evtpro.executeRun(n)
def GaudiPython.Bindings.AppMgr.runSelectedEvents (   self,
  pfn,
  events 
)

Definition at line 974 of file Bindings.py.

974  def runSelectedEvents(self, pfn, events):
975  if self.FSMState() == Gaudi.StateMachine.CONFIGURED :
976  sc = self.initialize()
977  if sc.isFailure(): return sc
978  if self.FSMState() == Gaudi.StateMachine.INITIALIZED :
979  sc = self.start()
980  if sc.isFailure(): return sc
981  #--- Access a number of services ----
982  if not hasattr(self,'_perssvc'): self.__dict__['_perssvc'] = self.service('EventPersistencySvc','IAddressCreator')
983  if not hasattr(self,'_filecat'): self.__dict__['_filecat'] = self.service('FileCatalog','Gaudi::IFileCatalog')
984  if not hasattr(self,'_evtmgr'): self.__dict__['_evtmgr'] = self.service('EventDataSvc','IDataManagerSvc')
985  #--- Get FID from PFN and number of events in file
986  if pfn.find('PFN:') == 0: pfn = pfn[4:]
987  fid, maxevt = _getFIDandEvents(pfn)
988  #--- Add FID into catalog if needed ---
989  if not self._filecat.existsFID(fid) : self._filecat.registerPFN(fid, pfn, '')
990  #--- Loop over events
991  if type(events) is not list : events = (events,)
992  for evt in events :
993  #--- Create POOL Address from Generic Address
994  gadd = gbl.GenericAddress(0x02, 1, fid, '/Event', 0, evt)
995  oadd = makeNullPointer('IOpaqueAddress')
996  self._perssvc.createAddress(gadd.svcType(),gadd.clID(),gadd.par(),gadd.ipar(),oadd)
997  #--- Clear TES, set root and run all algorithms
998  self._evtmgr.clearStore()
999  self._evtmgr.setRoot('/Event',oadd)
1000  self._evtpro.executeEvent()
def runSelectedEvents(self, pfn, events)
Definition: Bindings.py:974
def _getFIDandEvents(pfn)
Definition: Bindings.py:1025
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.runSelectedEvents (   self,
  pfn,
  events 
)

Definition at line 974 of file Bindings.py.

974  def runSelectedEvents(self, pfn, events):
975  if self.FSMState() == Gaudi.StateMachine.CONFIGURED :
976  sc = self.initialize()
977  if sc.isFailure(): return sc
978  if self.FSMState() == Gaudi.StateMachine.INITIALIZED :
979  sc = self.start()
980  if sc.isFailure(): return sc
981  #--- Access a number of services ----
982  if not hasattr(self,'_perssvc'): self.__dict__['_perssvc'] = self.service('EventPersistencySvc','IAddressCreator')
983  if not hasattr(self,'_filecat'): self.__dict__['_filecat'] = self.service('FileCatalog','Gaudi::IFileCatalog')
984  if not hasattr(self,'_evtmgr'): self.__dict__['_evtmgr'] = self.service('EventDataSvc','IDataManagerSvc')
985  #--- Get FID from PFN and number of events in file
986  if pfn.find('PFN:') == 0: pfn = pfn[4:]
987  fid, maxevt = _getFIDandEvents(pfn)
988  #--- Add FID into catalog if needed ---
989  if not self._filecat.existsFID(fid) : self._filecat.registerPFN(fid, pfn, '')
990  #--- Loop over events
991  if type(events) is not list : events = (events,)
992  for evt in events :
993  #--- Create POOL Address from Generic Address
994  gadd = gbl.GenericAddress(0x02, 1, fid, '/Event', 0, evt)
995  oadd = makeNullPointer('IOpaqueAddress')
996  self._perssvc.createAddress(gadd.svcType(),gadd.clID(),gadd.par(),gadd.ipar(),oadd)
997  #--- Clear TES, set root and run all algorithms
998  self._evtmgr.clearStore()
999  self._evtmgr.setRoot('/Event',oadd)
1000  self._evtpro.executeEvent()
def runSelectedEvents(self, pfn, events)
Definition: Bindings.py:974
def _getFIDandEvents(pfn)
Definition: Bindings.py:1025
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.service (   self,
  name,
  interface = None 
)

Definition at line 779 of file Bindings.py.

779  def service(self, name, interface = None) :
780  svc = Helper.service( self._svcloc, name )
781  if interface :
782  return InterfaceCast(interface)(svc)
783  else :
784  return iService(name, svc )
def GaudiPython.Bindings.AppMgr.service (   self,
  name,
  interface = None 
)

Definition at line 779 of file Bindings.py.

779  def service(self, name, interface = None) :
780  svc = Helper.service( self._svcloc, name )
781  if interface :
782  return InterfaceCast(interface)(svc)
783  else :
784  return iService(name, svc )
def GaudiPython.Bindings.AppMgr.services (   self)

Definition at line 789 of file Bindings.py.

789  def services(self) :
790  l = self._svcloc.getServices()
791  return [s.name() for s in l]
def GaudiPython.Bindings.AppMgr.services (   self)

Definition at line 789 of file Bindings.py.

789  def services(self) :
790  l = self._svcloc.getServices()
791  return [s.name() for s in l]
def GaudiPython.Bindings.AppMgr.setAlgorithms (   self,
  algs 
)
Set the list of Top Algorithms.
    It can be an individual of a list of algorithms names or instances 

Definition at line 852 of file Bindings.py.

852  def setAlgorithms(self, algs) :
853  """ Set the list of Top Algorithms.
854  It can be an individual of a list of algorithms names or instances """
855  if type(algs) is not list : algs = [algs]
856  names = []
857  for alg in algs :
858  if type(alg) is str : names.append(alg)
859  else :
860  self.pyalgorithms.append(alg)
861  if self.targetFSMState() >= Gaudi.StateMachine.INITIALIZED :
862  alg.sysInitialize()
863  if self.targetFSMState() == Gaudi.StateMachine.RUNNING :
864  alg.sysStart()
865  names.append(alg.name())
866  self.topAlg = names
def setAlgorithms(self, algs)
Definition: Bindings.py:852
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.setAlgorithms (   self,
  algs 
)
Set the list of Top Algorithms.
    It can be an individual of a list of algorithms names or instances 

Definition at line 852 of file Bindings.py.

852  def setAlgorithms(self, algs) :
853  """ Set the list of Top Algorithms.
854  It can be an individual of a list of algorithms names or instances """
855  if type(algs) is not list : algs = [algs]
856  names = []
857  for alg in algs :
858  if type(alg) is str : names.append(alg)
859  else :
860  self.pyalgorithms.append(alg)
861  if self.targetFSMState() >= Gaudi.StateMachine.INITIALIZED :
862  alg.sysInitialize()
863  if self.targetFSMState() == Gaudi.StateMachine.RUNNING :
864  alg.sysStart()
865  names.append(alg.name())
866  self.topAlg = names
def setAlgorithms(self, algs)
Definition: Bindings.py:852
string type
Definition: gaudirun.py:151
def GaudiPython.Bindings.AppMgr.start (   self)

Definition at line 956 of file Bindings.py.

956  def start(self) :
957  return self._appmgr.start()
def GaudiPython.Bindings.AppMgr.start (   self)

Definition at line 956 of file Bindings.py.

956  def start(self) :
957  return self._appmgr.start()
def GaudiPython.Bindings.AppMgr.state (   self)

Definition at line 776 of file Bindings.py.

776  def state(self) : return self._isvc.FSMState()
def GaudiPython.Bindings.AppMgr.state (   self)

Definition at line 776 of file Bindings.py.

776  def state(self) : return self._isvc.FSMState()
def GaudiPython.Bindings.AppMgr.targetFSMState (   self)

Definition at line 778 of file Bindings.py.

778  def targetFSMState(self) : return self._isvc.targetFSMState()
def GaudiPython.Bindings.AppMgr.targetFSMState (   self)

Definition at line 778 of file Bindings.py.

778  def targetFSMState(self) : return self._isvc.targetFSMState()
def GaudiPython.Bindings.AppMgr.terminate (   self)

Definition at line 958 of file Bindings.py.

958  def terminate(self):
959  return self._appmgr.terminate()
def GaudiPython.Bindings.AppMgr.terminate (   self)

Definition at line 958 of file Bindings.py.

958  def terminate(self):
959  return self._appmgr.terminate()
def GaudiPython.Bindings.AppMgr.tool (   self,
  name 
)

Definition at line 799 of file Bindings.py.

799  def tool(self, name ) :
800  return iAlgTool(name)
def tool(self, name)
Definition: Bindings.py:799
def GaudiPython.Bindings.AppMgr.tool (   self,
  name 
)

Definition at line 799 of file Bindings.py.

799  def tool(self, name ) :
800  return iAlgTool(name)
def tool(self, name)
Definition: Bindings.py:799
def GaudiPython.Bindings.AppMgr.toolsvc (   self,
  name = 'ToolSvc' 
)

Definition at line 831 of file Bindings.py.

831  def toolsvc(self, name='ToolSvc') :
832  svc = Helper.service( self._svcloc, name, True )
833  return iToolSvc(name, svc)
def GaudiPython.Bindings.AppMgr.toolsvc (   self,
  name = 'ToolSvc' 
)

Definition at line 831 of file Bindings.py.

831  def toolsvc(self, name='ToolSvc') :
832  svc = Helper.service( self._svcloc, name, True )
833  return iToolSvc(name, svc)

Member Data Documentation

GaudiPython.Bindings.AppMgr.detSvc = detsvc
static

Definition at line 1020 of file Bindings.py.

GaudiPython.Bindings.AppMgr.evtSel = evtsel
static

Definition at line 1019 of file Bindings.py.

GaudiPython.Bindings.AppMgr.evtSvc = evtsvc
static

Definition at line 1016 of file Bindings.py.

GaudiPython.Bindings.AppMgr.histSvc = histsvc
static

Definition at line 1017 of file Bindings.py.

GaudiPython.Bindings.AppMgr.JobOptionsType

Definition at line 701 of file Bindings.py.

GaudiPython.Bindings.AppMgr.ntupleSvc = ntuplesvc
static

Definition at line 1018 of file Bindings.py.

GaudiPython.Bindings.AppMgr.OutputLevel

Definition at line 710 of file Bindings.py.

GaudiPython.Bindings.AppMgr.partSvc = partsvc
static

Definition at line 1022 of file Bindings.py.

GaudiPython.Bindings.AppMgr.toolSvc = toolsvc
static

Definition at line 1021 of file Bindings.py.

GaudiPython.Bindings.AppMgr.topAlg

Definition at line 866 of file Bindings.py.


The documentation for this class was generated from the following file: