The Gaudi Framework  v36r9p1 (5c15b2bb)
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 524 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 525 of file Bindings.py.

525  def __init__(self, name, idp):
526  iService.__init__(self, name, idp)
527  self.__dict__["_idp"] = InterfaceCast(gbl.IDataProviderSvc)(idp)
528  self.__dict__["_idm"] = InterfaceCast(gbl.IDataManagerSvc)(idp)
529 

Member Function Documentation

◆ __delitem__()

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

Definition at line 606 of file Bindings.py.

606  def __delitem__(self, path):
607  if not self._idp:
608  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
609  return self.unregisterObject(path)
610 

◆ __getitem__()

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

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

Definition at line 596 of file Bindings.py.

596  def __getitem__(self, path):
597  if not self._idp:
598  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
599  return Helper.dataobject(self._idp, path)
600 

◆ __setitem__()

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

Definition at line 601 of file Bindings.py.

601  def __setitem__(self, path, obj):
602  if not self._idp:
603  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
604  return self.registerObject(path, obj)
605 

◆ clearStore()

def GaudiPython.Bindings.iDataSvc.clearStore (   self)

Definition at line 677 of file Bindings.py.

677  def clearStore(self):
678  if not self._idm:
679  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
680  return self._idm.clearStore()
681 
682 
683 # ----iHistogramSvc class------------------------------------------------------

◆ dump()

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

Definition at line 622 of file Bindings.py.

622  def dump(self, node=cppyy.nullptr):
623  if node == cppyy.nullptr:
624  root = self.retrieveObject("")
625  if root:
626  node = root.registry()
627  else:
628  return
629  print(node.identifier())
630  if node.object():
631  for l in self.leaves(node):
632  self.dump(l)
633 

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

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

◆ getHistoNames()

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

Definition at line 653 of file Bindings.py.

653  def getHistoNames(self, node=cppyy.nullptr, lst=[]):
654  if node == cppyy.nullptr:
655  root = self.retrieveObject("")
656  if root:
657  node = root.registry()
658  # rootFID = node.address().par()
659  lst = []
660  else:
661  return
662  Helper.dataobject(self._idp, node.identifier())
663  if node.object():
664  lst.append(node.identifier())
665  for l in self.leaves(node):
666  if l.name(): # and l.address().par() == rootFID :
667  self.getHistoNames(l, lst)
668  else:
669  continue
670  return lst
671 

◆ getList()

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

Definition at line 634 of file Bindings.py.

634  def getList(self, node=cppyy.nullptr, lst=[], rootFID=None):
635  if node == cppyy.nullptr:
636  root = self.retrieveObject("")
637  if root:
638  node = root.registry()
639  rootFID = node.address().par()
640  lst = []
641  else:
642  return
643  Helper.dataobject(self._idp, node.identifier())
644  if node.object():
645  lst.append(node.identifier())
646  for l in self.leaves(node):
647  if l.address() and l.address().par() == rootFID:
648  self.getList(l, lst, rootFID)
649  else:
650  continue
651  return lst
652 

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

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

◆ leaves()

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

Definition at line 611 of file Bindings.py.

611  def leaves(self, node=cppyy.nullptr):
612  if node == cppyy.nullptr:
613  node = self.retrieveObject("")
614  ll = gbl.std.vector("IRegistry*")()
615  if type(node) is str:
616  obj = self.retrieveObject(node)
617  else:
618  obj = node
619  if self._idm.objectLeaves(node, ll).isSuccess():
620  return ll
621 

◆ registerObject()

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

Definition at line 530 of file Bindings.py.

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

◆ retrieveObject()

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

Definition at line 544 of file Bindings.py.

544  def retrieveObject(self, path):
545  if not self._idp:
546  return cppyy.nullptr
547  return Helper.dataobject(self._idp, path)
548 

◆ setRoot()

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

Definition at line 672 of file Bindings.py.

672  def setRoot(self, name, obj):
673  if not self._idm:
674  raise IndexError("C++ service %s does not exist" % self.__dict__["_name"])
675  return self._idm.setRoot(name, obj)
676 

◆ unregisterObject()

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

Definition at line 537 of file Bindings.py.

537  def unregisterObject(self, path):
538  if not self._idp:
539  raise AttributeError(
540  "C++ service %s does not exist" % self.__dict__["_name"]
541  )
542  return Helper.unregisterObject(self._idp, path)
543 

The documentation for this class was generated from the following file:
GaudiPython.Pythonizations.__getitem__
__getitem__
Definition: Pythonizations.py:144
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:483
gaudirun.type
type
Definition: gaudirun.py:160