Gaudi Framework, version v21r8

Home   Generated: 17 Mar 2010

GaudiPython::Bindings::iDataSvc Class Reference

Inheritance diagram for GaudiPython::Bindings::iDataSvc:

Inheritance graph
[legend]
Collaboration diagram for GaudiPython::Bindings::iDataSvc:

Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def registerObject
def unregisterObject
def retrieveObject
def findObject
 get object from TES
def getObject
 get or retrieve object, possible switch-off 'on-demand' actions
def __getitem__
def __setitem__
def __delitem__
def leaves
def dump
def getList
def getHistoNames
def setRoot
def clearStore


Detailed Description

Definition at line 322 of file Bindings.py.


Member Function Documentation

def GaudiPython::Bindings::iDataSvc::__init__ (   self,
  name,
  idp 
)

Reimplemented from GaudiPython::Bindings::iService.

Reimplemented in GaudiPython::Bindings::iHistogramSvc, and GaudiPython::Bindings::iNTupleSvc.

Definition at line 323 of file Bindings.py.

00323                                   :
00324         iService.__init__(self, name, idp )
00325         self.__dict__['_idp'] = InterfaceCast(gbl.IDataProviderSvc)(idp)
00326         self.__dict__['_idm'] = InterfaceCast(gbl.IDataManagerSvc)(idp)
    def registerObject(self, path, obj) :

def GaudiPython::Bindings::iDataSvc::registerObject (   self,
  path,
  obj 
)

Definition at line 327 of file Bindings.py.

00327                                         :
00328         if not self._idp : raise AttributeError('C++ service %s does not exist' % self.__dict__['_name'])
00329         return self._idp.registerObject(path,obj)
    def unregisterObject(self, path) :

def GaudiPython::Bindings::iDataSvc::unregisterObject (   self,
  path 
)

Definition at line 330 of file Bindings.py.

00330                                      :
00331         if not self._idp : raise AttributeError('C++ service %s does not exist' % self.__dict__['_name'])
00332         return self._idp.unregisterObject(path)
    def retrieveObject(self, path) :

def GaudiPython::Bindings::iDataSvc::retrieveObject (   self,
  path 
)

Definition at line 333 of file Bindings.py.

00333                                    :
00334         if not self._idp : return  None
00335         return Helper.dataobject(self._idp, path)
    ## get object from TES

def GaudiPython::Bindings::iDataSvc::findObject (   self,
  path 
)

get object from TES


Get the existing object in TransientStore for the given location

- loading of object from persistency is NOT triggered
- 'data-on-demand' action is NOT triggered

>>> svc  =  ...                     ## get the service
>>> path =  ...                     ## get the path in Transient Store
>>> data = svc.findObject ( path )  ## use the method

Definition at line 337 of file Bindings.py.

00337                                :
00338         """
00339 
00340         Get the existing object in TransientStore for the given location
00341 
00342         - loading of object from persistency is NOT triggered
00343         - 'data-on-demand' action is NOT triggered
00344 
00345         >>> svc  =  ...                     ## get the service
00346         >>> path =  ...                     ## get the path in Transient Store
00347         >>> data = svc.findObject ( path )  ## use the method
00348 
00349         """
00350         if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00351         return Helper.findobject(self._idp, path)
00352 
    ##  get or retrieve object, possible switch-off 'on-demand' actions

def GaudiPython::Bindings::iDataSvc::getObject (   self,
  path,
  args 
)

get or retrieve object, possible switch-off 'on-demand' actions

Get object from Transient Store  for the given location

arguments :
- path                           : Location of object in Transient Store
- retrieve          (bool) True  : retrieve versus find
- disable on-demand (bool) False : temporary disable 'on-demand' actions

>>> svc  = ...   ## get the service
>>> path = ...   ## get the path

>>> data = svc.getObject ( path , False )  ## find object in Transient Store

## find object in Transient Store
#  load form tape or use 'on-demand' action  for missing objects :
>>> data = svc.getObject ( path , True  )

## find object in Transient Store
#  load from tape or for missing objects, disable 'on-demand'-actions
>>> data = svc.getObject ( path , True  , True )

Definition at line 354 of file Bindings.py.

00354                                           :
00355         """
00356         Get object from Transient Store  for the given location
00357 
00358         arguments :
00359         - path                           : Location of object in Transient Store
00360         - retrieve          (bool) True  : retrieve versus find
00361         - disable on-demand (bool) False : temporary disable 'on-demand' actions
00362 
00363         >>> svc  = ...   ## get the service
00364         >>> path = ...   ## get the path
00365 
00366         >>> data = svc.getObject ( path , False )  ## find object in Transient Store
00367 
00368         ## find object in Transient Store
00369         #  load form tape or use 'on-demand' action  for missing objects :
00370         >>> data = svc.getObject ( path , True  )
00371 
00372         ## find object in Transient Store
00373         #  load from tape or for missing objects, disable 'on-demand'-actions
00374         >>> data = svc.getObject ( path , True  , True )
00375 
00376         """
00377         if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00378         return Helper.getobject(self._idp, path, *args )
00379 
    def __getitem__(self, path) :

def GaudiPython::Bindings::iDataSvc::__getitem__ (   self,
  path 
)

Reimplemented in GaudiPython::Bindings::iHistogramSvc, and GaudiPython::Bindings::iNTupleSvc.

Definition at line 380 of file Bindings.py.

00380                                 :
00381         if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00382         return Helper.dataobject(self._idp, path)
    def __setitem__(self, path, obj) :

def GaudiPython::Bindings::iDataSvc::__setitem__ (   self,
  path,
  obj 
)

Definition at line 383 of file Bindings.py.

00383                                      :
00384         if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00385         return self._idp.registerObject(path,obj)
    def __delitem__(self, path) :

def GaudiPython::Bindings::iDataSvc::__delitem__ (   self,
  path 
)

Definition at line 386 of file Bindings.py.

00386                                 :
00387         if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00388         return self._idp.unregisterObject(path)
    def leaves(self, node=None) :

def GaudiPython::Bindings::iDataSvc::leaves (   self,
  node = None 
)

Definition at line 389 of file Bindings.py.

00389                                 :
00390         if not node : node = self.retrieveObject('')
00391         ll = gbl.std.vector('IRegistry*')()
00392         if type(node) is str : obj = self.retrieveObject(node)
00393         else                 : obj = node
00394         if self._idm.objectLeaves(node, ll).isSuccess() : return ll
    def dump(self, node=None) :

def GaudiPython::Bindings::iDataSvc::dump (   self,
  node = None 
)

Definition at line 395 of file Bindings.py.

00395                               :
00396         if not node :
00397             root = self.retrieveObject('')
00398             if root : node = root.registry()
00399             else : return
00400         print node.identifier()
00401         if node.object() :
00402             for l in self.leaves(node) : self.dump(l)
    def getList(self, node=None, lst=[], rootFID=None) :

def GaudiPython::Bindings::iDataSvc::getList (   self,
  node = None,
  lst = [],
  rootFID = None 
)

Definition at line 403 of file Bindings.py.

00403                                                        :
00404         if not node :
00405             root = self.retrieveObject('')
00406             if root :
00407                 node = root.registry()
00408                 rootFID = node.address().par()
00409                 lst = []
00410             else :
00411                 return
00412         Helper.dataobject( self._idp, node.identifier() )
00413         if node.object() :
00414             lst.append( node.identifier() )
00415             for l in self.leaves(node) :
00416                 if l.address() and l.address().par() == rootFID :
00417                     self.getList(l,lst,rootFID)
00418                 else :
00419                     continue
00420         return lst
    def getHistoNames( self, node=None, lst=[] ) :

def GaudiPython::Bindings::iDataSvc::getHistoNames (   self,
  node = None,
  lst = [] 
)

Definition at line 421 of file Bindings.py.

00421                                                  :
00422         if not node :
00423             root = self.retrieveObject('')
00424             if root :
00425                 node = root.registry()
00426                 # rootFID = node.address().par()
00427                 lst = []
00428             else : return
00429         Helper.dataobject( self._idp, node.identifier() )
00430         if node.object() :
00431             lst.append( node.identifier() )
00432             for l in self.leaves(node) :
00433                 if l.name() : # and l.address().par() == rootFID :
00434                     self.getHistoNames(l,lst)
00435                 else :
00436                     continue
00437         return lst
    def setRoot(self, name, obj):

def GaudiPython::Bindings::iDataSvc::setRoot (   self,
  name,
  obj 
)

Definition at line 438 of file Bindings.py.

00438                                 :
00439         if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00440         return self._idm.setRoot(name,obj)
    def clearStore(self):

def GaudiPython::Bindings::iDataSvc::clearStore (   self  ) 

Definition at line 441 of file Bindings.py.

00441                         :
00442         if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00443         return self._idm.clearStore()
00444 
00445 
00446 #----iHistogramSvc class---------------------------------------------------------------------
class iHistogramSvc(iDataSvc) :


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

Generated at Wed Mar 17 18:21:51 2010 for Gaudi Framework, version v21r8 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004