| The Gaudi Framework v29r0 (ff2e7097)

- 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)
def | getObject (self, path, args)
def | __getitem__ (self, path)
def | __setitem__ (self, path, obj)
def | __delitem__ (self, path)
def | leaves (self, node=None)
def | dump (self, node=None)
def | getList (self, node=None, lst=[], rootFID=None)
def | getHistoNames (self, node=None, lst=[])
def | setRoot (self, name, obj)
def | clearStore (self)
Public Member Functions inherited from GaudiPython.Bindings.iService
def | __init__ (self, name, isvc=None)
def | retrieveInterface (self)
def | initialize (self)
def | start (self)
def | stop (self)
def | finalize (self)
def | reinitialize (self)
def | restart (self)
def | isValid (self)
Public Member Functions inherited from GaudiPython.Bindings.iProperty
def | __init__ (self, name, ip=None)
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)

## Detailed Description

Definition at line 493 of file Bindings.py.

## Constructor & Destructor Documentation

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

Definition at line 494 of file Bindings.py.

494 def __init__(self, name, idp):
495 iService.__init__(self, name, idp)
496 self.__dict__['_idp'] = InterfaceCast(gbl.IDataProviderSvc)(idp)
497 self.__dict__['_idm'] = InterfaceCast(gbl.IDataManagerSvc)(idp)
498
GaudiPython.Bindings.InterfaceCast
Definition: Bindings.py:93
GaudiPython.Bindings.iDataSvc.__init__
def __init__(self, name, idp)
Definition: Bindings.py:494

## Member Function Documentation

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

Definition at line 576 of file Bindings.py.

576 def __delitem__(self, path):
577 if not self._idp:
578 raise IndexError('C++ service %s does not exist' %
579 self.__dict__['_name'])
580 return self._idp.unregisterObject(path)
581
GaudiPython.Bindings.iDataSvc.__delitem__
def __delitem__(self, path)
Definition: Bindings.py:576

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

Definition at line 564 of file Bindings.py.

564 def __getitem__(self, path):
565 if not self._idp:
566 raise IndexError('C++ service %s does not exist' %
567 self.__dict__['_name'])
568 return Helper.dataobject(self._idp, path)
569
GaudiPython.Bindings.iDataSvc.__getitem__
def __getitem__(self, path)
Definition: Bindings.py:564

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

Definition at line 570 of file Bindings.py.

570 def __setitem__(self, path, obj):
571 if not self._idp:
572 raise IndexError('C++ service %s does not exist' %
573 self.__dict__['_name'])
574 return self._idp.registerObject(path, obj)
575
GaudiPython.Bindings.iDataSvc.__setitem__
def __setitem__(self, path, obj)
Definition: Bindings.py:570

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

Definition at line 649 of file Bindings.py.

649 def clearStore(self):
650 if not self._idm:
651 raise IndexError('C++ service %s does not exist' %
652 self.__dict__['_name'])
653 return self._idm.clearStore()
654
655
656 # ----iHistogramSvc class------------------------------------------------------
GaudiPython.Bindings.iDataSvc.clearStore
def clearStore(self)
Definition: Bindings.py:649

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

Definition at line 593 of file Bindings.py.

593 def dump(self, node=None):
594 if not node:
595 root = self.retrieveObject('')
596 if root:
597 node = root.registry()
598 else:
599 return
600 print node.identifier()
601 if node.object():
602 for l in self.leaves(node):
603 self.dump(l)
604
GaudiPython.Bindings.iDataSvc.dump
def dump(self, node=None)
Definition: Bindings.py:593
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:511
GaudiPython.Bindings.iDataSvc.leaves
def leaves(self, node=None)
Definition: Bindings.py:582

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

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

517 def findObject(self, path):
518 """
519
520 Get the existing object in TransientStore for the given location
521
522 - loading of object from persistency is NOT triggered
523 - 'data-on-demand' action is NOT triggered
524
525 >>> svc = ... ## get the service
526 >>> path = ... ## get the path in Transient Store
527 >>> data = svc.findObject ( path ) ## use the method
528
529 """
530 if not self._idp:
531 raise IndexError('C++ service %s does not exist' %
532 self.__dict__['_name'])
533 return Helper.findobject(self._idp, path)
534
GaudiPython.Bindings.iDataSvc.findObject
def findObject(self, path)
Definition: Bindings.py:517

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

Definition at line 624 of file Bindings.py.

624 def getHistoNames(self, node=None, lst=[]):
625 if not node:
626 root = self.retrieveObject('')
627 if root:
628 node = root.registry()
629 # rootFID = node.address().par()
630 lst = []
631 else:
632 return
633 Helper.dataobject(self._idp, node.identifier())
634 if node.object():
635 lst.append(node.identifier())
636 for l in self.leaves(node):
637 if l.name(): # and l.address().par() == rootFID :
638 self.getHistoNames(l, lst)
639 else:
640 continue
641 return lst
642
GaudiPython.Bindings.iDataSvc.getHistoNames
def getHistoNames(self, node=None, lst=[])
Definition: Bindings.py:624
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:511
GaudiPython.Bindings.iDataSvc.leaves
def leaves(self, node=None)
Definition: Bindings.py:582

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

Definition at line 605 of file Bindings.py.

605 def getList(self, node=None, lst=[], rootFID=None):
606 if not node:
607 root = self.retrieveObject('')
608 if root:
609 node = root.registry()
610 rootFID = node.address().par()
611 lst = []
612 else:
613 return
614 Helper.dataobject(self._idp, node.identifier())
615 if node.object():
616 lst.append(node.identifier())
617 for l in self.leaves(node):
618 if l.address() and l.address().par() == rootFID:
619 self.getList(l, lst, rootFID)
620 else:
621 continue
622 return lst
623
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:435
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:511
GaudiPython.Bindings.iDataSvc.leaves
def leaves(self, node=None)
Definition: Bindings.py:582
GaudiPython.Bindings.iDataSvc.getList
def getList(self, node=None, lst=[], rootFID=None)
Definition: Bindings.py:605

def GaudiPython.Bindings.iDataSvc.getObject | ( |  | self,
|  |  | path,
|  |  | args
| ) |  |

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

536 def getObject(self, path, *args):
537 """
538 Get object from Transient Store for the given location
539
540 arguments :
541 - path : Location of object in Transient Store
542 - retrieve (bool) True : retrieve versus find
543 - disable on-demand (bool) False : temporary disable 'on-demand' actions
544
545 >>> svc = ... ## get the service
546 >>> path = ... ## get the path
547
548 >>> data = svc.getObject ( path , False ) ## find object in Transient Store
549
550 ## find object in Transient Store
551 # load form tape or use 'on-demand' action for missing objects :
552 >>> data = svc.getObject ( path , True )
553
554 ## find object in Transient Store
555 # load from tape or for missing objects, disable 'on-demand'-actions
556 >>> data = svc.getObject ( path , True , True )
557
558 """
559 if not self._idp:
560 raise IndexError('C++ service %s does not exist' %
561 self.__dict__['_name'])
562 return Helper.getobject(self._idp, path, *args)
563
GaudiPython.Bindings.iDataSvc.getObject
def getObject(self, path, args)
Definition: Bindings.py:536

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

Definition at line 582 of file Bindings.py.

582 def leaves(self, node=None):
583 if not node:
584 node = self.retrieveObject('')
585 ll = gbl.std.vector('IRegistry*')()
586 if type(node) is str:
587 obj = self.retrieveObject(node)
588 else:
589 obj = node
590 if self._idm.objectLeaves(node, ll).isSuccess():
591 return ll
592
gaudirun.type
type
Definition: gaudirun.py:133
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:511
GaudiPython.Bindings.iDataSvc.leaves
def leaves(self, node=None)
Definition: Bindings.py:582

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

Definition at line 499 of file Bindings.py.

499 def registerObject(self, path, obj):
500 if not self._idp:
501 raise AttributeError(
502 'C++ service %s does not exist' % self.__dict__['_name'])
503 return self._idp.registerObject(path, obj)
504
GaudiPython.Bindings.iDataSvc.registerObject
def registerObject(self, path, obj)
Definition: Bindings.py:499

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

Definition at line 511 of file Bindings.py.

511 def retrieveObject(self, path):
512 if not self._idp:
513 return None
514 return Helper.dataobject(self._idp, path)
GaudiPython.Bindings.iDataSvc.retrieveObject
def retrieveObject(self, path)
Definition: Bindings.py:511

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

Definition at line 643 of file Bindings.py.

643 def setRoot(self, name, obj):
644 if not self._idm:
645 raise IndexError('C++ service %s does not exist' %
646 self.__dict__['_name'])
647 return self._idm.setRoot(name, obj)
648
GaudiPython.Bindings.iDataSvc.setRoot
def setRoot(self, name, obj)
Definition: Bindings.py:643

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

Definition at line 505 of file Bindings.py.

505 def unregisterObject(self, path):
506 if not self._idp:
507 raise AttributeError(
508 'C++ service %s does not exist' % self.__dict__['_name'])
509 return self._idp.unregisterObject(path)
510
GaudiPython.Bindings.iDataSvc.unregisterObject
def unregisterObject(self, path)
Definition: Bindings.py:505

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

- GaudiPython/python/GaudiPython/Bindings.py