The Gaudi Framework  v36r11 (bdb84f5f)
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 523 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 524 of file Bindings.py.

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

Member Function Documentation

◆ __delitem__()

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

Definition at line 605 of file Bindings.py.

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

◆ __getitem__()

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

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

Definition at line 595 of file Bindings.py.

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

◆ __setitem__()

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

Definition at line 600 of file Bindings.py.

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

◆ clearStore()

def GaudiPython.Bindings.iDataSvc.clearStore (   self)

Definition at line 676 of file Bindings.py.

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

◆ dump()

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

Definition at line 621 of file Bindings.py.

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

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

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

◆ getHistoNames()

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

Definition at line 652 of file Bindings.py.

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

◆ getList()

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

Definition at line 633 of file Bindings.py.

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

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

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

◆ leaves()

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

Definition at line 610 of file Bindings.py.

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

◆ registerObject()

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

Definition at line 529 of file Bindings.py.

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

◆ retrieveObject()

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

Definition at line 543 of file Bindings.py.

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

◆ setRoot()

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

Definition at line 671 of file Bindings.py.

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

◆ unregisterObject()

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

Definition at line 536 of file Bindings.py.

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

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