Gaudi Framework, version v23r6

Home   Generated: Wed Jan 30 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
GaudiPython.Bindings.iDataSvc Class Reference
Inheritance diagram for GaudiPython.Bindings.iDataSvc:
Inheritance graph
[legend]
Collaboration diagram for GaudiPython.Bindings.iDataSvc:
Collaboration graph
[legend]

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
 
- Public Member Functions inherited from GaudiPython.Bindings.iService
def __init__
 
def retrieveInterface
 
def isValid
 
- Public Member Functions inherited from GaudiPython.Bindings.iProperty
def __init__
 
def getInterface
 
def retrieveInterface
 
def __call_interface_method__
 
def __setattr__
 
def __getattr__
 
def properties
 
def name
 

Additional Inherited Members

- Static Public Attributes inherited from GaudiPython.Bindings.iService
tuple initialize lambdaself:self.__call_interface_method__("_isvc","initialize")
 
tuple start lambdaself:self.__call_interface_method__("_isvc","start")
 
tuple stop lambdaself:self.__call_interface_method__("_isvc","stop")
 
tuple finalize lambdaself:self.__call_interface_method__("_isvc","finalize")
 
tuple reinitialize lambdaself:self.__call_interface_method__("_isvc","reinitialize")
 
tuple restart lambdaself:self.__call_interface_method__("_isvc","restart")
 

Detailed Description

Definition at line 322 of file Bindings.py.

Constructor & Destructor Documentation

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

Definition at line 323 of file Bindings.py.

324  def __init__(self, name, idp) :
325  iService.__init__(self, name, idp )
326  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.

387  def __delitem__(self, path) :
388  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 
)

Definition at line 380 of file Bindings.py.

381  def __getitem__(self, path) :
382  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.

384  def __setitem__(self, path, obj) :
385  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.

442  def clearStore(self):
443  if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
444  return self._idm.clearStore()
445 
446 
#----iHistogramSvc class---------------------------------------------------------------------
def GaudiPython.Bindings.iDataSvc.dump (   self,
  node = None 
)

Definition at line 395 of file Bindings.py.

396  def dump(self, node=None) :
397  if not node :
398  root = self.retrieveObject('')
399  if root : node = root.registry()
400  else : return
401  print node.identifier()
402  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.

338  def findObject(self, path) :
339  """
340 
341  Get the existing object in TransientStore for the given location
342 
343  - loading of object from persistency is NOT triggered
344  - 'data-on-demand' action is NOT triggered
345 
346  >>> svc = ... ## get the service
347  >>> path = ... ## get the path in Transient Store
348  >>> data = svc.findObject ( path ) ## use the method
349 
350  """
351  if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
352  return Helper.findobject(self._idp, path)
def GaudiPython.Bindings.iDataSvc.getHistoNames (   self,
  node = None,
  lst = [] 
)

Definition at line 421 of file Bindings.py.

422  def getHistoNames( self, node=None, lst=[] ) :
423  if not node :
424  root = self.retrieveObject('')
425  if root :
426  node = root.registry()
427  # rootFID = node.address().par()
428  lst = []
429  else : return
430  Helper.dataobject( self._idp, node.identifier() )
431  if node.object() :
432  lst.append( node.identifier() )
433  for l in self.leaves(node) :
434  if l.name() : # and l.address().par() == rootFID :
435  self.getHistoNames(l,lst)
436  else :
437  continue
return lst
def GaudiPython.Bindings.iDataSvc.getList (   self,
  node = None,
  lst = [],
  rootFID = None 
)

Definition at line 403 of file Bindings.py.

404  def getList(self, node=None, lst=[], rootFID=None) :
405  if not node :
406  root = self.retrieveObject('')
407  if root :
408  node = root.registry()
409  rootFID = node.address().par()
410  lst = []
411  else :
412  return
413  Helper.dataobject( self._idp, node.identifier() )
414  if node.object() :
415  lst.append( node.identifier() )
416  for l in self.leaves(node) :
417  if l.address() and l.address().par() == rootFID :
418  self.getList(l,lst,rootFID)
419  else :
420  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.

355  def getObject ( self , path , *args ) :
356  """
357  Get object from Transient Store for the given location
358 
359  arguments :
360  - path : Location of object in Transient Store
361  - retrieve (bool) True : retrieve versus find
362  - disable on-demand (bool) False : temporary disable 'on-demand' actions
363 
364  >>> svc = ... ## get the service
365  >>> path = ... ## get the path
366 
367  >>> data = svc.getObject ( path , False ) ## find object in Transient Store
368 
369  ## find object in Transient Store
370  # load form tape or use 'on-demand' action for missing objects :
371  >>> data = svc.getObject ( path , True )
372 
373  ## find object in Transient Store
374  # load from tape or for missing objects, disable 'on-demand'-actions
375  >>> data = svc.getObject ( path , True , True )
376 
377  """
378  if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
379  return Helper.getobject(self._idp, path, *args )
def GaudiPython.Bindings.iDataSvc.leaves (   self,
  node = None 
)

Definition at line 389 of file Bindings.py.

390  def leaves(self, node=None) :
391  if not node : node = self.retrieveObject('')
392  ll = gbl.std.vector('IRegistry*')()
393  if type(node) is str : obj = self.retrieveObject(node)
394  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.

328  def registerObject(self, path, obj) :
329  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.

334  def retrieveObject(self, path) :
335  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.

439  def setRoot(self, name, obj):
440  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.

331  def unregisterObject(self, path) :
332  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:
Generated at Wed Jan 30 2013 17:13:51 for Gaudi Framework, version v23r6 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004