All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiPython.Bindings.iDataSvc Class Reference
Inheritance diagram for GaudiPython.Bindings.iDataSvc:
Collaboration diagram for GaudiPython.Bindings.iDataSvc:

Public Member Functions

def __init__
 
def registerObject
 
def unregisterObject
 
def retrieveObject
 
def findObject
 get object from TES More...
 
def getObject
 get or retrieve object, possible switch-off 'on-demand' actions More...
 
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 349 of file Bindings.py.

Constructor & Destructor Documentation

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

Definition at line 350 of file Bindings.py.

351  def __init__(self, name, idp) :
352  iService.__init__(self, name, idp )
353  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 413 of file Bindings.py.

414  def __delitem__(self, path) :
415  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 407 of file Bindings.py.

408  def __getitem__(self, path) :
409  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 410 of file Bindings.py.

411  def __setitem__(self, path, obj) :
412  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 468 of file Bindings.py.

469  def clearStore(self):
470  if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
471  return self._idm.clearStore()
472 
473 
#----iHistogramSvc class---------------------------------------------------------------------
def GaudiPython.Bindings.iDataSvc.dump (   self,
  node = None 
)

Definition at line 422 of file Bindings.py.

423  def dump(self, node=None) :
424  if not node :
425  root = self.retrieveObject('')
426  if root : node = root.registry()
427  else : return
428  print node.identifier()
429  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 364 of file Bindings.py.

365  def findObject(self, path) :
366  """
367 
368  Get the existing object in TransientStore for the given location
369 
370  - loading of object from persistency is NOT triggered
371  - 'data-on-demand' action is NOT triggered
372 
373  >>> svc = ... ## get the service
374  >>> path = ... ## get the path in Transient Store
375  >>> data = svc.findObject ( path ) ## use the method
376 
377  """
378  if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
379  return Helper.findobject(self._idp, path)
def findObject
get object from TES
Definition: Bindings.py:364
def GaudiPython.Bindings.iDataSvc.getHistoNames (   self,
  node = None,
  lst = [] 
)

Definition at line 448 of file Bindings.py.

449  def getHistoNames( self, node=None, lst=[] ) :
450  if not node :
451  root = self.retrieveObject('')
452  if root :
453  node = root.registry()
454  # rootFID = node.address().par()
455  lst = []
456  else : return
457  Helper.dataobject( self._idp, node.identifier() )
458  if node.object() :
459  lst.append( node.identifier() )
460  for l in self.leaves(node) :
461  if l.name() : # and l.address().par() == rootFID :
462  self.getHistoNames(l,lst)
463  else :
464  continue
return lst
def GaudiPython.Bindings.iDataSvc.getList (   self,
  node = None,
  lst = [],
  rootFID = None 
)

Definition at line 430 of file Bindings.py.

431  def getList(self, node=None, lst=[], rootFID=None) :
432  if not node :
433  root = self.retrieveObject('')
434  if root :
435  node = root.registry()
436  rootFID = node.address().par()
437  lst = []
438  else :
439  return
440  Helper.dataobject( self._idp, node.identifier() )
441  if node.object() :
442  lst.append( node.identifier() )
443  for l in self.leaves(node) :
444  if l.address() and l.address().par() == rootFID :
445  self.getList(l,lst,rootFID)
446  else :
447  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 381 of file Bindings.py.

382  def getObject ( self , path , *args ) :
383  """
384  Get object from Transient Store for the given location
385 
386  arguments :
387  - path : Location of object in Transient Store
388  - retrieve (bool) True : retrieve versus find
389  - disable on-demand (bool) False : temporary disable 'on-demand' actions
390 
391  >>> svc = ... ## get the service
392  >>> path = ... ## get the path
393 
394  >>> data = svc.getObject ( path , False ) ## find object in Transient Store
395 
396  ## find object in Transient Store
397  # load form tape or use 'on-demand' action for missing objects :
398  >>> data = svc.getObject ( path , True )
399 
400  ## find object in Transient Store
401  # load from tape or for missing objects, disable 'on-demand'-actions
402  >>> data = svc.getObject ( path , True , True )
403 
404  """
405  if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
406  return Helper.getobject(self._idp, path, *args )
def getObject
get or retrieve object, possible switch-off 'on-demand' actions
Definition: Bindings.py:381
def GaudiPython.Bindings.iDataSvc.leaves (   self,
  node = None 
)

Definition at line 416 of file Bindings.py.

417  def leaves(self, node=None) :
418  if not node : node = self.retrieveObject('')
419  ll = gbl.std.vector('IRegistry*')()
420  if type(node) is str : obj = self.retrieveObject(node)
421  else : obj = node
if self._idm.objectLeaves(node, ll).isSuccess() : return ll
string type
Definition: gaudirun.py:126
def GaudiPython.Bindings.iDataSvc.registerObject (   self,
  path,
  obj 
)

Definition at line 354 of file Bindings.py.

355  def registerObject(self, path, obj) :
356  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 360 of file Bindings.py.

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

Definition at line 465 of file Bindings.py.

466  def setRoot(self, name, obj):
467  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 357 of file Bindings.py.

358  def unregisterObject(self, path) :
359  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: