The Gaudi Framework  v37r1 (a7f61348)
GaudiPython.Bindings.iDataSvc Class Reference
Inheritance diagram for GaudiPython.Bindings.iDataSvc:
Collaboration diagram for GaudiPython.Bindings.iDataSvc:

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=cppyy.nullptr)
 
def dump (self, node=cppyy.nullptr)
 
def getList (self, node=cppyy.nullptr, lst=[], rootFID=None)
 
def getHistoNames (self, node=cppyy.nullptr, lst=[])
 
def setRoot (self, name, obj)
 
def clearStore (self)
 
- Public Member Functions inherited from GaudiPython.Bindings.iService
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 getInterface (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 516 of file Bindings.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented from GaudiPython.Bindings.iService.

Reimplemented in GaudiPython.Bindings.iNTupleSvc, and GaudiPython.Bindings.iHistogramSvc.

Definition at line 517 of file Bindings.py.

517  def __init__(self, name, idp):
518  iService.__init__(self, name, idp)
519  self.__dict__["_idp"] = InterfaceCast(gbl.IDataProviderSvc)(idp)
520  self.__dict__["_idm"] = InterfaceCast(gbl.IDataManagerSvc)(idp)
521 

Member Function Documentation

◆ __delitem__()

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

Definition at line 598 of file Bindings.py.

598  def __delitem__(self, path):
599  if not self._idp:
600  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
601  return self.unregisterObject(path)
602 

◆ __getitem__()

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

Reimplemented in GaudiPython.Bindings.iNTupleSvc, and GaudiPython.Bindings.iHistogramSvc.

Definition at line 588 of file Bindings.py.

588  def __getitem__(self, path):
589  if not self._idp:
590  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
591  return Helper.dataobject(self._idp, path)
592 

◆ __setitem__()

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

Definition at line 593 of file Bindings.py.

593  def __setitem__(self, path, obj):
594  if not self._idp:
595  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
596  return self.registerObject(path, obj)
597 

◆ clearStore()

def GaudiPython.Bindings.iDataSvc.clearStore (   self)

Definition at line 667 of file Bindings.py.

667  def clearStore(self):
668  if not self._idm:
669  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
670  return self._idm.clearStore()
671 
672 
673 # ----iHistogramSvc class------------------------------------------------------

◆ dump()

def GaudiPython.Bindings.iDataSvc.dump (   self,
  node = cppyy.nullptr 
)

Definition at line 612 of file Bindings.py.

612  def dump(self, node=cppyy.nullptr):
613  if node == cppyy.nullptr:
614  root = self.retrieveObject("")
615  if root:
616  node = root.registry()
617  else:
618  return
619  print(node.identifier())
620  if node.object():
621  for l in self.leaves(node):
622  self.dump(l)
623 

◆ findObject()

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

543  def findObject(self, path):
544  """
545 
546  Get the existing object in TransientStore for the given location
547 
548  - loading of object from persistency is NOT triggered
549  - 'data-on-demand' action is NOT triggered
550 
551  >>> svc = ... ## get the service
552  >>> path = ... ## get the path in Transient Store
553  >>> data = svc.findObject ( path ) ## use the method
554 
555  """
556  if not self._idp:
557  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
558  return Helper.findobject(self._idp, path)
559 

◆ getHistoNames()

def GaudiPython.Bindings.iDataSvc.getHistoNames (   self,
  node = cppyy.nullptr,
  lst = [] 
)

Definition at line 643 of file Bindings.py.

643  def getHistoNames(self, node=cppyy.nullptr, lst=[]):
644  if node == cppyy.nullptr:
645  root = self.retrieveObject("")
646  if root:
647  node = root.registry()
648  # rootFID = node.address().par()
649  lst = []
650  else:
651  return
652  Helper.dataobject(self._idp, node.identifier())
653  if node.object():
654  lst.append(node.identifier())
655  for l in self.leaves(node):
656  if l.name(): # and l.address().par() == rootFID :
657  self.getHistoNames(l, lst)
658  else:
659  continue
660  return lst
661 

◆ getList()

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

Definition at line 624 of file Bindings.py.

624  def getList(self, node=cppyy.nullptr, lst=[], rootFID=None):
625  if node == cppyy.nullptr:
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.address() and l.address().par() == rootFID:
638  self.getList(l, lst, rootFID)
639  else:
640  continue
641  return lst
642 

◆ getObject()

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

561  def getObject(self, path, *args):
562  """
563  Get object from Transient Store for the given location
564 
565  arguments :
566  - path : Location of object in Transient Store
567  - retrieve (bool) True : retrieve versus find
568  - disable on-demand (bool) False : temporary disable 'on-demand' actions
569 
570  >>> svc = ... ## get the service
571  >>> path = ... ## get the path
572 
573  >>> data = svc.getObject ( path , False ) ## find object in Transient Store
574 
575  ## find object in Transient Store
576  # load form tape or use 'on-demand' action for missing objects :
577  >>> data = svc.getObject ( path , True )
578 
579  ## find object in Transient Store
580  # load from tape or for missing objects, disable 'on-demand'-actions
581  >>> data = svc.getObject ( path , True , True )
582 
583  """
584  if not self._idp:
585  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
586  return Helper.getobject(self._idp, path, *args)
587 

◆ leaves()

def GaudiPython.Bindings.iDataSvc.leaves (   self,
  node = cppyy.nullptr 
)

Definition at line 603 of file Bindings.py.

603  def leaves(self, node=cppyy.nullptr):
604  if node == cppyy.nullptr:
605  node = self.retrieveObject("")
606  ll = gbl.std.vector("IRegistry*")()
607  if isinstance(node, str):
608  _ = self.retrieveObject(node)
609  if self._idm.objectLeaves(node, ll).isSuccess():
610  return ll
611 

◆ registerObject()

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

Definition at line 522 of file Bindings.py.

522  def registerObject(self, path, obj):
523  if not self._idp:
524  raise AttributeError(
525  "C++ service %s does not exist" % self.__dict__["_name"]
526  )
527  return Helper.registerObject(self._idp, path, obj)
528 

◆ retrieveObject()

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

Definition at line 536 of file Bindings.py.

536  def retrieveObject(self, path):
537  if not self._idp:
538  return cppyy.nullptr
539  return Helper.dataobject(self._idp, path)
540 

◆ setRoot()

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

Definition at line 662 of file Bindings.py.

662  def setRoot(self, name, obj):
663  if not self._idm:
664  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
665  return self._idm.setRoot(name, obj)
666 

◆ unregisterObject()

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

Definition at line 529 of file Bindings.py.

529  def unregisterObject(self, path):
530  if not self._idp:
531  raise AttributeError(
532  "C++ service %s does not exist" % self.__dict__["_name"]
533  )
534  return Helper.unregisterObject(self._idp, path)
535 

The documentation for this class was generated from the following file:
GaudiPython.Pythonizations.__getitem__
__getitem__
Definition: Pythonizations.py:144
compareOutputFiles.par
par
Definition: compareOutputFiles.py:477