def closeOutStep0Requests(url, workflows):
	for workflow in workflows:
		#print workflow
		datasets=phedexSubscription.outputdatasetsWorkflow(url, workflow)
		closeOutWorkflow=True
		if getRequestTeam(url, workflow)!='analysis':#If request is not in special queue
			for dataset in datasets:
				closeOutDataset=False
				Percentage=PercentageCompletion(url, workflow, dataset)
				PhedexSubscription=CustodialMoveSubscriptionCreated(dataset)
				if PhedexSubscription!=False:
					site=PhedexSubscription
					TransPercen=TransferPercentage(url, dataset, site)
				duplicate=dbsTest.duplicateLumi(dataset)
				correctLumis=dbsTest.checkCorrectLumisEventGEN(dataset)
				if Percentage>=float(0.95) and PhedexSubscription!=False and not duplicate and correctLumis:
					closeOutDataset=True
				else:
		 			closeOutDataset=False
				closeOutWorkflow=closeOutWorkflow and closeOutDataset
				print '| %80s | %100s | %4s | %5s| %3s | %5s| %5s| ' % (workflow, dataset,str(int(Percentage*100)), str(PhedexSubscription), str(correctLumis), duplicate, closeOutDataset)
			if closeOutWorkflow:
				phedexSubscription.closeOutWorkflow(url, workflow)
		
	print'-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
Exemplo n.º 2
0
def closeOutStep0Requests(url, workflows):
    for workflow in workflows:
        datasets = phedexSubscription.outputdatasetsWorkflow(url, workflow)
        closeOutWorkflow = True
        if getRequestTeam(
                url,
                workflow) != 'analysis':  #If request is not in special queue
            for dataset in datasets:
                closeOutDataset = False
                Percentage = PercentageCompletion(url, workflow, dataset)
                PhedexSubscription = CustodialMoveSubscriptionCreated(dataset)
                if PhedexSubscription != False:
                    site = PhedexSubscription
                    TransPercen = TransferPercentage(url, dataset, site)
                duplicate = dbsTest.duplicateLumi(dataset)
                correctLumis = dbsTest.checkCorrectLumisEventGEN(dataset)
                if Percentage >= float(
                        0.90
                ) and PhedexSubscription != False and not duplicate and correctLumis:
                    closeOutDataset = True
                else:
                    closeOutDataset = False
                closeOutWorkflow = closeOutWorkflow and closeOutDataset
                print '| %80s | %100s | %4s | %5s| %3s | %5s|%5s| ' % (
                    workflow, dataset, str(int(
                        Percentage * 100)), str(PhedexSubscription),
                    str(correctLumis), duplicate, closeOutDataset)
            if closeOutWorkflow:
                phedexSubscription.closeOutWorkflow(url, workflow)

    print '-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
def main():
    args=sys.argv[1:]
    if not len(args)==1:
        print "usage:checkStep0Output workflowname"
        sys.exit(0)
    workflow=args[0]
    url='cmsweb.cern.ch'
    dataset=phedexSubscription.outputdatasetsWorkflow(url, workflow)[0]
    correctLumi=dbsTest.checkCorrectLumisEventGEN(dataset)
    if correctLumi:
	print "The workflow is correct"
    else:
	print "The output Dataset has at least one lumi with more than 300 events, please check it."
    sys.exit(0);
Exemplo n.º 4
0
def main():
    args = sys.argv[1:]
    if not len(args) == 1:
        print "usage:checkStep0Output workflowname"
        sys.exit(0)
    workflow = args[0]
    url = 'cmsweb.cern.ch'
    dataset = phedexSubscription.outputdatasetsWorkflow(url, workflow)[0]
    correctLumi = dbsTest.checkCorrectLumisEventGEN(dataset)
    if correctLumi:
        print "The workflow is correct"
    else:
        print "The output Dataset has at least one lumi with more than 300 events, please check it."
    sys.exit(0)