Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 08:39:07

0001 import sys
0002 import time
0003 import uuid
0004 
0005 from pandaserver.taskbuffer.FileSpec import FileSpec
0006 from pandaserver.taskbuffer.JobSpec import JobSpec
0007 from pandaserver.userinterface import Client
0008 
0009 # site = sys.argv[1]
0010 site = "ANALY_BNL-LSST"  # orig
0011 # site = 'BNL-LSST'
0012 # site = 'SWT2_CPB-LSST'
0013 # site = 'UTA_SWT2-LSST'
0014 # site = 'ANALY_SWT2_CPB-LSST'
0015 
0016 datasetName = f"panda.user.jschovan.lsst.{str(uuid.uuid4())}"
0017 destName = None
0018 
0019 job = JobSpec()
0020 job.jobDefinitionID = int(time.time()) % 10000
0021 job.jobName = f"{str(uuid.uuid4())}"
0022 # job.transformation    = 'http://www.usatlas.bnl.gov/~wenaus/lsst-trf/lsst-trf.sh'
0023 # job.transformation    = 'http://pandawms.org/pandawms-jobcache/lsst-trf.sh'
0024 job.transformation = "http://pandawms.org/pandawms-jobcache/lsst-trf-phosim332.sh"
0025 job.destinationDBlock = datasetName
0026 # job.destinationSE     = destName
0027 job.destinationSE = "local"
0028 job.currentPriority = 1000
0029 # job.prodSourceLabel   = 'ptest'
0030 # job.prodSourceLabel = 'panda'
0031 # job.prodSourceLabel = 'ptest'
0032 # job.prodSourceLabel = 'test'
0033 # job.prodSourceLabel = 'ptest'
0034 # 2014-01-27
0035 # job.prodSourceLabel = 'user'
0036 job.prodSourceLabel = "panda"
0037 job.computingSite = site
0038 job.jobParameters = ""
0039 job.VO = "lsst"
0040 
0041 fileOL = FileSpec()
0042 fileOL.lfn = f"{job.jobName}.job.log.tgz"
0043 fileOL.destinationDBlock = job.destinationDBlock
0044 fileOL.destinationSE = job.destinationSE
0045 fileOL.dataset = job.destinationDBlock
0046 fileOL.type = "log"
0047 job.addFile(fileOL)
0048 
0049 
0050 s, o = Client.submit_jobs([job])
0051 print(s)
0052 for x in o:
0053     print(f"PandaID={x[0]}")