Commits

Anonymous committed a0ee015

small fixes to get package provenance right

Comments (0)

Files changed (4)

AthenaPython/AthenaPythonDict.h

 // -*- C++ -*-
+#ifndef ATHENAPYTHON_ATHENAPYTHONDICT_H
+#define ATHENAPYTHON_ATHENAPYTHONDICT_H
 
 // Python includes
 #include "Python.h"
 //     //
 //   };
 // }
+
+#endif // ATHENAPYTHON_ATHENAPYTHONDICT_H
 2007-11-12  Sebastien Binet  <binet@lblbox>
 
+	* small fixes to get the package provenance right
+	* headers guard
+	* M AthenaPython/AthenaPythonDict.h
+	* M python/Configurables.py
+	* M python/PyAthena.py
+
 	* tagging AthenaPython-00-00-00
 	* first import of a set of gaudi components for use in PyAthena
 	

python/Configurables.py

 ### Configurable base class for PyAlgorithms ---------------------------------
 _PyAlg = CfgMgr.PyAthena__Alg
 class CfgPyAlgorithm(_PyAlg):
-    __slots__ = ( '_pyKlass', )
+    __slots__ = ( '_pyPkg', '_pyKlass', )
 
-    def __init__(self, name, klass, **kw):
+    def __init__(self, name, pkg, klass, **kw):
         # init base class
         kw['name'] = name
         super(CfgPyAlgorithm, self).__init__( **kw )
 
+        self._pyPkg   = pkg
         self._pyKlass = klass
 
     def setDefaults(cls, handle):
             print "???????????"
             return
         #PyComponents.instances[name] = "%s/%s" % ( pyKlass, name )
+        exec( 'from %s import %s' % (handle._pyPkg,
+                                     handle._pyKlass.split('.')[0]) )
         exec( 'PyComponents.instances[name] = %s( "%s" )' %
               (handle._pyKlass, name) )
         print "."*80
 ### Configurable base class for PyServices ------------------------------------
 _PySvc = CfgMgr.PyAthena__Svc
 class CfgPyService(_PySvc):
-    __slots__ = ( '_pyKlass', )
+    __slots__ = ( '_pyPkg', '_pyKlass', )
 
-    def __init__(self, name, klass, **kw):
+    def __init__(self, name, pkg, klass, **kw):
         # init base class
         kw['name'] = name
         super(CfgPyService, self).__init__( **kw )
 
+        self._pyPkg   = pkg
         self._pyKlass = klass
 
     def setDefaults(cls, handle):
             print "???????????"
             return
         #PyComponents.instances[name] = "%s/%s" % ( pyKlass, name )
+        exec( 'from %s import %s' % (handle._pyPkg,
+                                     handle._pyKlass.split('.')[0]) )
         exec( 'PyComponents.instances[name] = %s( "%s" )' %
               (handle._pyKlass, name) )
         print "."*80

python/PyAthena.py

 
 ### PyAthena.Svc --------------------------------------------------------------
 _Svc = PyCintex.makeClass( "PyAthena::Svc" )
-class Svc( object ):
+class Svc( _Svc ):
     """
     """
     def __init__(self, name):
         svcMgr = Interface(gbl.ISvcManager).cast(svcLoc)
 
         ## init base class
-        #super(Svc, self).__init__(name, svcLoc)
+        super(Svc, self).__init__(name, svcLoc)
 
 ##         priority = 99999
 ##         sc = self._svcMgr.addService(self, priority)