| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GaudiPython::Bindings::iEventSelector Class Reference

Inheritance diagram for GaudiPython::Bindings::iEventSelector:
[legend]
Collaboration diagram for GaudiPython::Bindings::iEventSelector:
[legend]
List of all members.

Public Member Functions

def __init__
def open
def rewind
def __init__
def retrieveInterface
def isValid
def getInterface
def __call_interface_method__
def __setattr__
def __getattr__
def properties
def name

Public Attributes

 Input

Static Public Attributes

tuple initialize = lambdaself:self.__call_interface_method__("_isvc","initialize")
tuple start = lambdaself:self.__call_interface_method__("_isvc","start")
tuple stop = lambdaself:self.__call_interface_method__("_isvc","stop")
tuple finalize = lambdaself:self.__call_interface_method__("_isvc","finalize")
tuple reinitialize = lambdaself:self.__call_interface_method__("_isvc","reinitialize")
tuple restart = lambdaself:self.__call_interface_method__("_isvc","restart")

Detailed Description

Definition at line 519 of file Bindings.py.


Member Function Documentation

def GaudiPython::Bindings::iEventSelector::__init__ (   self  ) 

Definition at line 520 of file Bindings.py.

00520                     :
00521     iService.__init__(self, 'EventSelector', Helper.service(gbl.Gaudi.svcLocator(),'EventSelector'))
00522     self.__dict__['g'] = AppMgr()
  def open(self, stream, typ = 'POOL_ROOT', opt = 'READ', sel = None, fun = None, collection = None ): 

def GaudiPython::Bindings::iEventSelector::open (   self,
  stream,
  typ = 'POOL_ROOT',
  opt = 'READ',
  sel = None,
  fun = None,
  collection = None 
)

Definition at line 523 of file Bindings.py.

00523                                                                                                      : 
00524     if typ == 'ROOT' :
00525       self.g.declSvcType('RootEvtCnvSvc','DbEventCnvSvc')
00526       self.g.service('RootEvtCnvSvc').DbType  = 'ROOT'
00527       self.g.createSvc('RootEvtCnvSvc')
00528       self.g.service('EventPersistencySvc').CnvServices = ['RootEvtCnvSvc']
00529     elif typ == 'POOL_ROOT':
00530       cacsvc = self.g.service('PoolDbCacheSvc')
00531       if hasattr(cacsvc, 'Dlls') : cacsvc.Dlls += ['lcg_RootStorageSvc', 'lcg_XMLCatalog']
00532       else :                       cacsvc.Dlls = ['lcg_RootStorageSvc', 'lcg_XMLCatalog']
00533       cacsvc.OutputLevel = 4
00534       cacsvc.DomainOpts    = [ 'Domain[ROOT_All].CLASS_VERSION=2 TYP=int',
00535                                'Domain[ROOT_Key].CLASS_VERSION=2 TYP=int',
00536                                'Domain[ROOT_Tree].CLASS_VERSION=2 TYP=int' ]
00537       cacsvc.DatabaseOpts  = ['']
00538       cacsvc.ContainerOpts = ['']
00539       self.g.createSvc('PoolDbCacheSvc')
00540       cnvSvcs = [('PoolRootEvtCnvSvc',     'POOL_ROOT'),
00541                  ('PoolRootTreeEvtCnvSvc', 'POOL_ROOTTREE'),
00542                  ('PoolRootKeyEvtCnvSvc',  'POOL_ROOTKEY')]
00543       for svc in cnvSvcs :
00544         self.g.declSvcType(svc[0], 'PoolDbCnvSvc')
00545         cnvsvc = self.g.service(svc[0])
00546         cnvsvc.DbType = svc[1]
00547       self.g.service('EventPersistencySvc').CnvServices = [ svc[0] for svc in cnvSvcs ]
00548       for svc in cnvSvcs : 
00549         self.g.createSvc(svc[0])
00550     self.g.service('EventDataSvc').RootCLID = 1
00551     if type(stream) != list : stream = [stream]
00552     fixpart = "TYP=\'%s\' OPT=\'%s\'" % ( typ, opt )
00553     if sel        : fixpart += " SEL=\'%s\'" % sel
00554     if fun        : fixpart += " FUN=\'%s\'" % fun
00555     if collection : fixpart += " COLLECTION=\'%s\'" % collection
00556     cstream = ["DATAFILE=\'%s\' %s" % ( s, fixpart) for s in stream]
00557     self.Input = cstream
00558     self.reinitialize()

def GaudiPython::Bindings::iEventSelector::rewind (   self  ) 

Definition at line 559 of file Bindings.py.

00559                   :
00560     # It is not possible to reinitialze EventSelector only 
00561     self.g.service('EventLoopMgr').reinitialize()
00562 
00563 #----AppMgr class--------------------------------------------------------------------- 
class AppMgr(iService) :

def GaudiPython::Bindings::iService::__init__ (   self,
  name,
  isvc = None 
) [inherited]

Reimplemented from GaudiPython::Bindings::iProperty.

Reimplemented in GaudiPython::Bindings::iDataSvc, GaudiPython::Bindings::iHistogramSvc, GaudiPython::Bindings::iNTupleSvc, GaudiPython::Bindings::iToolSvc, and GaudiPython::Bindings::iJobOptSvc.

Definition at line 247 of file Bindings.py.

00247                                          :
00248     iProperty.__init__(self, name, isvc )
00249     if isvc : self.__dict__['_isvc'] = InterfaceCast(gbl.IService)(isvc)
00250     else    : self.__dict__['_isvc'] = None
  def retrieveInterface(self) :

def GaudiPython::Bindings::iService::retrieveInterface (   self  )  [inherited]

Reimplemented from GaudiPython::Bindings::iProperty.

Definition at line 251 of file Bindings.py.

00251                               :
00252     isvc = Helper.service(self._svcloc,self._name)
00253     if isvc : iService.__init__(self, self._name, isvc)
  initialize   = lambda self : self.__call_interface_method__("_isvc","initialize")

def GaudiPython::Bindings::iService::isValid (   self  )  [inherited]

Definition at line 260 of file Bindings.py.

00260                     :
00261     if self._isvc: return True
00262     else :         return False
00263 
00264 #----iAlgorithm class--------------------------------------------------------------------- 
class iAlgorithm(iProperty) :

def GaudiPython::Bindings::iProperty::getInterface (   self  )  [inherited]

Definition at line 165 of file Bindings.py.

00165                          :
00166     if not self._ip : self.retrieveInterface()
00167     return self._ip
  def retrieveInterface(self) :

def GaudiPython::Bindings::iProperty::__call_interface_method__ (   self,
  ifname,
  method,
  args 
) [inherited]

Definition at line 170 of file Bindings.py.

00170                                                          :
00171     if not getattr(self,ifname) : self.retrieveInterface()
00172     return getattr(getattr(self,ifname),method)(*args)
  def __setattr__(self, name, value):

def GaudiPython::Bindings::iProperty::__setattr__ (   self,
  name,
  value 
) [inherited]

The method which is used for setting the property from the given value.
- In the case of the valid instance it sets the property through IProperty interface
- In the case of placeholder the property is added to JobOptionsCatalogue

Definition at line 173 of file Bindings.py.

00173                                     :
00174     """
00175     The method which is used for setting the property from the given value.
00176     - In the case of the valid instance it sets the property through IProperty interface
00177     - In the case of placeholder the property is added to JobOptionsCatalogue
00178     """
00179     if hasattr( value, 'toStringProperty' ):
00180       # user defined behaviour
00181       value = '%s' % value.toStringProperty()
00182     ip = self.getInterface()
00183     if ip :
00184       if not gbl.Gaudi.Utils.hasProperty ( ip , name ) :
00185         raise AttributeError, 'property %s does not exist' % name  
00186       prop = ip.getProperty(name)
00187       if not type( value ) == type( prop.value() ) :
00188         if not long  == type( value ) : value = '%s' % value
00189         else                          : value = '%d' % value
00190         if prop.fromString( value ).isFailure() :
00191           raise AttributeError, 'property %s could not be set from %s' % (name,value)  
00192       else :
00193         if not prop.setValue( value ) :
00194           raise AttributeError, 'property %s could not be set from %s' % (name,value)            
00195     else :
00196         if   type(value) == str : value = '"%s"' % value # need double quotes
00197         elif type(value) == long: value = '%d'   % value # prevent pending 'L'
00198         sp = StringProperty( name , str(value))
00199         self._optsvc.addPropertyToCatalogue( self._name , sp )
  def __getattr__(self, name ):

def GaudiPython::Bindings::iProperty::__getattr__ (   self,
  name 
) [inherited]

The method which returns the value for the given property
- In the case of the valid instance it returns the valid property value through IProperty interface
- In the case of placeholder the property value is retrieevd from JobOptionsCatalogue    

Definition at line 200 of file Bindings.py.

00200                               :
00201     """
00202     The method which returns the value for the given property
00203     - In the case of the valid instance it returns the valid property value through IProperty interface
00204     - In the case of placeholder the property value is retrieevd from JobOptionsCatalogue    
00205     """
00206     ip = self.getInterface()
00207     if ip :
00208       if not gbl.Gaudi.Utils.hasProperty ( ip , name ) :
00209         raise AttributeError, 'property %s does not exist' % name  
00210       prop = ip.getProperty(name)
00211       if   StringProperty    == type( prop )   : return prop.value() 
00212       elif StringPropertyRef == type( prop )   : return prop.value() 
00213       try:     return eval( prop.toString(), {}, {} )
00214       except : return p.value()
00215     else :
00216       props = self._optsvc.getProperties(self._name)
00217       for p in props :
00218         if not p.name() == name : continue
00219         # from JobOptionsSvc we always have only strings
00220         try:    return eval( p.value(), {}, {} )
00221         except: return p.value()
00222       raise AttributeError, 'property %s does not exist' % name  
  def properties(self):

def GaudiPython::Bindings::iProperty::properties (   self  )  [inherited]

Definition at line 223 of file Bindings.py.

00223                       :
00224     dct = {}
00225     props = None
00226     ip = self.getInterface()
00227     if ip :
00228       props = ip.getProperties()
00229       propsFrom = self._name # "interface"
00230     else:
00231       props = self._optsvc.getProperties( self._name )
00232       propsFrom = "jobOptionsSvc"
00233     if props:
00234       for p in props :
00235         try:
00236           dct[p.name()] = PropertyEntry(p)
00237         except (ValueError,TypeError),e:
00238           raise ValueError, "gaudimodule.iProperty.properties(): %s%s processing property %s.%s = %s" % \
00239                 (e.__class__.__name__, e.args, propsFrom, p.name(), p.value())
00240     return dct
  def name(self) :

def GaudiPython::Bindings::iProperty::name (   self  )  [inherited]

Reimplemented in GaudiPython::Bindings::iAlgTool.

Definition at line 241 of file Bindings.py.

00241                  :
00242     return self._name
00243 
00244 #----iService class--------------------------------------------------------------------- 
class iService(iProperty) :


Member Data Documentation

GaudiPython::Bindings::iEventSelector::Input

Definition at line 557 of file Bindings.py.

tuple GaudiPython::Bindings::iService::initialize = lambdaself:self.__call_interface_method__("_isvc","initialize") [static, inherited]

Definition at line 254 of file Bindings.py.

tuple GaudiPython::Bindings::iService::start = lambdaself:self.__call_interface_method__("_isvc","start") [static, inherited]

Definition at line 255 of file Bindings.py.

tuple GaudiPython::Bindings::iService::stop = lambdaself:self.__call_interface_method__("_isvc","stop") [static, inherited]

Definition at line 256 of file Bindings.py.

tuple GaudiPython::Bindings::iService::finalize = lambdaself:self.__call_interface_method__("_isvc","finalize") [static, inherited]

Definition at line 257 of file Bindings.py.

tuple GaudiPython::Bindings::iService::reinitialize = lambdaself:self.__call_interface_method__("_isvc","reinitialize") [static, inherited]

Definition at line 258 of file Bindings.py.

tuple GaudiPython::Bindings::iService::restart = lambdaself:self.__call_interface_method__("_isvc","restart") [static, inherited]

Definition at line 259 of file Bindings.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:58:58 2011 for GaudiPython by doxygen 1.4.7