The Gaudi Framework  v36r13 (995e4364)
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 522 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 523 of file Bindings.py.

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

Member Function Documentation

◆ __delitem__()

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

Definition at line 604 of file Bindings.py.

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

◆ __getitem__()

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

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

Definition at line 594 of file Bindings.py.

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

◆ __setitem__()

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

Definition at line 599 of file Bindings.py.

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

◆ clearStore()

def GaudiPython.Bindings.iDataSvc.clearStore (   self)

Definition at line 673 of file Bindings.py.

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

◆ dump()

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

Definition at line 618 of file Bindings.py.

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

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

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

◆ getHistoNames()

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

Definition at line 649 of file Bindings.py.

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

◆ getList()

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

Definition at line 630 of file Bindings.py.

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

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

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

◆ leaves()

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

Definition at line 609 of file Bindings.py.

609  def leaves(self, node=cppyy.nullptr):
610  if node == cppyy.nullptr:
611  node = self.retrieveObject("")
612  ll = gbl.std.vector("IRegistry*")()
613  if isinstance(node, str):
614  _ = self.retrieveObject(node)
615  if self._idm.objectLeaves(node, ll).isSuccess():
616  return ll
617 

◆ registerObject()

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

Definition at line 528 of file Bindings.py.

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

◆ retrieveObject()

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

Definition at line 542 of file Bindings.py.

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

◆ setRoot()

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

Definition at line 668 of file Bindings.py.

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

◆ unregisterObject()

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

Definition at line 535 of file Bindings.py.

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

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:486