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")
58 if sys.version_info >= (3,):
70 from GaudiKernel.Proxy.Configurable
import Configurable, getNeededConfigurables
72 from .
import Pythonizations
81 gbl.gInterpreter.Declare(
'#include "Gaudi/Property.h"')
82 Helper = gbl.GaudiPython.Helper
83 StringProperty = gbl.Gaudi.Property(
"std::string")
84 StringPropertyRef = gbl.Gaudi.Property(
"std::string&")
85 GaudiHandleProperty = gbl.GaudiHandleProperty
86 GaudiHandleArrayProperty = gbl.GaudiHandleArrayProperty
87 DataObject = gbl.DataObject
88 SUCCESS = gbl.StatusCode(gbl.StatusCode.SUCCESS)
89 FAILURE = gbl.StatusCode(gbl.StatusCode.FAILURE)
91 if hasattr(cppyy,
"nullptr"):
92 nullptr = cppyy.nullptr
93 elif hasattr(gbl,
"nullptr"):
98 cppyy.gbl.gInterpreter.Declare(
101 namespace GaudiPython { namespace Helpers {
102 void setProperty(ISvcLocator* svcLoc, std::string key, std::string value) {
103 if ( !svcLoc ) throw std::runtime_error( "invalid ISvcLocator pointer" );
104 svcLoc->getOptsSvc().set(key, value);
111 for l
in [l
for l
in dir(Helper)
if re.match(
"^to.*Array$", l)]:
112 exec(
"%s = Helper.%s" % (l, l))
116 if hasattr(Helper,
"toArray"):
120 return getattr(Helper,
"toArray")
125 return getattr(Helper,
"toArray<%s>" % typ)
130 if hasattr(cppyy,
"libPyROOT"):
131 ROOT = cppyy.libPyROOT
134 makeNullPointer = ROOT.MakeNullPointer
135 setOwnership = ROOT.SetOwnership
139 warnings.warn(
"GaudiPython: " + message, DeprecationWarning, stacklevel=3)
146 """Helper class to obtain the adequate interface from a component
147 by using the Gaudi queryInterface() mechanism"""
158 if obj.queryInterface(self.
type.interfaceID(), ip).isSuccess():
162 "ERROR: queryInterface failed for", obj,
"interface:", self.
type
164 except Exception
as e:
168 "caught when retrieving interface",
175 traceback.print_stack()
187 InterfaceCast.__init__(self, t)
197 """Load an LCG dictionary"""
198 loadlib_return_code = Helper.loadDynamicLib(dict)
199 if loadlib_return_code == 1:
202 f
"Failed to load dictionary library {dict} (return code {loadlib_return_code})"
211 Function to retrieve a certain C++ class by name and to load dictionary if requested
215 from gaudimodule import getClass
216 # one knows that class is already loaded
217 AppMgr = getClass( 'ApplicationMgr' )
218 # one knows where to look for class, if not loaded yet
219 MCParticle = getClass( 'MCParticle' , 'EventDict' )
220 # one knows where to look for class, if not loaded yet
221 Vertex = getClass( 'Vertex' , ['EventDict', 'PhysEventDict'] )
224 if hasattr(gbl, name):
225 return getattr(gbl, name)
227 if type(libs)
is not list:
231 if hasattr(gbl, name):
232 return getattr(gbl, name)
241 """holds the value and the documentation string of a property"""
247 if issubclass(
type(prop), GaudiHandleProperty):
249 elif issubclass(
type(prop), GaudiHandleArrayProperty):
250 self.
_value = prop.value()
254 self.
_value = eval(prop.toString(), {}, {})
256 if hasattr(prop,
"value"):
257 self.
_value = prop.value()
259 self.
_value = prop.toString()
261 self.
__doc__ +=
" --- Default value = " + str(self.
_value) +
" --- "
262 if prop.documentation() !=
"none":
274 "Return the underlying property itself"
288 """Python equivalent to the C++ Property interface"""
292 self.__dict__[
"_svcloc"] = gbl.Gaudi.svcLocator()
293 self.__dict__[
"_name"] = name
304 if not getattr(self, ifname):
305 self.retrieveInterface()
306 return getattr(getattr(self, ifname), method)(*args)
310 The method which is used for setting the property from the given value.
311 - In the case of the valid instance it sets the property through IProperty interface
312 - In the case of placeholder the property is added to JobOptionsCatalogue
314 if hasattr(value,
"toStringProperty"):
316 value = str(value.toStringProperty())
317 elif hasattr(value,
"toString"):
318 value = str(value.toString())
319 elif type(value) == long:
326 if not gbl.Gaudi.Utils.hasProperty(ip, name):
327 raise AttributeError(
"property %s does not exist" % name)
328 ip.setPropertyRepr(name, value)
330 gbl.GaudiPython.Helpers.setProperty(
331 self._svcloc,
".".join([self._name, name]), value
336 The method which returns the value for the given property
337 - In the case of the valid instance it returns the valid property value through IProperty interface
338 - In the case of placeholder the property value is retrieved from JobOptionsCatalogue
342 if not gbl.Gaudi.Utils.hasProperty(ip, name):
343 raise AttributeError(
"property %s does not exist" % name)
344 prop = ip.getProperty(name)
345 if StringProperty ==
type(prop):
347 elif StringPropertyRef ==
type(prop):
350 return eval(prop.toString(), {}, {})
354 opts = self._svcloc.getOptsSvc()
355 if opts.has(
"{}.{}".
format(self._name, name)):
357 return eval(opts.get(
"{}.{}".
format(self._name, name)), {}, {})
358 raise AttributeError(
"property %s does not exist" % name)
365 props = ip.getProperties()
366 propsFrom = self._name
368 raise NotImplementedError(
"rely on IJobOptionsSvc")
369 props = self._optsvc.getProperties(self._name)
370 propsFrom =
"jobOptionsSvc"
375 except (ValueError, TypeError)
as e:
377 "gaudimodule.iProperty.properties(): %s%s processing property %s.%s = %s"
378 % (e.__class__.__name__, e.args, propsFrom, p.name(), p.value())
390 """Python equivalent to IProperty interface"""
393 iProperty.__init__(self, name, isvc)
397 isvc = Helper.service(self._svcloc, self._name)
399 iService.__init__(self, self._name, isvc)
430 """Python equivalent to IAlgorithm interface"""
433 iProperty.__init__(self, name, ialg)
437 ialg = Helper.algorithm(
441 iAlgorithm.__init__(self, self._name, ialg)
490 """Python equivalent to IAlgTool interface (not completed yet)"""
493 iProperty.__init__(self, name, itool)
494 self.__dict__[
"_itool"] = itool
495 svc = Helper.service(self._svcloc,
"ToolSvc",
True)
496 self.__dict__[
"_toolsvc"] =
iToolSvc(
"ToolSvc", svc)
499 itool = self._toolsvc._retrieve(self._name)
501 iAlgTool.__init__(self, self._name, itool)
514 return self._itool.
name()
524 iService.__init__(self, name, idp)
525 self.__dict__[
"_idp"] =
InterfaceCast(gbl.IDataProviderSvc)(idp)
526 self.__dict__[
"_idm"] =
InterfaceCast(gbl.IDataManagerSvc)(idp)
530 raise AttributeError(
531 "C++ service %s does not exist" % self.__dict__[
"_name"]
533 return Helper.registerObject(self._idp, path, obj)
537 raise AttributeError(
538 "C++ service %s does not exist" % self.__dict__[
"_name"]
540 return Helper.unregisterObject(self._idp, path)
545 return Helper.dataobject(self._idp, path)
552 Get the existing object in TransientStore for the given location
554 - loading of object from persistency is NOT triggered
555 - 'data-on-demand' action is NOT triggered
557 >>> svc = ... ## get the service
558 >>> path = ... ## get the path in Transient Store
559 >>> data = svc.findObject ( path ) ## use the method
563 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
564 return Helper.findobject(self._idp, path)
569 Get object from Transient Store for the given location
572 - path : Location of object in Transient Store
573 - retrieve (bool) True : retrieve versus find
574 - disable on-demand (bool) False : temporary disable 'on-demand' actions
576 >>> svc = ... ## get the service
577 >>> path = ... ## get the path
579 >>> data = svc.getObject ( path , False ) ## find object in Transient Store
581 ## find object in Transient Store
582 # load form tape or use 'on-demand' action for missing objects :
583 >>> data = svc.getObject ( path , True )
585 ## find object in Transient Store
586 # load from tape or for missing objects, disable 'on-demand'-actions
587 >>> data = svc.getObject ( path , True , True )
591 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
592 return Helper.getobject(self._idp, path, *args)
596 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
597 return Helper.dataobject(self._idp, path)
601 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
606 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
610 if node == cppyy.nullptr:
612 ll = gbl.std.vector(
"IRegistry*")()
613 if isinstance(node, str):
615 if self._idm.objectLeaves(node, ll).isSuccess():
618 def dump(self, node=cppyy.nullptr):
619 if node == cppyy.nullptr:
622 node = root.registry()
625 print(node.identifier())
627 for l
in self.
leaves(node):
630 def getList(self, node=cppyy.nullptr, lst=[], rootFID=None):
631 if node == cppyy.nullptr:
634 node = root.registry()
635 rootFID = node.address().
par()
639 Helper.dataobject(self._idp, node.identifier())
641 lst.append(node.identifier())
642 for l
in self.
leaves(node):
643 if l.address()
and l.address().
par() == rootFID:
650 if node == cppyy.nullptr:
653 node = root.registry()
658 Helper.dataobject(self._idp, node.identifier())
660 lst.append(node.identifier())
661 for l
in self.
leaves(node):
670 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
671 return self._idm.
setRoot(name, obj)
675 raise IndexError(
"C++ service %s does not exist" % self.__dict__[
"_name"])
682 self.__dict__[
"_ihs"] =
InterfaceCast(gbl.IHistogramSvc)(ihs)
683 iDataSvc.__init__(self, name, ihs)
686 return Helper.histo1D(self._ihs, path)
689 return Helper.histo2D(self._ihs, path)
692 return Helper.histo3D(self._ihs, path)
695 return Helper.profile1D(self._ihs, path)
698 return Helper.profile2D(self._ihs, path)
702 Retrieve AIDA histogram or AIDA profile histogram by path in Histogram Transient Store
704 >>> histo = svc.retrieve ( 'path/to/my/histogram' )
719 Book the histograms(1D,2D&3D) , see IHistogramSvc::book
721 >>> histo = svc.book( .... )
723 return self._ihs.
book(*args)
727 Book the profile(1D&2D) histograms, see IHistogramSvc::bookProf
729 >>> histo = svc.bookProf( .... )
735 Retrieve the object from Histogram Transient Store (by path)
736 The reference to AIDA histogram is returned (if possible)
738 >>> histo = svc['path/to/my/histogram']
743 return iDataSvc.__getitem__(self, path)
747 Retrieve the histogram from Histogram Transient Store (by path)
748 The reference to AIDA histogram is returned (if possible)
750 >>> histo = svc.getAsAIDA ( 'path/to/my/histogram' )
756 Retrieve the histogram from Histogram Transient Store (by path)
757 The Underlying native ROOT object is returned (if possible)
759 >>> histo = svc.getAsROOT ( 'path/to/my/histogram' )
761 fun = gbl.Gaudi.Utils.Aida2ROOT.aida2root
774 iDataSvc.__init__(self, name, ints)
777 return self._ints.
book(*args)
780 """Defines the mapping between logical names and the output file
782 defineOutput({'LUN1':'MyFile1.root', 'LUN2':'Myfile2.root'}, svc='Gaudi::RootCnvSvc')
784 from .
import Persistency
as prs
786 helper = prs.get(typ)
787 helper.configure(
AppMgr())
788 self.
Output = [helper.formatOutput(files[lun], lun=lun)
for lun
in files]
789 if AppMgr().HistogramPersistency ==
"NONE":
790 AppMgr().HistogramPersistency =
"ROOT"
793 return iDataSvc.__getitem__(self, path)
800 iService.__init__(self, name, its)
803 sol = _gaudi.OutputLevel
806 if name.rfind(
".") == -1:
807 itool = Helper.tool(self._its,
"", name, nullptr,
False)
808 elif name[0:8] ==
"ToolSvc.":
809 itool = Helper.tool(self._its,
"", name[8:], nullptr,
False)
810 elif name.count(
".") > 1:
811 ptool = self.
_retrieve(name[: name.rfind(
".")])
813 self._its,
"", name[name.rfind(
".") + 1 :], ptool,
False
816 prop = _gaudi.property(name[: name.rfind(
".")])
818 self._its,
"", name[name.rfind(
".") + 1 :], prop._ip,
False
827 def create(self, typ, name=None, parent=nullptr, interface=None):
830 itool = Helper.tool(self._its, typ, name, parent,
True)
837 if type(itool)
is iAlgTool:
838 self._its.releaseTool(itool._itool)
849 Helper.service(gbl.Gaudi.svcLocator(),
"EventSelector"),
851 self.__dict__[
"g"] =
AppMgr()
853 def open(self, stream, typ="Gaudi::RootCnvSvc
", **kwargs):
854 from .
import Persistency
as prs
856 helper = prs.get(typ)
857 helper.configure(self.g)
858 self.
Input = helper.formatInput(stream, **kwargs)
873 newobj = object.__new__(cls)
874 cls.
__init__(newobj, *args, **kwargs)
906 self.__dict__[
"_exit_called"] =
False
908 self.__dict__[
"_gaudi_ns"] = Gaudi
910 from GaudiKernel.Proxy.Configurable
import expandvars
916 if dllname
and factname:
917 self.__dict__[
"_appmgr"] = gbl.Gaudi.createApplicationMgr(dllname, factname)
919 self.__dict__[
"_appmgr"] = gbl.Gaudi.createApplicationMgr(dllname)
921 self.__dict__[
"_appmgr"] = gbl.Gaudi.createApplicationMgr()
922 self.__dict__[
"_svcloc"] = gbl.Gaudi.svcLocator()
924 self.__dict__[
"_evtpro"] =
InterfaceCast(gbl.IEventProcessor)(self._appmgr)
925 self.__dict__[
"_svcmgr"] =
InterfaceCast(gbl.ISvcManager)(self._appmgr)
926 self.__dict__[
"pyalgorithms"] = []
927 iService.__init__(self,
"ApplicationMgr", self._appmgr)
929 if self.
FSMState() < Gaudi.StateMachine.CONFIGURED:
936 import GaudiKernel.Proxy.Configurable
938 if hasattr(GaudiKernel.Proxy.Configurable,
"applyConfigurableUsers"):
939 GaudiKernel.Proxy.Configurable.applyConfigurableUsers()
943 appMgr = Configurable.allConfigurables[
"ApplicationMgr"]
944 selfprops =
expandvars(appMgr.getValuedProperties())
947 for p, v
in selfprops.items():
949 for p, v
in selfoptions.items():
952 if outputlevel != -1:
956 ms = self.
service(
"MessageSvc")
957 if "MessageSvc" in Configurable.allConfigurables:
958 msprops = Configurable.allConfigurables[
"MessageSvc"]
959 ms = self.
service(
"MessageSvc")
960 if hasattr(msprops,
"getValuedProperties"):
961 msprops =
expandvars(msprops.getValuedProperties())
962 for p, v
in msprops.items():
964 if outputlevel != -1:
965 ms.OutputLevel = outputlevel
968 c = Configurable.allConfigurables[n]
969 if n
in [
"ApplicationMgr",
"MessageSvc"]:
971 for p, v
in c.getValuedProperties().
items():
975 hasattr(Configurable,
"PropertyReference")
976 and type(v) == Configurable.PropertyReference
985 gbl.GaudiPython.Helpers.setProperty(
986 self._svcloc,
".".join([n, p]), str(v)
988 if hasattr(Configurable,
"_configurationLocked"):
989 Configurable._configurationLocked =
True
994 atexit.register(self.
exit)
1000 orig_register = atexit.register
1002 def register(func, *targs, **kargs):
1003 orig_register(func, *targs, **kargs)
1004 if hasattr(func,
"__module__")
and func.__module__ ==
"ROOT":
1005 orig_register(self.
exit)
1009 register.__doc__ = (
1010 orig_register.__doc__
1011 +
"\nNote: version hacked by GaudiPython to work "
1012 +
"around a problem with the ROOT exit handler"
1014 atexit.register = register
1018 if "_svcloc" in self.__dict__:
1019 return self._svcloc.getOptsSvc()
1032 svc = Helper.service(self._svcloc, name)
1039 self._svcmgr.declareSvcType(svcname, svctype)
1042 return Helper.service(self._svcloc, name,
True)
1045 l = self._svcloc.getServices()
1046 return [s.name()
for s
in l]
1049 alg = Helper.algorithm(self._algmgr, name, createIf)
1056 l = self._algmgr.getAlgorithms()
1057 return [a.name()
for a
in l]
1071 if self.
state() == Gaudi.StateMachine.CONFIGURED:
1073 svc = Helper.service(self._svcloc, name)
1077 return self.
datasvc(
"EventDataSvc")
1080 return self.
datasvc(
"DetectorDataSvc")
1083 return self.
datasvc(
"FileRecordDataSvc")
1086 if self.
state() == Gaudi.StateMachine.CONFIGURED:
1088 if not hasattr(self,
"_evtsel"):
1093 svc = Helper.service(self._svcloc, name)
1097 if name
not in self.ExtSvc:
1098 self.ExtSvc += [name]
1100 svc = Helper.service(self._svcloc, name,
True)
1104 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1106 svc = Helper.service(self._svcloc,
"ParticlePropertySvc")
1110 svc = Helper.service(self._svcloc, name,
True)
1117 """Add an Algorithm to the list of Top algorithms. It can be either a instance of
1118 an Algorithm class or it name"""
1119 if type(alg)
is str:
1122 self.pyalgorithms.append(alg)
1128 self.
topAlg += [alg.name()]
1131 """Set the list of Top Algorithms.
1132 It can be an individual of a list of algorithms names or instances"""
1133 if type(algs)
is not list:
1137 if type(alg)
is str:
1140 self.pyalgorithms.append(alg)
1145 names.append(alg.name())
1149 """Remove an Algorithm to the list of Top algorithms. It can be either a instance of
1150 an Algorithm class or it name"""
1152 if type(alg)
is str:
1155 tmp.remove(alg.name())
1156 self.pyalgorithms.remove(alg)
1162 Print the sequence of Algorithms.
1165 def printAlgo(algName, appMgr, prefix=" "):
1166 print(prefix + algName)
1167 alg = appMgr.algorithm(algName.split(
"/")[-1])
1168 prop = alg.properties()
1169 if "Members" in prop:
1170 subs = prop[
"Members"].value()
1172 printAlgo(i.strip(
'"'), appMgr, prefix +
" ")
1175 prefix =
"ApplicationMgr SUCCESS "
1178 +
"****************************** Algorithm Sequence ****************************"
1180 for i
in mp[
"TopAlg"].value():
1181 printAlgo(i, self, prefix)
1184 +
"******************************************************************************"
1189 Simple utility to perform the configuration of Gaudi application.
1190 It reads the set of input job-options files, and set few
1191 additional parameters 'options' through the usage of temporary *.opts file
1193 gaudi.config( files = [ '$GAUSSOPTS/Gauss.opts' ,
1194 '$DECFILESROOT/options/10022_010.0GeV.opts' ] ,
1195 options = [ 'EventSelector.PrintFreq = 5 ' ] )
1197 files = args.get(
"files", [])
1201 raise RuntimeError(
' Unable to read file "' + file +
'" ')
1202 options = args.get(
"options",
None)
1206 tmpfilename = tempfile.mktemp()
1207 tmpfile = open(tmpfilename,
"w")
1208 tmpfile.write(
"#pragma print on \n")
1210 '/// File "' + tmpfilename +
'" generated by GaudiPython \n\n'
1213 if type(options)
is dict:
1219 +
" ; // added by GaudiPython \n"
1222 tmpfile.write(
" \t " + opt +
" ; // added by GaudiPython \n")
1224 '/// End of file "' + tmpfilename +
'" generated by GaudiPython \n\n'
1229 raise RuntimeError(
' Unable to read file "' + tmpfilename +
'" ')
1230 os.remove(tmpfilename)
1238 return self._appmgr.
start()
1244 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1246 if sc.isFailure()
or self.ReturnCode != 0:
1248 if self.
FSMState() == Gaudi.StateMachine.INITIALIZED:
1250 if sc.isFailure()
or self.ReturnCode != 0:
1252 return self._evtpro.executeRun(n)
1261 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1265 if self.
FSMState() == Gaudi.StateMachine.INITIALIZED:
1270 if not hasattr(self,
"_perssvc"):
1271 self.__dict__[
"_perssvc"] = self.
service(
1272 "EventPersistencySvc",
"IAddressCreator"
1274 if not hasattr(self,
"_filecat"):
1275 self.__dict__[
"_filecat"] = self.
service(
1276 "FileCatalog",
"Gaudi::IFileCatalog"
1278 if not hasattr(self,
"_evtmgr"):
1279 self.__dict__[
"_evtmgr"] = self.
service(
"EventDataSvc",
"IDataManagerSvc")
1281 if pfn.find(
"PFN:") == 0:
1285 if not self._filecat.existsFID(fid):
1286 self._filecat.registerPFN(fid, pfn,
"")
1288 if type(events)
is not list:
1292 gadd = gbl.GenericAddress(0x02, 1, fid,
"/Event", 0, evt)
1294 self._perssvc.createAddress(
1295 gadd.svcType(), gadd.clID(), gadd.par(), gadd.ipar(), oadd
1298 self._evtmgr.clearStore()
1299 self._evtmgr.setRoot(
"/Event", oadd)
1304 if not self._exit_called:
1305 self.__dict__[
"_exit_called"] =
True
1306 Gaudi = self._gaudi_ns
1307 if self.
FSMState() == Gaudi.StateMachine.RUNNING:
1308 self._appmgr.
stop().ignore()
1309 if self.
FSMState() == Gaudi.StateMachine.INITIALIZED:
1311 if self.
FSMState() == Gaudi.StateMachine.CONFIGURED:
1322 ntupleSvc = ntuplesvc
1333 tfile = gbl.TFile.Open(pfn)
1335 raise IOError(
"Cannot open ROOT file {0}".
format(pfn))
1336 tree = tfile.Get(
"##Params")
1338 text = tree.db_string
1339 if "NAME=FID" in text:
1340 fid = text[text.rfind(
"VALUE=") + 6 : -1]
1341 nevt = tfile.Get(
"_Event").GetEntries()
1350 """Get all the properties of a component as a Python dictionary.
1351 The component is instantiated using the component library
1354 if name ==
"GaudiCoreSvc":
1355 if Helper.loadDynamicLib(name) != 1:
1356 raise ImportError(
"Error loading component library " + name)
1357 factorylist = gbl.FactoryTable.instance().getEntries()
1359 _ =
AppMgr(outputlevel=7)
1361 _ =
AppMgr(outputlevel=7)
1362 if Helper.loadDynamicLib(name) != 1:
1363 raise ImportError(
"Error loading component library " + name)
1364 factorylist = gbl.FactoryTable.instance().getEntries()
1366 svcloc = gbl.Gaudi.svcLocator()
1367 dummysvc = gbl.Service(
"DummySvc", svcloc)
1368 for factory
in factories:
1375 elif factory.ident() ==
"ApplicationMgr":
1376 ctype =
"ApplicationMgr"
1379 cname = factory.ident().split()[-1]
1380 if ctype
in (
"Algorithm",
"Service",
"AlgTool",
"ApplicationMgr"):
1382 if ctype ==
"AlgTool":
1383 obj = factory.instantiate(dummysvc)
1385 obj = factory.instantiate(svcloc)
1386 except RuntimeError
as text:
1387 print(
"Error instantiating", cname,
" from ", name)
1391 properties[cname] = [ctype, prop.properties()]
1401 for i
in range(factories.size()):
1402 factory = factories.front()
1403 result.append(factory)
1404 factories.pop_front()
1405 for factory
in result:
1406 factories.push_back(factory)
1412 _CallbackStreamBufBase = gbl.GaudiPython.CallbackStreamBuf
1417 _CallbackStreamBufBase.__init__(self, self)
1429 _PyAlgorithm = gbl.GaudiPython.PyAlgorithm
1435 name = self.__class__.__name__
1436 _PyAlgorithm.__init__(self, self, name)
1439 sc = self.
_algmgr.addAlgorithm(self)
1441 raise RuntimeError(
"Unable to add Algorithm")
1444 sc = self.
_algmgr.removeAlgorithm(self)
1469 readline.parse_and_bind(
"tab: complete")