File indexing completed on 2026-04-10 08:38:59
0001 import uuid
0002
0003 try:
0004 from pandatools import Client
0005 except ImportError:
0006 from userinterface import Client
0007
0008 inFileList = ["file1", "file2", "file3"]
0009
0010 logDatasetName = f"panda.jeditest.log.{uuid.uuid4()}"
0011
0012 taskParamMap = {}
0013
0014 taskParamMap["nFilesPerJob"] = 1
0015 taskParamMap["nFiles"] = len(inFileList)
0016
0017
0018
0019 taskParamMap["noInput"] = True
0020 taskParamMap["pfnList"] = inFileList
0021
0022 taskParamMap["taskName"] = str(uuid.uuid4())
0023 taskParamMap["userName"] = "someone"
0024 taskParamMap["vo"] = "wlcg"
0025 taskParamMap["taskPriority"] = 900
0026
0027 taskParamMap["architecture"] = "power9"
0028 taskParamMap["transUses"] = "A"
0029 taskParamMap["transHome"] = "B"
0030 taskParamMap["transPath"] = "executable"
0031 taskParamMap["processingType"] = "step1"
0032 taskParamMap["prodSourceLabel"] = "test"
0033 taskParamMap["taskType"] = "test"
0034 taskParamMap["workingGroup"] = "groupA"
0035
0036
0037 taskParamMap["cloud"] = "NA"
0038 taskParamMap["site"] = "TEST_PQ"
0039 taskParamMap["log"] = {
0040 "dataset": logDatasetName,
0041 "type": "template",
0042 "param_type": "log",
0043 "token": "local",
0044 "destination": "local",
0045 "value": f"{logDatasetName}.${{SN}}.log.tgz",
0046 }
0047 outDatasetName = f"panda.jeditest.{uuid.uuid4()}"
0048
0049
0050 taskParamMap["jobParameters"] = [
0051 {
0052 "type": "constant",
0053 "value": '-i "${IN/T}"',
0054 },
0055 {"type": "constant", "value": "ecmEnergy=8000 runNumber=12345"},
0056 {
0057 "type": "template",
0058 "param_type": "output",
0059 "token": "local",
0060 "destination": "local",
0061 "value": f"outputEVNTFile={outDatasetName}.${{SN}}.root",
0062 "dataset": outDatasetName,
0063 "offset": 1000,
0064 },
0065 {
0066 "type": "constant",
0067 "value": "aaaa",
0068 },
0069 ]
0070
0071 print(Client.insertTaskParams(taskParamMap))