/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Private Member Functions | Static Private Attributes
DybPython::iStatsSvc::iStatsSvc Class Reference

List of all members.

Public Member Functions

def __init__
def isInitialized
def initialize
def __setitem__
def __getitem__

Public Attributes

 alg
 defaultPath
 data

Private Member Functions

def _key2path

Static Private Attributes

 _statsSvc = None

Detailed Description

Definition at line 8 of file iStatsSvc.py.


Constructor & Destructor Documentation

def DybPython::iStatsSvc::iStatsSvc::__init__ (   self,
  alg,
  path = "" 
)

Definition at line 11 of file iStatsSvc.py.

00012                                       :
00013         self.alg = alg # Reference to the algorithm which created this handle
00014         self.defaultPath = path   # Default path for this algorithm
00015         self.data = {}  # Shortcuts to items in StatisticsSvc for this alg
00016         return


Member Function Documentation

def DybPython::iStatsSvc::iStatsSvc::isInitialized (   self)

Definition at line 17 of file iStatsSvc.py.

00018                            :
00019         if self.__class__._statsSvc == None:
00020             return False
00021         return True

def DybPython::iStatsSvc::iStatsSvc::initialize (   self)

Definition at line 22 of file iStatsSvc.py.

00023                         :
00024         if not self.isInitialized():
00025             statsSvc = self.alg.svc("IStatisticsSvc","StatisticsSvc")
00026             if statsSvc == None:
00027                 self.alg.error("Failed to initialize statistics service")
00028             else:
00029                 # Initialize for all instances of iStatsSvc
00030                 self.__class__._statsSvc = statsSvc
00031         return
    
def DybPython::iStatsSvc::iStatsSvc::_key2path (   self,
  key 
) [private]

Definition at line 32 of file iStatsSvc.py.

00033                            :
00034         if key[0] != '/': 
00035             key = self.defaultPath + '/' + key
00036         return key

def DybPython::iStatsSvc::iStatsSvc::__setitem__ (   self,
  key,
  value 
)

Definition at line 37 of file iStatsSvc.py.

00038                                    :
00039         self.alg.debug('iStatsSvc.__setitem__(%s,%s)'%(key,value))
00040         if not self.isInitialized(): self.initialize() 
00041         key = self._key2path(key)
00042         if self.data.has_key(key):
00043             raise KeyError, 'key "%s" already set'%key
00044         self.__class__._statsSvc.put(key,value)
00045         self.data[key] = value
00046         return

def DybPython::iStatsSvc::iStatsSvc::__getitem__ (   self,
  key 
)

Definition at line 47 of file iStatsSvc.py.

00048                              :
00049         self.alg.debug('iStatsSvc.__getitem__(%s)'%(key))
00050         if not self.isInitialized(): self.initialize()
00051         key = self._key2path(key)
00052         if self.data.has_key(key):
00053             return self.data[self._key2path(key)]
00054         return self.__class__._statsSvc.get(key)

Member Data Documentation

Definition at line 10 of file iStatsSvc.py.

Definition at line 11 of file iStatsSvc.py.

Definition at line 11 of file iStatsSvc.py.

Definition at line 11 of file iStatsSvc.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 Fri May 16 2014 09:55:41 for DybPython by doxygen 1.7.4