def runTtrigProd(self,run,runselection,trial,config,runStep=True):

	print "Processing tTrig production"
	#config.runselection = runselection
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/TTrigCalibration/' + 'TimeBoxes' + '/' + 'v' + str(trial)
       
	task_dir = config.base_dir + '/TimeBoxes'
	dtTtrigProd = DTTTrigProd(run,task_dir,config) 
	dtTtrigProd.writeCfg()
	
	if runStep:
	    project_prod = dtTtrigProd.run()

	    print "Sent calibration jobs with project",project_prod
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold
	  
	    crabProd = CrabWatch(project_prod)
	    crabProd.setThreshold(config.jobsFinishedThreshold)
	    crabProd.start()
	    crabProd.join()

	    result_file = config.result_dir + '/DTTimeBoxes_%s.root'%run
	    if config.stageOutLocal:
		output_dir = project_prod + "/res"
		haddLocal(output_dir,result_file) 
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'DTTimeBoxes','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_prod

	return None
    def runAnalysisResiduals(self,run,runselection,trial,label,result_file,config,runStep=True):

	print "Processing residuals analysis"
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/AnalysisResiduals/' + label + '/' + 'v' + str(trial)
	
	task_dir = config.base_dir + '/' + label
	dtAnalysisResiduals = DTAnalysisResiduals(run=run,
				                  dir=task_dir,
					          config=config) 
	dtAnalysisResiduals.writeCfg()

	if runStep:
	    project_analysisResiduals = dtAnalysisResiduals.run()

	    print "Sent jobs with project",project_analysisResiduals
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold

	    crabAnalysisResiduals = CrabWatch(project_analysisResiduals)
	    crabAnalysisResiduals.setThreshold(config.jobsFinishedThreshold)
	    crabAnalysisResiduals.start()
	    crabAnalysisResiduals.join()

	    if config.stageOutLocal:
		output_dir = project_analysisResiduals + "/res"
		haddLocal(output_dir,result_file,'residuals')
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'residuals','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_analysisResiduals

	return None
    def runVDriftMeanTimerCalib(self,run,runselection,trial,label,result_file,config,runStep=True):

	print "Processing vDrift calibration"
	#config.runselection = runselection
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/VDriftCalibration/' + label + '/' + 'v' + str(trial)

	task_dir = config.base_dir + '/' + label
	dtVDriftMeanTimer = DTVDriftMeanTimerCalibration(run=run,
							 dir=task_dir,
							 config=config)
	dtVDriftMeanTimer.writeCfg()

	if runStep:
	    project_meantimer = dtVDriftMeanTimer.run()

	    print "Sent validation jobs with project",project_meantimer
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold

	    crabVDriftMeanTimer = CrabWatch(project_meantimer)
	    crabVDriftMeanTimer.setThreshold(config.jobsFinishedThreshold)
	    crabVDriftMeanTimer.start()
	    crabVDriftMeanTimer.join()

	    if config.stageOutLocal:
		output_dir = project_meantimer + "/res"
		haddLocal(output_dir,result_file,'DTTMaxHistos')
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'DTTMaxHistos','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_meantimer

	return None
    def runResidualCalib(self,run,runselection,trial,input_db,label,result_file,config,runStep=True):

	print "Processing tTrig calibration"
	#config.runselection = runselection
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/TTrigCalibration/' + label + '/' + 'v' + str(trial)
	
	task_dir = config.base_dir + '/' + label
	dtResidualCalib = DTResidualCalibration(run=run,
						dir=task_dir,
						input_db=input_db,
						config=config) 
	dtResidualCalib.writeCfg()

	if runStep:
	    project_residualCalib = dtResidualCalib.run()

	    print "Sent calibration jobs with project",project_residualCalib
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold

	    crabResidualCalib = CrabWatch(project_residualCalib)
	    crabResidualCalib.setThreshold(config.jobsFinishedThreshold)
	    crabResidualCalib.start()
	    crabResidualCalib.join()

	    if config.stageOutLocal:
		output_dir = project_residualCalib + "/res"
		haddLocal(output_dir,result_file,'residuals')
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'residuals','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_residualCalib

	return None
Beispiel #5
0
    def runTtrigProd(self,run,runselection,trial,config,runStep=True):

	print "Processing tTrig production"
	#config.runselection = runselection
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/TTrigCalibration/' + 'TimeBoxes' + '/' + 'v' + str(trial)
       
	task_dir = config.base_dir + '/TimeBoxes'
	dtTtrigProd = DTTTrigProd(run,task_dir,config) 
	dtTtrigProd.writeCfg()
	
	if runStep:
	    project_prod = dtTtrigProd.run()

	    print "Sent calibration jobs with project",project_prod
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold
	  
	    crabProd = CrabWatch(project_prod)
	    crabProd.setThreshold(config.jobsFinishedThreshold)
	    crabProd.start()
	    crabProd.join()

	    result_file = config.result_dir + '/DTTimeBoxes_%s.root'%run
	    if config.stageOutLocal:
		output_dir = project_prod + "/res"
		haddLocal(output_dir,result_file) 
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'DTTimeBoxes','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_prod

	return None
Beispiel #6
0
    def runVDriftMeanTimerCalib(self,run,runselection,trial,label,result_file,config,runStep=True):

	print "Processing vDrift calibration"
	#config.runselection = runselection
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/VDriftCalibration/' + label + '/' + 'v' + str(trial)

	task_dir = config.base_dir + '/' + label
	dtVDriftMeanTimer = DTVDriftMeanTimerCalibration(run=run,
							 dir=task_dir,
							 config=config)
	dtVDriftMeanTimer.writeCfg()

	if runStep:
	    project_meantimer = dtVDriftMeanTimer.run()

	    print "Sent validation jobs with project",project_meantimer
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold

	    crabVDriftMeanTimer = CrabWatch(project_meantimer)
	    crabVDriftMeanTimer.setThreshold(config.jobsFinishedThreshold)
	    crabVDriftMeanTimer.start()
	    crabVDriftMeanTimer.join()

	    if config.stageOutLocal:
		output_dir = project_meantimer + "/res"
		haddLocal(output_dir,result_file,'DTTMaxHistos')
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'DTTMaxHistos','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_meantimer

	return None
Beispiel #7
0
    def runAnalysisResiduals(self,run,runselection,trial,label,result_file,config,runStep=True):

	print "Processing residuals analysis"
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/AnalysisResiduals/' + label + '/' + 'v' + str(trial)
	
	task_dir = config.base_dir + '/' + label
	dtAnalysisResiduals = DTAnalysisResiduals(run=run,
				                  dir=task_dir,
					          config=config) 
	dtAnalysisResiduals.writeCfg()

	if runStep:
	    project_analysisResiduals = dtAnalysisResiduals.run()

	    print "Sent jobs with project",project_analysisResiduals
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold

	    crabAnalysisResiduals = CrabWatch(project_analysisResiduals)
	    crabAnalysisResiduals.setThreshold(config.jobsFinishedThreshold)
	    crabAnalysisResiduals.start()
	    crabAnalysisResiduals.join()

	    if config.stageOutLocal:
		output_dir = project_analysisResiduals + "/res"
		haddLocal(output_dir,result_file,'residuals')
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'residuals','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_analysisResiduals

	return None
Beispiel #8
0
    def runResidualCalib(self,run,runselection,trial,input_db,label,result_file,config,runStep=True):

	print "Processing tTrig calibration"
	#config.runselection = runselection
	datasetstr = getDatasetStr(config.datasetpath)
	config.userdircaf = 'DTCalibration/' + datasetstr + '/Run' + str(run) + '/TTrigCalibration/' + label + '/' + 'v' + str(trial)
	
	task_dir = config.base_dir + '/' + label
	dtResidualCalib = DTResidualCalibration(run=run,
						dir=task_dir,
						input_db=input_db,
						config=config) 
	dtResidualCalib.writeCfg()

	if runStep:
	    project_residualCalib = dtResidualCalib.run()

	    print "Sent calibration jobs with project",project_residualCalib
	    print "%.0f%% of jobs are required to finish" % config.jobsFinishedThreshold

	    crabResidualCalib = CrabWatch(project_residualCalib)
	    crabResidualCalib.setThreshold(config.jobsFinishedThreshold)
	    crabResidualCalib.start()
	    crabResidualCalib.join()

	    if config.stageOutLocal:
		output_dir = project_residualCalib + "/res"
		haddLocal(output_dir,result_file,'residuals')
	    elif config.stageOutCAF:
		castor_dir = config.castorpath + "/" + config.userdircaf
		haddInCastor(castor_dir,result_file,'residuals','rfio://castorcms/','?svcClass=cmscafuser')

	    return project_residualCalib

	return None