/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
TestTargetProtonsSvc::TestTargetProtonsSvc Class Reference
Inheritance diagram for TestTargetProtonsSvc::TestTargetProtonsSvc:
Inheritance graph
[legend]
Collaboration diagram for TestTargetProtonsSvc::TestTargetProtonsSvc:
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 8 of file TestTargetProtonsSvc.py.


Constructor & Destructor Documentation

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

Definition at line 10 of file TestTargetProtonsSvc.py.

00011                                :
00012                 DybPythonAlg.__init__(self,name) 
00013                 print "Setting up the protons test algorithm: ",self.name()
00014                 return


Member Function Documentation

def TestTargetProtonsSvc::TestTargetProtonsSvc::initialize (   self)

Definition at line 15 of file TestTargetProtonsSvc.py.

00016                             :
00017                 status = DybPythonAlg.initialize(self)
00018                 print "Initializing TestTargetProtonsSvc",self.name()
00019                 if status.isFailure(): 
00020                         print "Didn't get DybPythonAlg ",self.name()
00021                         return status
00022 
00023                 targetProtonsSvc = self.svc("ITargetProtonsSvc","TargetProtonsSvc")
00024 
00025                 context = gbl.Context()
00026 
00027                 test_time = gbl.TimeStamp()
00028                 test_time.Subtract(3600.*24.) # To check that scraper got data from yesterday
00029                 context.SetTimeStamp(test_time)
00030                 context.SetSimFlag(gbl.SimFlag.kData)
00031                 context.SetSite(gbl.Site.kDayaBay)
00032                 context.SetDetId(gbl.DetectorId.kAD1)
00033                 svcMode = gbl.ServiceMode(context,0)
00034 
00035                 ofHeights = targetProtonsSvc.getOFHeights(svcMode)
00036                 print "AD1 gdLS OF height: ", ofHeights.m_gdHeight[1]
00037                 if (ofHeights.m_gdHeight[1] < 0):
00038                         print "No lid sensor data from time: ", test_time.AsString()
00039                         return FAILURE
00040 
00041                 protonNumber = targetProtonsSvc.getProtonNumber(svcMode)
00042                 print "Target Protons: ", protonNumber.protonNumber
00043                 print "Relative Err: ", protonNumber.protonNumberErr_rel
00044                 print "Target Mass: ", protonNumber.targetMass
00045                 print "Relative Mass Err: ", protonNumber.targetMassErr_rel     
00046 
00047                 context.SetDetId(gbl.DetectorId.kAD2)
00048                 svcMode = gbl.ServiceMode(context,0)
00049                 protonNumber = targetProtonsSvc.getProtonNumber(svcMode)
00050                 print "Target Protons: ", protonNumber.protonNumber
00051                 print "Relative Err: ", protonNumber.protonNumberErr_rel
00052                 print "Target MAss: ", protonNumber.targetMass
00053                 print "Relative Mass Err: ", protonNumber.targetMassErr_rel
00054 
00055                 #Select a context for which no data
00056                 context.SetTimeStamp(gbl.TimeStamp(2011, 6, 13, 18, 8, 0))
00057 
00058                 svcMode = gbl.ServiceMode(context,0)
00059                 protonNumber = targetProtonsSvc.getProtonNumber(svcMode)
00060                 print "Target Protons: ", protonNumber.protonNumber
00061                 print "Relative Err: ", protonNumber.protonNumberErr_rel
00062                 print "Target Mass: ", protonNumber.targetMass
00063                 print "Relative Mass Err: ", protonNumber.targetMassErr_rel
00064 
00065                 return SUCCESS
00066 

def TestTargetProtonsSvc::TestTargetProtonsSvc::execute (   self)

Definition at line 67 of file TestTargetProtonsSvc.py.

00068                          :
00069                 return SUCCESS

def TestTargetProtonsSvc::TestTargetProtonsSvc::finalize (   self)

Definition at line 70 of file TestTargetProtonsSvc.py.

00071                           :
00072                 status = DybPythonAlg.finalize(self)
00073                 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