Functions | |
def | configure |
def | run |
Variables | |
isDryAd = False | |
string | calibrationOutputFile = "pmtCalibTable.txt" |
def CalibParam::MakePmtTable::configure | ( | argv = [] |
) |
Definition at line 15 of file MakePmtTable.py.
00015 : 00016 # Process module options 00017 import sys, getopt 00018 opts,args = getopt.getopt(argv, "i:o:", ["dry-ad"]) 00019 statsInputFile = None 00020 global calibrationOutputFile 00021 global isDryAd 00022 for opt,arg in opts: 00023 if opt == "-i": 00024 statsInputFile = arg 00025 if opt == "-o": 00026 calibrationOutputFile = arg 00027 if opt == "--dry-ad": 00028 isDryAd = True 00029 00030 # Setup services 00031 from DetHelpers.DetHelpersConf import PmtGeomInfoSvc 00032 pgiSvc = PmtGeomInfoSvc() 00033 pgiSvc.StreamItems = ["/dd/Structure/DayaBay"] 00034 if statsInputFile != None: 00035 from StatisticsSvc.StatisticsSvcConf import StatisticsSvc 00036 statsSvc = StatisticsSvc() 00037 statsSvc.Input = {'file0':statsInputFile} 00038 import DataSvc 00039 dataSvc = DataSvc.Configure() 00040 00041 from DataSvc.DataSvcConf import StaticCableSvc 00042 CableSvc = StaticCableSvc() 00043 # For dry run, This must be specified, because the query later is not based on time 00044 CableMapFile = os.getenv("DATASVCROOT") + "/share/DryRun/feeCableMap_DryRun.txt" 00045 CableSvc.FeeCableMap = CableMapFile 00046 00047 return 00048 def run(app):
def CalibParam::MakePmtTable::run | ( | app | ) |
Configure and add an algorithm to job
Definition at line 49 of file MakePmtTable.py.
00049 : 00050 ''' 00051 Configure and add an algorithm to job 00052 ''' 00053 global calibrationOutputFile 00054 global isDryAD 00055 app.ExtSvc += ["StaticCableSvc", "StatisticsSvc", "PmtGeomInfoSvc"] 00056 # Add PMT Calibration table writing algorithm 00057 from CalibParam.Tools import PmtTableWriterAlg 00058 twAlg = PmtTableWriterAlg("MyPmtTableWriterAlg") 00059 twAlg.StatsPath = '/file0/pmtCalibLeadingEdge' 00060 twAlg.OutputFileName = calibrationOutputFile 00061 twAlg.IsDryAd = isDryAd 00062 twAlg.SetDefaultCalib = True 00063 twAlg.SourcePosition = [0.,0.,0.] 00064 app.addAlgorithm(twAlg) 00065 pass pass
CalibParam::MakePmtTable::isDryAd = False [static] |
Definition at line 12 of file MakePmtTable.py.
string CalibParam::MakePmtTable::calibrationOutputFile = "pmtCalibTable.txt" [static] |
Definition at line 13 of file MakePmtTable.py.