/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
AllDataExample::AllDataExample Class Reference
Inheritance diagram for AllDataExample::AllDataExample:
Inheritance graph
[legend]
Collaboration diagram for AllDataExample::AllDataExample:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize
def __init__
def initialize
def execute
def finalize
def verbose
def debug
def info
def warning
def error
def fatal
def getAES
def initializeHeader
def finalizeHeader

Public Attributes

 msgSvc
 archiveSvc
 stats
 defaultInputLocation
 execNumber
 currentJobId

Detailed Description

Definition at line 17 of file AllDataExample.py.


Constructor & Destructor Documentation

def AllDataExample::AllDataExample::__init__ (   self,
  name 
)

Definition at line 19 of file AllDataExample.py.

00020                                :
00021                 DybPythonAlg.__init__(self,name) 
00022                 print "Setting up the protons test algorithm: ",self.name()
00023                 return


Member Function Documentation

def AllDataExample::AllDataExample::initialize (   self)

Definition at line 24 of file AllDataExample.py.

00025                             :
00026                 status = DybPythonAlg.initialize(self)
00027                 print "Initializing",self.name()
00028                 if status.isFailure(): 
00029                         print "Didn't get DybPythonAlg ",self.name()
00030                         return status
00031 
00032                 targetProtonsSvc = self.svc("ITargetProtonsSvc","TargetProtonsSvc")
00033 
00034 
00035                 # First, check on the liquid masses:
00036                 adMasses = targetProtonsSvc.getAdMasses()
00037                 #for i in range(1,6):
00038                 i=1 # i should be a physical Ad number
00039                 print " AdMassData for Ad# ", i
00040                 print "GdLS mass [kg]:          ", adMasses.m_gdMass[i]
00041                 print "GdLS mass rel. err. [kg]:", adMasses.m_gdMassErr_rel[i]
00042                 print "GdLS mass abs. err. [kg]:", adMasses.m_gdMassErr_abs[i]
00043                 #print "GdLS mass blind?                ", adMasses.m_gdMassBlinded[i]
00044                 #print "GdLS mass ratio blind?  ", adMasses.m_gdMassRatioBlinded[i]
00045                 print "LS mass [kg]:            ", adMasses.m_lsMass[i]
00046                 print "LS mass error [kg]:      ", adMasses.m_lsMassErr[i]
00047                 print "MO mass [kg]:            ", adMasses.m_moMass[i]
00048                 print "MO mass error [kg]:      ", adMasses.m_moMassErr[i]
00049 
00050                 adPConc = targetProtonsSvc.getAdPConcentration()
00051                 #for i in range(1,6):
00052                 i=1
00053                 print " AdPConcentrationData for Ad# ", i
00054                 print "GdLS protons/kg:         ", adPConc.m_pPerKg[i]
00055                 print "GdLS protons/kg rel. err.", adPConc.m_pPerKgErr_rel[i]
00056                 print "GdLS protons/kg abs. err.", adPConc.m_pPerKgErr_abs[i]
00057                 print "GdLS density [kg/m^3]:   ", adPConc.m_gdDensity[i]
00058                 print "GdLS density abs. err.   ", adPConc.m_gdDensityErr_abs[i]
00059                 # Check on overflow tank heights (measured from tank interior bottom)
00060 
00061                 # Set up a context for acquiring OF tank information
00062                 context = gbl.Context()
00063                 #context.SetTimeStamp(gbl.TimeStamp(2011, 7, 14, 15, 15, 0))
00064                 context.SetTimeStamp(gbl.TimeStamp(2011, 11, 15, 15, 15, 0))
00065                 #context.SetTimeStamp(gbl.TimeStamp(2011,6, 13, 17, 8, 0))
00066                 context.SetSimFlag(gbl.SimFlag.kData)
00067                 context.SetSite(gbl.Site.kDayaBay)
00068                 context.SetDetId(gbl.DetectorId.kAD1)
00069                 svcMode = gbl.ServiceMode(context,0)
00070 
00071                 #Note: the index should match the detector in the context above
00072                 i=1
00073                 ofHeights = targetProtonsSvc.getOFHeights(svcMode)
00074                 print "GdLS OF height [m]:      ", ofHeights.m_gdHeight[i]
00075                 print "GdLS OF height err [m]:  ", ofHeights.m_gdHeightErr[i]
00076                 print "LS OF height [m]:        ", ofHeights.m_lsHeight[i]
00077                 print "LS OF height err [m]:    ", ofHeights.m_lsHeightErr[i]
00078                 print "MO OF height [m]:        ", ofHeights.m_moHeight[i]
00079                 print "MO OF height err [m]:    ", ofHeights.m_moHeightErr[i]
00080 
00081                 #Note: the index of this should also match the detector in the context above
00082                 ofMasses = targetProtonsSvc.getOFMasses(svcMode)
00083                 print "GdLS OF mass [kg]:               ", ofMasses.m_gdOFMass[i]
00084                 print "GdLS OF mass rel. err. [kg]:     ", ofMasses.m_gdOFMassErr_rel[i]
00085                 print "GdLS OF mass abs. err. [kg]:     ", ofMasses.m_gdOFMassErr_abs[i]
00086                 print "LS OF mass [kg]:                 ", ofMasses.m_lsOFMass[i]
00087                 print "LS OF mass err. [kg]:            ", ofMasses.m_lsOFMassErr[i]
00088                 print "MO OF mass [kg]:                 ", ofMasses.m_moOFMass[i]
00089                 print "MO OF mass err [kg]:             ", ofMasses.m_moOFMassErr[i]
00090 
00091                 # This is a small factor used in the target mass/proton calculation and
00092                 # hard coded into the service
00093                 print "Bellows and stub volume [m^3]:   ", targetProtonsSvc.getBellowsVolume()
00094                 print "Bellows and stub vol err [m^3]:  ", targetProtonsSvc.getBellowsVolumeErr()
00095 
00096                 protonNumber = targetProtonsSvc.getProtonNumber(svcMode)
00097                 print "Target Protons:          ", protonNumber.protonNumber
00098                 print "Relative Err:            ", protonNumber.protonNumberErr_rel
00099                 print "Absolute Err:            ", protonNumber.protonNumberErr_abs
00100                 print "Target Mass:             ", protonNumber.targetMass
00101                 print "Relative Mass Err:       ", protonNumber.targetMassErr_rel       
00102                 print "Absolute Mass Err:       ", protonNumber.targetMassErr_abs       
00103                 
00104                 return SUCCESS
00105 

def AllDataExample::AllDataExample::execute (   self)

Definition at line 106 of file AllDataExample.py.

00107                          :
00108                 return SUCCESS

def AllDataExample::AllDataExample::finalize (   self)

Definition at line 109 of file AllDataExample.py.

00110                           :
00111                 status = DybPythonAlg.finalize(self)
00112                 return status


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:58:04 for TargetProtonsSvc by doxygen 1.7.4