for MDField in MDFieldDict.keys(): MDFieldType = MDFieldDict[MDField] res = fc.addMetadataField(MDField, MDFieldType) if not res["OK"]: gLogger.error("Failed to add metadata fields", res["Message"]) exit(-1) # Instantiate the ProductionClient prodClient = ProductionClient() # Create the first production step and add it to the Production outputquery = {"application": "mandelbrot", "image_format": "ascii", "image_width": 7680, "image_height": 200} prodStep1 = createProductionStep("ImageProd", "MCSimulation", outputQuery=outputquery) body = createWorkflowBodyStep1() prodStep1.Body = body res = prodClient.addProductionStep(prodStep1) if not res["OK"]: gLogger.error("Failed to add production step", res["Message"]) exit(-1) # Create the second production step and add it to the Production inputquery = {"application": "mandelbrot", "image_format": "ascii", "image_width": 7680, "image_height": 200} outputquery = {"application": "mandelbrot", "image_format": "ascii", "image_width": 7680, "image_height": 1400} prodStep2 = createProductionStep("MergeImage", "DataProcessing", inputQuery=inputquery, outputQuery=outputquery) body = createWorkflowBodyStep2() prodStep2.Body = body prodStep2.ParentStep = prodStep1 res = prodClient.addProductionStep(prodStep2) if not res["OK"]: gLogger.error("Failed to add production step", res["Message"])
args = Script.getPositionalArgs() if len(args) != 1: DIRAC.gLogger.error('At least 1 argument required: DL0_data_set') DIRAC.exit(-1) DL0_data_set = args[0] prod_name = DL0_data_set.replace('AdvancedBaseline_NSB1x_','')+'_DL1' ################################## # Create the production prod_sys_client = ProductionClient() ################################## # Define the first ProductionStep (Corsika+sim_telarray) prod_step_1 = build_simulation_step(DL0_data_set) # Add the step to the production prod_sys_client.addProductionStep(prod_step_1) ################################## # Define EventDisplay analysis steps and add them to the production # dark nsb = 1 prod_step_2 = build_evndisp_step(DL0_data_set, nsb=1) prod_step_2.ParentStep = prod_step_1 prod_sys_client.addProductionStep(prod_step_2) # moon nsb = 5 prod_step_3 = build_evndisp_step(DL0_data_set, nsb=5) prod_step_3.ParentStep = prod_step_1 prod_sys_client.addProductionStep(prod_step_3) ################################## # Get the production description prod_description = prod_sys_client.prodDescription