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

 startTime
 endTime
 time
 tmass1
 tmasse1
 tmass2
 tmasse2
 tmass3
 tmasse3
 tmass4
 tmasse4
 tmass5
 tmasse5
 tmass6
 tmasse6
 tmass7
 tmasse7
 tmass8
 tmasse8
 temp1
 temp2
 temp3
 temp4
 temp5
 temp6
 temp7
 temp8
 tp
 lsmass1
 lsmasse1
 lsmass2
 lsmasse2
 timeStamp
 endTimeStamp
 msgSvc
 archiveSvc
 stats
 defaultInputLocation
 execNumber
 currentJobId

Detailed Description

Definition at line 17 of file GetProtonsOverTime.py.


Constructor & Destructor Documentation

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

Definition at line 19 of file GetProtonsOverTime.py.

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


Member Function Documentation

def GetProtonsOverTime::TestTargetProtonsSvc::initialize (   self)

Definition at line 26 of file GetProtonsOverTime.py.

00027                             :
00028                 status = DybPythonAlg.initialize(self)
00029                 print "Initializing TestTargetProtonsSvc",self.name()
00030                 if status.isFailure(): 
00031                         print "Didn't get DybPythonAlg ",self.name()
00032                         return status
00033 
00034                 targetProtonsSvc = self.svc("ITargetProtonsSvc","TargetProtonsSvc")
00035                 statsSvc = self.svc('IStatisticsSvc','StatisticsSvc')
00036 
00037                 self.time = array('f',[0.])
00038                 self.tmass1 = array('f',[0.])
00039                 self.tmasse1 = array('f',[0.])
00040                 self.tmass2 = array('f',[0.])
00041                 self.tmasse2 = array('f',[0.])
00042                 self.tmass3 = array('f',[0.])
00043                 self.tmasse3 = array('f',[0.])
00044                 self.tmass4 = array('f',[0.])
00045                 self.tmasse4 = array('f',[0.])
00046                 self.tmass5 = array('f',[0.])
00047                 self.tmasse5 = array('f',[0.])
00048                 self.tmass6 = array('f',[0.])
00049                 self.tmasse6 = array('f',[0.])
00050                 self.tmass7 = array('f',[0.])
00051                 self.tmasse7 = array('f',[0.])
00052                 self.tmass8 = array('f',[0.])
00053                 self.tmasse8 = array('f',[0.])
00054                 self.temp1 = array('f',[0.])
00055                 self.temp2 = array('f',[0.])
00056                 self.temp3 = array('f',[0.])
00057                 self.temp4 = array('f',[0.])
00058                 self.temp5 = array('f',[0.])
00059                 self.temp6 = array('f',[0.])
00060                 self.temp7 = array('f',[0.])
00061                 self.temp8 = array('f',[0.])
00062                 self.tp = array('f',[0.])
00063                 self.lsmass1 = array('f',[0.])
00064                 self.lsmasse1 = array('f',[0.])
00065                 self.lsmass2 = array('f',[0.])
00066                 self.lsmasse2 = array('f',[0.])
00067                 
00068                 mytree = TTree("tree","Tree")
00069                 mytree.Branch("time", self.time, "time/F")
00070                 mytree.Branch("tmass1", self.tmass1, "tmass1/F")
00071                 mytree.Branch("tmasse1", self.tmasse1, "tmasse1/F")
00072                 mytree.Branch("tmass2", self.tmass2, "tmass2/F")
00073                 mytree.Branch("tmasse2", self.tmasse2, "tmasse2/F")
00074                 mytree.Branch("tmass3", self.tmass3, "tmass3/F")
00075                 mytree.Branch("tmasse3", self.tmasse3, "tmasse3/F")
00076                 mytree.Branch("tmass4", self.tmass4, "tmass4/F")
00077                 mytree.Branch("tmasse4", self.tmasse4, "tmasse4/F")
00078                 mytree.Branch("tmass5", self.tmass5, "tmass5/F")
00079                 mytree.Branch("tmasse5", self.tmasse5, "tmasse5/F")
00080                 mytree.Branch("tmass6", self.tmass6, "tmass6/F")
00081                 mytree.Branch("tmasse6", self.tmasse6, "tmasse6/F")
00082                 mytree.Branch("tmass7", self.tmass7, "tmass7/F")
00083                 mytree.Branch("tmasse7", self.tmasse7, "tmasse7/F")
00084                 mytree.Branch("tmass8", self.tmass8, "tmass8/F")
00085                 mytree.Branch("tmasse8", self.tmasse8, "tmasse8/F")
00086                 mytree.Branch("temp1", self.temp1, "temp1/F")
00087                 mytree.Branch("temp2", self.temp2, "temp2/F")
00088                 mytree.Branch("temp3", self.temp3, "temp3/F")
00089                 mytree.Branch("temp4", self.temp3, "temp4/F")
00090                 mytree.Branch("temp5", self.temp3, "temp5/F")
00091                 mytree.Branch("temp6", self.temp3, "temp6/F")
00092                 mytree.Branch("temp7", self.temp3, "temp7/F")
00093                 mytree.Branch("temp8", self.temp3, "temp8/F")
00094                 mytree.Branch("lsmass1", self.lsmass1, "lsmass1/F")
00095                 mytree.Branch("lsmasse1", self.lsmasse1, "lsmasse1/F")
00096                 mytree.Branch("lsmass2", self.lsmass2, "lsmass2/F")
00097                 mytree.Branch("lsmasse2", self.lsmasse2, "lsmasse2/F")
00098 
00099                 mytree.Branch("tp", self.tp, "tp/F")
00100 
00101                 status = statsSvc.put("/file/tree/data",mytree)
00102 
00103                 self.timeStamp = str2ts( self.startTime )
00104                 self.endTimeStamp = str2ts( self.endTime )
00105                 context = gbl.Context()
00106                 context.SetSimFlag(gbl.SimFlag.kData)
00107                 context.SetSite(gbl.Site.kDayaBay)
00108                 context.SetDetId(gbl.DetectorId.kAD1)
00109                 context.SetTimeStamp(self.timeStamp)
00110                 svcMode = gbl.ServiceMode(context,0)
00111                 protons = [ ]
00112 
00113 
00114                 adMasses = targetProtonsSvc.getAdMasses()
00115 
00116                 timestep_s = 21600. #86400.#21600.
00117                 dt=0
00118                 #Get 100 days of target mass/proton data
00119                 #FIXME: Adjust this to iterate between timeStamp and endTimeStamp
00120                 for dt in range(0, 2000):#90):
00121                         self.timeStamp.Add(timestep_s)
00122                         context.SetTimeStamp(self.timeStamp)
00123                         # Hall 1        
00124                         context.SetSite(gbl.Site.kDayaBay)
00125                         # AD1 
00126                         context.SetDetId(gbl.DetectorId.kAD1)
00127                         svcMode = gbl.ServiceMode(context,0)
00128                         self.time[0] = self.timeStamp.GetSeconds()
00129                         self.tmass1[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00130                         self.tmasse1[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00131                         self.tp[0] = targetProtonsSvc.getProtonNumber(svcMode).protonNumber
00132                         self.temp1[0] = targetProtonsSvc.getGdTemp(svcMode)
00133 
00134                         ofMasses = targetProtonsSvc.getOFMasses(svcMode)
00135                         self.lsmass1[0] = adMasses.m_lsMass[1]-ofMasses.m_lsOFMass[1]
00136                         self.lsmasse1[0] = ofMasses.m_lsOFMassErr[1]                            
00137                         #AD2
00138                         context.SetDetId(gbl.DetectorId.kAD2)
00139                         svcMode = gbl.ServiceMode(context,0)
00140                         self.tmass2[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00141                         self.tmasse2[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00142                         ofMasses = targetProtonsSvc.getOFMasses(svcMode)
00143                         self.lsmass2[0] = adMasses.m_lsMass[2]-ofMasses.m_lsOFMass[2]
00144                         self.lsmasse2[0] = ofMasses.m_lsOFMass[2]
00145                         self.temp2[0] = targetProtonsSvc.getGdTemp(svcMode)
00146 
00147                         # Hall 2
00148                         context.SetSite(gbl.Site.kLingAo)
00149                         #AD1
00150                         context.SetDetId(gbl.DetectorId.kAD1)
00151                         svcMode = gbl.ServiceMode(context,0)
00152                         self.tmass3[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00153                         self.tmasse3[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00154                         self.temp3[0] = targetProtonsSvc.getGdTemp(svcMode)
00155                         #AD2
00156                         context.SetDetId(gbl.DetectorId.kAD2)
00157                         svcMode = gbl.ServiceMode(context,0)
00158                         self.tmass8[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00159                         self.tmasse8[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00160                         self.temp8[0] = targetProtonsSvc.getGdTemp(svcMode)
00161 
00162                         #Hall 3
00163                         context.SetSite(gbl.Site.kFar)
00164                         #AD1
00165                         context.SetDetId(gbl.DetectorId.kAD1)
00166                         svcMode = gbl.ServiceMode(context,0)
00167                         self.tmass4[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00168                         self.tmasse4[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00169                         self.temp4[0] = targetProtonsSvc.getGdTemp(svcMode)
00170                         #AD2
00171                         context.SetDetId(gbl.DetectorId.kAD2)
00172                         svcMode = gbl.ServiceMode(context,0)
00173                         self.tmass5[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00174                         self.tmasse5[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00175                         self.temp5[0] = targetProtonsSvc.getGdTemp(svcMode)
00176                         #AD3
00177                         context.SetDetId(gbl.DetectorId.kAD3)
00178                         svcMode = gbl.ServiceMode(context, 0)
00179                         self.tmass6[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00180                         self.tmasse6[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00181                         self.temp6[0] = targetProtonsSvc.getGdTemp(svcMode)
00182                         #AD4
00183                         context.SetDetId(gbl.DetectorId.kAD4)
00184                         svcMode = gbl.ServiceMode(context, 0)
00185                         self.tmass7[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMass
00186                         self.tmasse7[0] = targetProtonsSvc.getProtonNumber(svcMode).targetMassErr_rel
00187                         self.temp7[0] = targetProtonsSvc.getGdTemp(svcMode)
00188 
00189 
00190                         self.stats["/file/tree/data"].Fill()
00191 
00192                 return SUCCESS

def GetProtonsOverTime::TestTargetProtonsSvc::execute (   self)

Definition at line 193 of file GetProtonsOverTime.py.

00194                          :
00195                 print "Executing", self.name()
00196                 return SUCCESS

def GetProtonsOverTime::TestTargetProtonsSvc::finalize (   self)

Definition at line 197 of file GetProtonsOverTime.py.

00198                           :
00199                 print "Finalizing",self.name()
00200                 status = DybPythonAlg.finalize(self)
00201                 return status


Member Data Documentation

Definition at line 19 of file GetProtonsOverTime.py.

Definition at line 19 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.py.

Definition at line 26 of file GetProtonsOverTime.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:58:04 for TargetProtonsSvc by doxygen 1.7.4