/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
DataSvc::DataSvcConfigure Class Reference

List of all members.

Public Member Functions

def __init__
def applyArgs
def setCableSvc
def setSimDataSvc
def setCalibDataSvc
def setFeeCableMap
def setPmtSimData
def setFeeSimData
def setPmtCalibData
def setFeeCalibData

Public Attributes

 cableSvc
 simDataSvc
 calibDataSvc

Detailed Description

Setup configuration for DataSvc.

Definition at line 7 of file __init__.py.


Constructor & Destructor Documentation

def DataSvc::DataSvcConfigure::__init__ (   self)
Setup default configuration of DataSvc.

Definition at line 13 of file __init__.py.

00014                       :
00015         '''
00016         Setup default configuration of DataSvc.
00017         '''
00018         cableSvcName = "StaticCableSvc"
00019         simDataSvcName = "StaticSimDataSvc"
00020         calibDataSvcName = "StaticCalibDataSvc"
00021         #feeCableMapPath = '$DATASVCROOT/share/feeCableMap.txt'
00022         feeCableMapPath = ''
00023         pmtSimDataPath = '$DATASVCROOT/share/pmtDataTable.txt'
00024         feeSimDataPath = '$DATASVCROOT/share/feeDataTable.txt'
00025         pmtCalibDataPath = '$DATASVCROOT/share/pmtCalibTable.txt'
00026         feeCalibDataPath = '$DATASVCROOT/share/feeCalibTable.txt'
00027 
00028         self.setCableSvc( cableSvcName )
00029         self.setFeeCableMap( feeCableMapPath )
00030 
00031         self.setSimDataSvc( simDataSvcName )
00032         self.setPmtSimData( pmtSimDataPath )
00033         self.setFeeSimData( feeSimDataPath )
00034 
00035         self.setCalibDataSvc( calibDataSvcName )
00036         self.setPmtCalibData( pmtCalibDataPath )
00037         self.setFeeCalibData( feeCalibDataPath )
00038         return


Member Function Documentation

def DataSvc::DataSvcConfigure::applyArgs (   self,
  args,
  kwd 
)
Generic function for setting members based on arguments 

Definition at line 39 of file __init__.py.

00040                                 :
00041         ''' Generic function for setting members based on arguments '''
00042         memberNames = kwd.keys()
00043         # I could use some python tricks to shorten this, but then no
00044         # one would understand it.
00045         for member in memberNames:
00046             value = kwd[member]
00047             if member == "cableSvc":
00048                 self.setCableSvc( value )
00049             elif member == "simDataSvc":
00050                 self.setSimDataSvc( value )
00051             elif member == "calibDataSvc":
00052                 self.setCalibDataSvc( value )
00053             elif member == "feeCableMapPath":
00054                 self.setFeeCableMap( value )
00055             elif member == "pmtSimDataPath":
00056                 self.setPmtSimData( value )
00057             elif member == "feeSimDataPath":
00058                 self.setFeeSimData( value )
00059             elif member == "pmtCalibDataPath":
00060                 self.setPmtCalibData( value )
00061             elif member == "feeCalibDataPath":
00062                 self.setFeeCalibData( value )
00063             else:
00064                 print "Error: DataSvc: Unknown option \"%s\"" % (member)

def DataSvc::DataSvcConfigure::setCableSvc (   self,
  cableSvcName 
)

Definition at line 65 of file __init__.py.

00066                                        :
00067         if cableSvcName == "StaticCableSvc":
00068             from DataSvc.DataSvcConf import StaticCableSvc
00069             self.cableSvc = StaticCableSvc()
00070         elif cableSvcName == "DbiCableSvc":
00071             from DbiDataSvc.DbiDataSvcConf import DbiCableSvc
00072             self.cableSvc = DbiCableSvc()
00073         else:
00074             print "Error: DataSvc: Unknown cable service \"%s\"" % (
00075                                                                    cableSvcName)

def DataSvc::DataSvcConfigure::setSimDataSvc (   self,
  simDataSvcName 
)

Definition at line 76 of file __init__.py.

00077                                            :
00078         if simDataSvcName == "StaticSimDataSvc":
00079             from DataSvc.DataSvcConf import StaticSimDataSvc
00080             self.simDataSvc = StaticSimDataSvc()
00081         elif simDataSvcName == "DbiSimDataSvc":
00082             from DbiDataSvc.DbiDataSvcConf import DbiSimDataSvc
00083             self.simDataSvc = DbiSimDataSvc()
00084         else:
00085             print "Error: DataSvc: Unknown sim data service \"%s\"" % (
00086                                                                  simDataSvcName)

def DataSvc::DataSvcConfigure::setCalibDataSvc (   self,
  calibDataSvcName 
)

Definition at line 87 of file __init__.py.

00088                                                :
00089         print 'setCalibDataSvc(',calibDataSvcName,')'
00090         if calibDataSvcName == "StaticCalibDataSvc":
00091             from DataSvc.DataSvcConf import StaticCalibDataSvc
00092             self.calibDataSvc = StaticCalibDataSvc()
00093         elif calibDataSvcName == "DbiCalibDataSvc":
00094             from DbiDataSvc.DbiDataSvcConf import DbiCalibDataSvc
00095             self.calibDataSvc = DbiCalibDataSvc()
00096         else:
00097             print "Error: DataSvc: Unknown calib data service \"%s\"" % (
00098                                                                calibDataSvcName)
                
def DataSvc::DataSvcConfigure::setFeeCableMap (   self,
  feeCableMapPath 
)
Set the FEE/PMT/Hardware cable connections data file

Definition at line 99 of file __init__.py.

00100                                              :
00101         ''' Set the FEE/PMT/Hardware cable connections data file''' 
00102         #self.cableSvc.FeeCableMap = realpath( feeCableMapPath )
00103         self.cableSvc.FeeCableMap = feeCableMapPath
00104         return

def DataSvc::DataSvcConfigure::setPmtSimData (   self,
  pmtSimDataPath 
)
Set the simulation input parameter data file

Definition at line 105 of file __init__.py.

00106                                            :
00107         ''' Set the simulation input parameter data file''' 
00108         self.simDataSvc.PmtDataFile = realpath( pmtSimDataPath )
00109         return

def DataSvc::DataSvcConfigure::setFeeSimData (   self,
  feeSimDataPath 
)
Set the simulation input parameter data file

Definition at line 110 of file __init__.py.

00111                                            :
00112         ''' Set the simulation input parameter data file''' 
00113         self.simDataSvc.FeeDataFile = realpath( feeSimDataPath )
00114         return

def DataSvc::DataSvcConfigure::setPmtCalibData (   self,
  pmtCalibDataPath 
)
Set the calibration input parameter data file

Definition at line 115 of file __init__.py.

00116                                                :
00117         ''' Set the calibration input parameter data file''' 
00118         print 'DataSvc.Configure',self.__doc__,pmtCalibDataPath
00119         self.calibDataSvc.PmtDataFile = realpath( pmtCalibDataPath )
00120         return

def DataSvc::DataSvcConfigure::setFeeCalibData (   self,
  feeCalibDataPath 
)
Set the calibration input parameter data file

Definition at line 121 of file __init__.py.

00122                                                :
00123         ''' Set the calibration input parameter data file''' 
00124         self.calibDataSvc.FeeDataFile = realpath( feeCalibDataPath )
00125         return


Member Data Documentation

Definition at line 65 of file __init__.py.

Definition at line 76 of file __init__.py.

Definition at line 87 of file __init__.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:59:24 for DataSvc by doxygen 1.7.4