| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GaudiPython.Bindings.iDataSvc Class Reference
Inheritance diagram for GaudiPython.Bindings.iDataSvc:
[legend]
Collaboration diagram for GaudiPython.Bindings.iDataSvc:
[legend]

## Public Member Functions
def | __init__ (self, name, idp)
def | registerObject (self, path, obj)
def | unregisterObject (self, path)
def | retrieveObject (self, path)
def | findObject (self, path)
| get object from TES More...
def | getObject (self, path, args)
| get or retrieve object, possible switch-off 'on-demand' actions More...
def | __getitem__ (self, path)
def | __setitem__ (self, path, obj)
def | __delitem__ (self, path)
def | leaves
def | dump
def | getList
def | getHistoNames
def | setRoot (self, name, obj)
def | clearStore (self)
Public Member Functions inherited from GaudiPython.Bindings.iService
def | __init__
def | retrieveInterface (self)
def | isValid (self)
Public Member Functions inherited from GaudiPython.Bindings.iProperty
def | __init__
def | getInterface (self)
def | retrieveInterface (self)
def | __call_interface_method__ (self, ifname, method, args)
def | __setattr__ (self, name, value)
def | __getattr__ (self, name)
def | properties (self)
def | name (self)

## 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 348 of file Bindings.py.

## Constructor & Destructor Documentation

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

Definition at line 349 of file Bindings.py.

349 def __init__(self, name, idp) :
350 iService.__init__(self, name, idp )
351 self.__dict__['_idp'] = InterfaceCast(gbl.IDataProviderSvc)(idp)
352 self.__dict__['_idm'] = InterfaceCast(gbl.IDataManagerSvc)(idp)
GaudiPython.Bindings.InterfaceCast
Definition: Bindings.py:77
GaudiPython.Bindings.iDataSvc.__init__
def __init__(self, name, idp)
Definition: Bindings.py:349

## Member Function Documentation

def GaudiPython.Bindings.iDataSvc.__delitem__ | ( |  | self,
|  |  | path
| ) |  |

Definition at line 412 of file Bindings.py.

412 def __delitem__(self, path) :
413 if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
414 return self._idp.unregisterObject(path)
GaudiPython.Bindings.iDataSvc.__delitem__
def __delitem__(self, path)
Definition: Bindings.py:412

def GaudiPython.Bindings.iDataSvc.__getitem__ | ( |  | self,
|  |  | path
| ) |  |

Definition at line 406 of file Bindings.py.

406 def __getitem__(self, path) :
407 if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
408 return Helper.dataobject(self._idp, path)
GaudiPython.Bindings.iDataSvc.__getitem__
def __getitem__(self, path)
Definition: Bindings.py:406

def GaudiPython.Bindings.iDataSvc.__setitem__ | ( |  | self,
|  |  | path,
|  |  | obj
| ) |  |

Definition at line 409 of file Bindings.py.

409 def __setitem__(self, path, obj) :
410 if not self._idp : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
411 return self._idp.registerObject(path,obj)
GaudiPython.Bindings.iDataSvc.__setitem__
def __setitem__(self, path, obj)
Definition: Bindings.py:409

def GaudiPython.Bindings.iDataSvc.clearStore | ( |  | self | ) |

Definition at line 467 of file Bindings.py.

467 def clearStore(self):
468 if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
469 return self._idm.clearStore()
470
471
472 #----iHistogramSvc class---------------------------------------------------------------------
GaudiPython.Bindings.iDataSvc.clearStore
def clearStore(self)
Definition: Bindings.py:467

def GaudiPython.Bindings.iDataSvc.dump | ( |  | self,
|  |  | node = `None`
| ) |  |

Definition at line 421 of file Bindings.py.

421 def dump(self, node=None) :
422 if not node :
423 root = self.retrieveObject('')
424 if root : node = root.registry()
425 else : return
426 print node.identifier()
427 if node.object() :
428 for l in self.leaves(node) : self.dump(l)
GaudiPython.Bindings.iDataSvc.leaves
def leaves
Definition: Bindings.py:415
GaudiPython.Bindings.iDataSvc.dump
def dump
Definition: Bindings.py:421
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:359

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 363 of file Bindings.py.

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

def GaudiPython.Bindings.iDataSvc.getHistoNames | ( |  | self,
|  |  | node = `None`,
|  |  | lst = `[]`
| ) |  |

Definition at line 447 of file Bindings.py.

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

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

Definition at line 429 of file Bindings.py.

429 def getList(self, node=None, lst=[], rootFID=None) :
430 if not node :
431 root = self.retrieveObject('')
432 if root :
433 node = root.registry()
434 rootFID = node.address().par()
435 lst = []
436 else :
437 return
438 Helper.dataobject( self._idp, node.identifier() )
439 if node.object() :
440 lst.append( node.identifier() )
441 for l in self.leaves(node) :
442 if l.address() and l.address().par() == rootFID :
443 self.getList(l,lst,rootFID)
444 else :
445 continue
446 return lst
GaudiPython.Bindings.iDataSvc.getList
def getList
Definition: Bindings.py:429
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:386
GaudiPython.Bindings.iDataSvc.leaves
def leaves
Definition: Bindings.py:415
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:359

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 380 of file Bindings.py.

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

def GaudiPython.Bindings.iDataSvc.leaves | ( |  | self,
|  |  | node = `None`
| ) |  |

Definition at line 415 of file Bindings.py.

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

def GaudiPython.Bindings.iDataSvc.registerObject | ( |  | self,
|  |  | path,
|  |  | obj
| ) |  |

Definition at line 353 of file Bindings.py.

353 def registerObject(self, path, obj) :
354 if not self._idp : raise AttributeError('C++ service %s does not exist' % self.__dict__['_name'])
355 return self._idp.registerObject(path,obj)
GaudiPython.Bindings.iDataSvc.registerObject
def registerObject(self, path, obj)
Definition: Bindings.py:353

def GaudiPython.Bindings.iDataSvc.retrieveObject | ( |  | self,
|  |  | path
| ) |  |

Definition at line 359 of file Bindings.py.

359 def retrieveObject(self, path) :
360 if not self._idp : return None
361 return Helper.dataobject(self._idp, path)
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:359

def GaudiPython.Bindings.iDataSvc.setRoot | ( |  | self,
|  |  | name,
|  |  | obj
| ) |  |

Definition at line 464 of file Bindings.py.

464 def setRoot(self, name, obj):
465 if not self._idm : raise IndexError('C++ service %s does not exist' % self.__dict__['_name'])
466 return self._idm.setRoot(name,obj)
GaudiPython.Bindings.iDataSvc.setRoot
def setRoot(self, name, obj)
Definition: Bindings.py:464

def GaudiPython.Bindings.iDataSvc.unregisterObject | ( |  | self,
|  |  | path
| ) |  |

Definition at line 356 of file Bindings.py.

356 def unregisterObject(self, path) :
357 if not self._idp : raise AttributeError('C++ service %s does not exist' % self.__dict__['_name'])
358 return self._idp.unregisterObject(path)
GaudiPython.Bindings.iDataSvc.unregisterObject
def unregisterObject(self, path)
Definition: Bindings.py:356

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

- GaudiPython/python/GaudiPython/Bindings.py