The Gaudi Framework  v36r1 (3e2fb5a8)
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 492 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 493 of file Bindings.py.

493  def __init__(self, name, idp):
494  iService.__init__(self, name, idp)
495  self.__dict__['_idp'] = InterfaceCast(gbl.IDataProviderSvc)(idp)
496  self.__dict__['_idm'] = InterfaceCast(gbl.IDataManagerSvc)(idp)
497 

Member Function Documentation

◆ __delitem__()

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(
579  'C++ service %s does not exist' % self.__dict__['_name'])
580  return self.unregisterObject(path)
581 

◆ __getitem__()

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

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

Definition at line 564 of file Bindings.py.

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

◆ __setitem__()

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(
573  'C++ service %s does not exist' % self.__dict__['_name'])
574  return self.registerObject(path, obj)
575 

◆ clearStore()

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(
652  'C++ service %s does not exist' % self.__dict__['_name'])
653  return self._idm.clearStore()
654 
655 
656 # ----iHistogramSvc class------------------------------------------------------

◆ dump()

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

Definition at line 593 of file Bindings.py.

593  def dump(self, node=cppyy.nullptr):
594  if node == cppyy.nullptr:
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 

◆ 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 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(
532  'C++ service %s does not exist' % self.__dict__['_name'])
533  return Helper.findobject(self._idp, path)
534 

◆ getHistoNames()

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

Definition at line 624 of file Bindings.py.

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

◆ getList()

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

Definition at line 605 of file Bindings.py.

605  def getList(self, node=cppyy.nullptr, lst=[], rootFID=None):
606  if node == cppyy.nullptr:
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 

◆ 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 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(
561  'C++ service %s does not exist' % self.__dict__['_name'])
562  return Helper.getobject(self._idp, path, *args)
563 

◆ leaves()

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

Definition at line 582 of file Bindings.py.

582  def leaves(self, node=cppyy.nullptr):
583  if node == cppyy.nullptr:
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 

◆ registerObject()

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

Definition at line 498 of file Bindings.py.

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

◆ retrieveObject()

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

Definition at line 510 of file Bindings.py.

510  def retrieveObject(self, path):
511  if not self._idp:
512  return cppyy.nullptr
513  return Helper.dataobject(self._idp, path)
514 

◆ setRoot()

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(
646  'C++ service %s does not exist' % self.__dict__['_name'])
647  return self._idm.setRoot(name, obj)
648 

◆ unregisterObject()

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

Definition at line 504 of file Bindings.py.

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

The documentation for this class was generated from the following file:
GaudiPython.Pythonizations.__getitem__
__getitem__
Definition: Pythonizations.py:127
compareOutputFiles.par
string par
Definition: compareOutputFiles.py:477
gaudirun.type
type
Definition: gaudirun.py:154