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

List of all members.

Public Member Functions

def __init__
def prevPhysRun

Public Attributes

 daqRunInfoSvc

Detailed Description

Definition at line 11 of file PhysRunFinder.py.


Constructor & Destructor Documentation

def PhysRunFinder::PhysRunFinder::__init__ (   self)

Definition at line 13 of file PhysRunFinder.py.

00014                       :
00015 
00016         # Important: DaqCalibRunInfo query is done in offline_db
00017         import os
00018         os.environ['DBCONF']="offline_db"
00019 
00020         global Catalog
00021         import DybPython.Catalog as Catalog
00022         
00023         from Gaudi.Configuration import ApplicationMgr
00024         theApp = ApplicationMgr()
00025         theApp.ExtSvc.append('DaqRunInfoSvc/DaqRunInfoSvc')
00026         
00027         from GaudiPython import AppMgr
00028         appMgr=AppMgr()
00029         appMgr.initialize()
00030         global daqRunInfoSvc
00031         self.daqRunInfoSvc = appMgr.service('DaqRunInfoSvc','IDaqRunInfoSvc')
00032         assert self.daqRunInfoSvc,'Failed to load DaqRunInfoSvc'
00033         


Member Function Documentation

def PhysRunFinder::PhysRunFinder::prevPhysRun (   self,
  runNo 
)

Definition at line 34 of file PhysRunFinder.py.

00035                                :
00036 
00037         #detector for this run
00038         thisRunInfo=self.daqRunInfoSvc.GetRunInfo(runNo)
00039         thisRunPart=thisRunInfo.GetPartitionName()
00040         print "Searching previous physics run: **********************"
00041         
00042         #loop to previous runs until find physics in same hall and with at least 3 files
00043         
00044         notfound=True
00045         prevcont=0;
00046         while notfound:
00047             prevcont+=1
00048             runInfo = self.daqRunInfoSvc.GetRunInfo(runNo-prevcont)
00049             print "Run: ",runInfo.GetRunNo(),"-->",runInfo.GetRunType(),",",runInfo.GetPartitionName()
00050             if runInfo.GetRunType()=="Physics" and runInfo.GetPartitionName()==thisRunPart:
00051                 #check run has at least 3 files
00052                 runs=Catalog.runs[runNo-prevcont]
00053                 if len(runs)>=3:
00054                     notfound=False
00055 
00056         prevPhys=runNo-prevcont;
00057         print "-->the previous physics run is ",prevPhys
00058         return prevPhys;
00059             
00060     
00061     

Member Data Documentation

Definition at line 13 of file PhysRunFinder.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:28 for Co60Auto by doxygen 1.7.4