Gaudi Framework, version v23r0

Home   Generated: Mon Jan 30 2012
Public Member Functions

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.


Constructor & Destructor 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.

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

Member Function Documentation

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

Definition at line 386 of file Bindings.py.

00387                                 :
00388         if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
        return self._idp.unregisterObject(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.

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

Definition at line 383 of file Bindings.py.

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

Definition at line 441 of file Bindings.py.

00442                         :
00443         if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
00444         return self._idm.clearStore()
00445 
00446 
#----iHistogramSvc class---------------------------------------------------------------------
def GaudiPython::Bindings::iDataSvc::dump (   self,
  node = None 
)

Definition at line 395 of file Bindings.py.

00396                               :
00397         if not node :
00398             root = self.retrieveObject('')
00399             if root : node = root.registry()
00400             else : return
00401         print node.identifier()
00402         if node.object() :
            for l in self.leaves(node) : self.dump(l)
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.

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

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

Definition at line 421 of file Bindings.py.

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

Definition at line 403 of file Bindings.py.

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

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

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

Definition at line 389 of file Bindings.py.

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

Definition at line 327 of file Bindings.py.

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

Definition at line 333 of file Bindings.py.

00334                                    :
00335         if not self._idp : return  None
        return Helper.dataobject(self._idp, path)
def GaudiPython::Bindings::iDataSvc::setRoot (   self,
  name,
  obj 
)

Definition at line 438 of file Bindings.py.

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

Definition at line 330 of file Bindings.py.

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

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Mon Jan 30 2012 13:53:34 for Gaudi Framework, version v23r0 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004