13 """ GaudiPython.Bindings module.
14 This module provides the basic bindings of the main Gaudi
15 components to Python. It is itself based on the ROOT cppyy
16 Python extension module.
18 from __future__
import absolute_import, print_function
51 from GaudiKernel
import ROOT6WorkAroundEnabled
54 with warnings.catch_warnings():
55 warnings.simplefilter(
"ignore")
66 from GaudiKernel.Proxy.Configurable
import Configurable, getNeededConfigurables
68 from .
import Pythonizations
77 gbl.gInterpreter.Declare(
'#include "Gaudi/Property.h"')
78 Helper = gbl.GaudiPython.Helper
79 StringProperty = gbl.Gaudi.Property(
"std::string")
80 StringPropertyRef = gbl.Gaudi.Property(
"std::string&")
81 GaudiHandleProperty = gbl.GaudiHandleProperty
82 GaudiHandleArrayProperty = gbl.GaudiHandleArrayProperty
83 DataObject = gbl.DataObject
84 SUCCESS = gbl.StatusCode(gbl.StatusCode.SUCCESS)
85 FAILURE = gbl.StatusCode(gbl.StatusCode.FAILURE)
87 if hasattr(cppyy,
"nullptr"):
88 nullptr = cppyy.nullptr
89 elif hasattr(gbl,
"nullptr"):
94 cppyy.gbl.gInterpreter.Declare(
97 namespace GaudiPython { namespace Helpers {
98 void setProperty(ISvcLocator* svcLoc, std::string key, std::string value) {
99 if ( !svcLoc ) throw std::runtime_error( "invalid ISvcLocator pointer" );
100 svcLoc->getOptsSvc().set(key, value);
107 for l
in [l
for l
in dir(Helper)
if re.match(
"^to.*Array$", l)]:
108 exec(
"%s = Helper.%s" % (l, l))
112 if hasattr(Helper,
"toArray"):
116 return getattr(Helper,
"toArray")
121 return getattr(Helper,
"toArray<%s>" % typ)
126 if hasattr(cppyy,
"libPyROOT"):
127 ROOT = cppyy.libPyROOT
130 makeNullPointer = ROOT.MakeNullPointer
131 setOwnership = ROOT.SetOwnership
135 warnings.warn(
"GaudiPython: " + message, DeprecationWarning, stacklevel=3)
142 """Helper class to obtain the adequate interface from a component
143 by using the Gaudi queryInterface() mechanism"""
154 if obj.queryInterface(self.
type.interfaceID(), ip).isSuccess():
158 "ERROR: queryInterface failed for", obj,
"interface:", self.
type
160 except Exception
as e:
164 "caught when retrieving interface",
171 traceback.print_stack()
183 InterfaceCast.__init__(self, t)
193 """Load an LCG dictionary"""
194 loadlib_return_code = Helper.loadDynamicLib(dict)
195 if loadlib_return_code == 1:
198 f
"Failed to load dictionary library {dict} (return code {loadlib_return_code})"
207 Function to retrieve a certain C++ class by name and to load dictionary if requested
211 from gaudimodule import getClass
212 # one knows that class is already loaded
213 AppMgr = getClass( 'ApplicationMgr' )
214 # one knows where to look for class, if not loaded yet
215 MCParticle = getClass( 'MCParticle' , 'EventDict' )
216 # one knows where to look for class, if not loaded yet
217 Vertex = getClass( 'Vertex' , ['EventDict', 'PhysEventDict'] )
220 if hasattr(gbl, name):
221 return getattr(gbl, name)
223 if type(libs)
is not list:
227 if hasattr(gbl, name):
228 return getattr(gbl, name)
237 """holds the value and the documentation string of a property"""
243 if issubclass(
type(prop), GaudiHandleProperty):
245 elif issubclass(
type(prop), GaudiHandleArrayProperty):
246 self.
_value = prop.value()
250 self.
_value = eval(prop.toString(), {}, {})
252 if hasattr(prop,
"value"):
253 self.
_value = prop.value()
255 self.
_value = prop.toString()
257 self.
__doc__ +=
" --- Default value = " + str(self.
_value) +
" --- "
258 if prop.documentation() !=
"none":
270 "Return the underlying property itself"
284 """Python equivalent to the C++ Property interface"""
288 self.__dict__[
"_svcloc"] = gbl.Gaudi.svcLocator()
289 self.__dict__[
"_name"] = name
300 if not getattr(self, ifname):
301 self.retrieveInterface()
302 return getattr(getattr(self, ifname), method)(*args)
306 The method which is used for setting the property from the given value.
307 - In the case of the valid instance it sets the property through IProperty interface
308 - In the case of placeholder the property is added to JobOptionsCatalogue
310 if hasattr(value,
"toStringProperty"):
312 value = str(value.toStringProperty())
313 elif hasattr(value,
"toString"):
314 value = str(value.toString())
320 if not gbl.Gaudi.Utils.hasProperty(ip, name):
321 raise AttributeError(
"property %s does not exist" % name)
322 ip.setPropertyRepr(name, value)
324 gbl.GaudiPython.Helpers.setProperty(
325 self._svcloc,
".".join([self._name, name]), value
330 The method which returns the value for the given property
331 - In the case of the valid instance it returns the valid property value through IProperty interface
332 - In the case of placeholder the property value is retrieved from JobOptionsCatalogue
336 if not gbl.Gaudi.Utils.hasProperty(ip, name):
337 raise AttributeError(
"property %s does not exist" % name)
338 prop = ip.getProperty(name)
339 if StringProperty ==
type(prop):
341 elif StringPropertyRef ==
type(prop):
344 return eval(prop.toString(), {}, {})
348 opts = self._svcloc.getOptsSvc()
349 if opts.has(
"{}.{}".
format(self._name, name)):
351 return eval(opts.get(
"{}.{}".
format(self._name, name)), {}, {})
352 raise AttributeError(
"property %s does not exist" % name)
359 props = ip.getProperties()
360 propsFrom = self._name
362 raise NotImplementedError(
"rely on IJobOptionsSvc")
363 props = self._optsvc.getProperties(self._name)
364 propsFrom =
"jobOptionsSvc"
369 except (ValueError, TypeError)
as e:
371 "gaudimodule.iProperty.properties(): %s%s processing property %s.%s = %s"
372 % (e.__class__.__name__, e.args, propsFrom, p.name(), p.value())
384 """Python equivalent to IProperty interface"""
387 iProperty.__init__(self, name, isvc)
391 isvc = Helper.service(self._svcloc, self._name)
393 iService.__init__(self, self._name, isvc)
424 """Python equivalent to IAlgorithm interface"""
427 iProperty.__init__(self, name, ialg)
431 ialg = Helper.algorithm(
435 iAlgorithm.__init__(self, self._name, ialg)
484 """Python equivalent to IAlgTool interface (not completed yet)"""
487 iProperty.__init__(self, name, itool)
488 self.__dict__[
"_itool"] = itool
489 svc = Helper.service(self._svcloc,
"ToolSvc",
True)
490 self.__dict__[
"_toolsvc"] =
iToolSvc(
"ToolSvc", svc)
493 itool = self._toolsvc._retrieve(self._name)
495 iAlgTool.__init__(self, self._name, itool)
508 return self._itool.
name()
518 iService.__init__(self, name, idp)
519 self.__dict__[
"_idp"] =
InterfaceCast(gbl.IDataProviderSvc)(idp)
520 self.__dict__[
"_idm"] =
InterfaceCast(gbl.IDataManagerSvc)(idp)
524 raise AttributeError(
525 "C++ service %s does not exist" % self.__dict__[
"_name"]
527 return Helper.registerObject(self._idp, path, obj)
531 raise AttributeError(
532 "C++ service %s does not exist" % self.__dict__[
"_name"]
534 return Helper.unregisterObject(self._idp, path)
539 return Helper.dataobject(self._idp, path)
546 Get the existing object in TransientStore for the given location
548 - loading of object from persistency is NOT triggered
549 - 'data-on-demand' action is NOT triggered
551 >>> svc = ... ## get the service
552 >>> path = ... ## get the path in Transient Store
553 >>> data = svc.findObject ( path ) ## use the method
557 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
558 return Helper.findobject(self._idp, path)
563 Get object from Transient Store for the given location
566 - path : Location of object in Transient Store
567 - retrieve (bool) True : retrieve versus find
568 - disable on-demand (bool) False : temporary disable 'on-demand' actions
570 >>> svc = ... ## get the service
571 >>> path = ... ## get the path
573 >>> data = svc.getObject ( path , False ) ## find object in Transient Store
575 ## find object in Transient Store
576 # load form tape or use 'on-demand' action for missing objects :
577 >>> data = svc.getObject ( path , True )
579 ## find object in Transient Store
580 # load from tape or for missing objects, disable 'on-demand'-actions
581 >>> data = svc.getObject ( path , True , True )
585 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
586 return Helper.getobject(self._idp, path, *args)
590 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
591 return Helper.dataobject(self._idp, path)
595 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
600 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
604 if node == cppyy.nullptr:
606 ll = gbl.std.vector(
"IRegistry*")()
607 if isinstance(node, str):
609 if self._idm.objectLeaves(node, ll).isSuccess():
612 def dump(self, node=cppyy.nullptr):
613 if node == cppyy.nullptr:
616 node = root.registry()
619 print(node.identifier())
621 for l
in self.
leaves(node):
624 def getList(self, node=cppyy.nullptr, lst=[], rootFID=None):
625 if node == cppyy.nullptr:
628 node = root.registry()
629 rootFID = node.address().
par()
633 Helper.dataobject(self._idp, node.identifier())
635 lst.append(node.identifier())
636 for l
in self.
leaves(node):
637 if l.address()
and l.address().
par() == rootFID:
644 if node == cppyy.nullptr:
647 node = root.registry()
652 Helper.dataobject(self._idp, node.identifier())
654 lst.append(node.identifier())
655 for l
in self.
leaves(node):
664 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
665 return self._idm.
setRoot(name, obj)
669 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
676 self.__dict__[
"_ihs"] =
InterfaceCast(gbl.IHistogramSvc)(ihs)
677 iDataSvc.__init__(self, name, ihs)
680 return Helper.histo1D(self._ihs, path)
683 return Helper.histo2D(self._ihs, path)
686 return Helper.histo3D(self._ihs, path)
689 return Helper.profile1D(self._ihs, path)
692 return Helper.profile2D(self._ihs, path)
696 Retrieve AIDA histogram or AIDA profile histogram by path in Histogram Transient Store
698 >>> histo = svc.retrieve ( 'path/to/my/histogram' )
713 Book the histograms(1D,2D&3D) , see IHistogramSvc::book
715 >>> histo = svc.book( .... )
717 return self._ihs.
book(*args)
721 Book the profile(1D&2D) histograms, see IHistogramSvc::bookProf
723 >>> histo = svc.bookProf( .... )
729 Retrieve the object from Histogram Transient Store (by path)
730 The reference to AIDA histogram is returned (if possible)
732 >>> histo = svc['path/to/my/histogram']
737 return iDataSvc.__getitem__(self, path)
741 Retrieve the histogram from Histogram Transient Store (by path)
742 The reference to AIDA histogram is returned (if possible)
744 >>> histo = svc.getAsAIDA ( 'path/to/my/histogram' )
750 Retrieve the histogram from Histogram Transient Store (by path)
751 The Underlying native ROOT object is returned (if possible)
753 >>> histo = svc.getAsROOT ( 'path/to/my/histogram' )
755 fun = gbl.Gaudi.Utils.Aida2ROOT.aida2root
768 iDataSvc.__init__(self, name, ints)
771 return self._ints.
book(*args)
774 """Defines the mapping between logical names and the output file
776 defineOutput({'LUN1':'MyFile1.root', 'LUN2':'Myfile2.root'}, svc='Gaudi::RootCnvSvc')
778 from .
import Persistency
as prs
780 helper = prs.get(typ)
781 helper.configure(
AppMgr())
782 self.
Output = [helper.formatOutput(files[lun], lun=lun)
for lun
in files]
783 if AppMgr().HistogramPersistency ==
"NONE":
784 AppMgr().HistogramPersistency =
"ROOT"
787 return iDataSvc.__getitem__(self, path)
794 iService.__init__(self, name, its)
797 sol = _gaudi.OutputLevel
800 if name.rfind(
".") == -1:
801 itool = Helper.tool(self._its,
"", name, nullptr,
False)
802 elif name[0:8] ==
"ToolSvc.":
803 itool = Helper.tool(self._its,
"", name[8:], nullptr,
False)
804 elif name.count(
".") > 1:
805 ptool = self.
_retrieve(name[: name.rfind(
".")])
807 self._its,
"", name[name.rfind(
".") + 1 :], ptool,
False
810 prop = _gaudi.property(name[: name.rfind(
".")])
812 self._its,
"", name[name.rfind(
".") + 1 :], prop._ip,
False
821 def create(self, typ, name=None, parent=nullptr, interface=None):
824 itool = Helper.tool(self._its, typ, name, parent,
True)
831 if type(itool)
is iAlgTool:
832 self._its.releaseTool(itool._itool)
843 Helper.service(gbl.Gaudi.svcLocator(),
"EventSelector"),
845 self.__dict__[
"g"] =
AppMgr()
847 def open(self, stream, typ="Gaudi::RootCnvSvc
", **kwargs):
848 from .
import Persistency
as prs
850 helper = prs.get(typ)
851 helper.configure(self.g)
852 self.
Input = helper.formatInput(stream, **kwargs)
867 newobj = object.__new__(cls)
868 cls.
__init__(newobj, *args, **kwargs)
900 self.__dict__[
"_exit_called"] =
False
902 self.__dict__[
"_gaudi_ns"] = Gaudi
904 from GaudiKernel.Proxy.Configurable
import expandvars
910 if dllname
and factname:
911 self.__dict__[
"_appmgr"] = gbl.Gaudi.createApplicationMgr(dllname, factname)
913 self.__dict__[
"_appmgr"] = gbl.Gaudi.createApplicationMgr(dllname)
915 self.__dict__[
"_appmgr"] = gbl.Gaudi.createApplicationMgr()
916 self.__dict__[
"_svcloc"] = gbl.Gaudi.svcLocator()
918 self.__dict__[
"_evtpro"] =
InterfaceCast(gbl.IEventProcessor)(self._appmgr)
919 self.__dict__[
"_svcmgr"] =
InterfaceCast(gbl.ISvcManager)(self._appmgr)
920 self.__dict__[
"pyalgorithms"] = []
921 iService.__init__(self,
"ApplicationMgr", self._appmgr)
923 if self.
FSMState() < Gaudi.StateMachine.CONFIGURED:
930 import GaudiKernel.Proxy.Configurable
932 if hasattr(GaudiKernel.Proxy.Configurable,
"applyConfigurableUsers"):
933 GaudiKernel.Proxy.Configurable.applyConfigurableUsers()
937 appMgr = Configurable.allConfigurables[
"ApplicationMgr"]
938 selfprops =
expandvars(appMgr.getValuedProperties())
941 for p, v
in selfprops.items():
943 for p, v
in selfoptions.items():
946 if outputlevel != -1:
950 ms = self.
service(
"MessageSvc")
951 if "MessageSvc" in Configurable.allConfigurables:
952 msprops = Configurable.allConfigurables[
"MessageSvc"]
953 ms = self.
service(
"MessageSvc")
954 if hasattr(msprops,
"getValuedProperties"):
955 msprops =
expandvars(msprops.getValuedProperties())
956 for p, v
in msprops.items():
958 if outputlevel != -1:
959 ms.OutputLevel = outputlevel
962 c = Configurable.allConfigurables[n]
963 if n
in [
"ApplicationMgr",
"MessageSvc"]:
965 for p, v
in c.getValuedProperties().
items():
968 if hasattr(Configurable,
"PropertyReference")
and isinstance(
969 v, Configurable.PropertyReference
974 if isinstance(v, str):
976 gbl.GaudiPython.Helpers.setProperty(
977 self._svcloc,
".".join([n, p]), str(v)
979 if hasattr(Configurable,
"_configurationLocked"):
980 Configurable._configurationLocked =
True
985 atexit.register(self.
exit)
991 orig_register = atexit.register
993 def register(func, *targs, **kargs):
994 orig_register(func, *targs, **kargs)
995 if hasattr(func,
"__module__")
and func.__module__ ==
"ROOT":
996 orig_register(self.
exit)
1000 register.__doc__ = (
1001 orig_register.__doc__
1002 +
"\nNote: version hacked by GaudiPython to work "
1003 +
"around a problem with the ROOT exit handler"
1005 atexit.register = register
1009 if "_svcloc" in self.__dict__:
1010 return self._svcloc.getOptsSvc()
1023 svc = Helper.service(self._svcloc, name)
1030 self._svcmgr.declareSvcType(svcname, svctype)
1033 return Helper.service(self._svcloc, name,
True)
1036 l = self._svcloc.getServices()
1037 return [s.name()
for s
in l]
1040 alg = Helper.algorithm(self._algmgr, name, createIf)
1047 l = self._algmgr.getAlgorithms()
1048 return [a.name()
for a
in l]
1062 if self.
state() == Gaudi.StateMachine.CONFIGURED:
1064 svc = Helper.service(self._svcloc, name)
1068 return self.
datasvc(
"EventDataSvc")
1071 return self.
datasvc(
"DetectorDataSvc")
1074 return self.
datasvc(
"FileRecordDataSvc")
1077 if self.
state() == Gaudi.StateMachine.CONFIGURED:
1079 if not hasattr(self,
"_evtsel"):
1084 svc = Helper.service(self._svcloc, name)
1088 if name
not in self.ExtSvc:
1089 self.ExtSvc += [name]
1091 svc = Helper.service(self._svcloc, name,
True)
1095 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1097 svc = Helper.service(self._svcloc,
"ParticlePropertySvc")
1101 svc = Helper.service(self._svcloc, name,
True)
1108 """Add an Algorithm to the list of Top algorithms. It can be either a instance of
1109 an Algorithm class or it name"""
1110 if type(alg)
is str:
1113 self.pyalgorithms.append(alg)
1119 self.
topAlg += [alg.name()]
1122 """Set the list of Top Algorithms.
1123 It can be an individual of a list of algorithms names or instances"""
1124 if type(algs)
is not list:
1128 if type(alg)
is str:
1131 self.pyalgorithms.append(alg)
1136 names.append(alg.name())
1140 """Remove an Algorithm to the list of Top algorithms. It can be either a instance of
1141 an Algorithm class or it name"""
1143 if type(alg)
is str:
1146 tmp.remove(alg.name())
1147 self.pyalgorithms.remove(alg)
1153 Print the sequence of Algorithms.
1156 def printAlgo(algName, appMgr, prefix=" "):
1157 print(prefix + algName)
1158 alg = appMgr.algorithm(algName.split(
"/")[-1])
1159 prop = alg.properties()
1160 if "Members" in prop:
1161 subs = prop[
"Members"].value()
1163 printAlgo(i.strip(
'"'), appMgr, prefix +
" ")
1166 prefix =
"ApplicationMgr SUCCESS "
1169 +
"****************************** Algorithm Sequence ****************************"
1171 for i
in mp[
"TopAlg"].value():
1172 printAlgo(i, self, prefix)
1175 +
"******************************************************************************"
1180 Simple utility to perform the configuration of Gaudi application.
1181 It reads the set of input job-options files, and set few
1182 additional parameters 'options' through the usage of temporary *.opts file
1184 gaudi.config( files = [ '$GAUSSOPTS/Gauss.opts' ,
1185 '$DECFILESROOT/options/10022_010.0GeV.opts' ] ,
1186 options = [ 'EventSelector.PrintFreq = 5 ' ] )
1188 files = args.get(
"files", [])
1192 raise RuntimeError(
' Unable to read file "' + file +
'" ')
1193 options = args.get(
"options",
None)
1197 tmpfilename = tempfile.mktemp()
1198 tmpfile = open(tmpfilename,
"w")
1199 tmpfile.write(
"#pragma print on \n")
1201 '/// File "' + tmpfilename +
'" generated by GaudiPython \n\n'
1204 if type(options)
is dict:
1210 +
" ; // added by GaudiPython \n"
1213 tmpfile.write(
" \t " + opt +
" ; // added by GaudiPython \n")
1215 '/// End of file "' + tmpfilename +
'" generated by GaudiPython \n\n'
1220 raise RuntimeError(
' Unable to read file "' + tmpfilename +
'" ')
1221 os.remove(tmpfilename)
1229 return self._appmgr.
start()
1235 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1237 if sc.isFailure()
or self.ReturnCode != 0:
1239 if self.
FSMState() == Gaudi.StateMachine.INITIALIZED:
1241 if sc.isFailure()
or self.ReturnCode != 0:
1243 return self._evtpro.executeRun(n)
1252 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1256 if self.
FSMState() == Gaudi.StateMachine.INITIALIZED:
1261 if not hasattr(self,
"_perssvc"):
1262 self.__dict__[
"_perssvc"] = self.
service(
1263 "EventPersistencySvc",
"IAddressCreator"
1265 if not hasattr(self,
"_filecat"):
1266 self.__dict__[
"_filecat"] = self.
service(
1267 "FileCatalog",
"Gaudi::IFileCatalog"
1269 if not hasattr(self,
"_evtmgr"):
1270 self.__dict__[
"_evtmgr"] = self.
service(
"EventDataSvc",
"IDataManagerSvc")
1272 if pfn.find(
"PFN:") == 0:
1276 if not self._filecat.existsFID(fid):
1277 self._filecat.registerPFN(fid, pfn,
"")
1279 if type(events)
is not list:
1283 gadd = gbl.GenericAddress(0x02, 1, fid,
"/Event", 0, evt)
1285 self._perssvc.createAddress(
1286 gadd.svcType(), gadd.clID(), gadd.par(), gadd.ipar(), oadd
1289 self._evtmgr.clearStore()
1290 self._evtmgr.setRoot(
"/Event", oadd)
1295 if not self._exit_called:
1296 self.__dict__[
"_exit_called"] =
True
1297 Gaudi = self._gaudi_ns
1298 if self.
FSMState() == Gaudi.StateMachine.RUNNING:
1299 self._appmgr.
stop().ignore()
1300 if self.
FSMState() == Gaudi.StateMachine.INITIALIZED:
1302 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1313 ntupleSvc = ntuplesvc
1324 tfile = gbl.TFile.Open(pfn)
1326 raise IOError(
"Cannot open ROOT file {0}".
format(pfn))
1327 tree = tfile.Get(
"##Params")
1329 text = tree.db_string
1330 if "NAME=FID" in text:
1331 fid = text[text.rfind(
"VALUE=") + 6 : -1]
1332 nevt = tfile.Get(
"_Event").GetEntries()
1341 """Get all the properties of a component as a Python dictionary.
1342 The component is instantiated using the component library
1345 if name ==
"GaudiCoreSvc":
1346 if Helper.loadDynamicLib(name) != 1:
1347 raise ImportError(
"Error loading component library " + name)
1348 factorylist = gbl.FactoryTable.instance().getEntries()
1350 _ =
AppMgr(outputlevel=7)
1352 _ =
AppMgr(outputlevel=7)
1353 if Helper.loadDynamicLib(name) != 1:
1354 raise ImportError(
"Error loading component library " + name)
1355 factorylist = gbl.FactoryTable.instance().getEntries()
1357 svcloc = gbl.Gaudi.svcLocator()
1358 dummysvc = gbl.Service(
"DummySvc", svcloc)
1359 for factory
in factories:
1366 elif factory.ident() ==
"ApplicationMgr":
1367 ctype =
"ApplicationMgr"
1370 cname = factory.ident().split()[-1]
1371 if ctype
in (
"Algorithm",
"Service",
"AlgTool",
"ApplicationMgr"):
1373 if ctype ==
"AlgTool":
1374 obj = factory.instantiate(dummysvc)
1376 obj = factory.instantiate(svcloc)
1377 except RuntimeError
as text:
1378 print(
"Error instantiating", cname,
" from ", name)
1382 properties[cname] = [ctype, prop.properties()]
1392 for i
in range(factories.size()):
1393 factory = factories.front()
1394 result.append(factory)
1395 factories.pop_front()
1396 for factory
in result:
1397 factories.push_back(factory)
1403 _CallbackStreamBufBase = gbl.GaudiPython.CallbackStreamBuf
1408 _CallbackStreamBufBase.__init__(self, self)
1420 _PyAlgorithm = gbl.GaudiPython.PyAlgorithm
1426 name = self.__class__.__name__
1427 _PyAlgorithm.__init__(self, self, name)
1430 sc = self.
_algmgr.addAlgorithm(self)
1432 raise RuntimeError(
"Unable to add Algorithm")
1435 sc = self.
_algmgr.removeAlgorithm(self)
1460 readline.parse_and_bind(
"tab: complete")