def defineEvgen16Job(self, i): """Define an Evgen16 job based on predefined values and randomly generated names """ job = JobSpec() job.computingSite = self.__site job.cloud = self.__cloud job.jobDefinitionID = int(time.time()) % 10000 job.jobName = "%s_%d" % (uuid.uuid1(), i) job.AtlasRelease = 'Atlas-16.6.2' job.homepackage = 'AtlasProduction/16.6.2.1' job.transformation = 'Evgen_trf.py' job.destinationDBlock = self.__datasetName job.destinationSE = self.__destName job.currentPriority = 10000 job.prodSourceLabel = 'test' job.cmtConfig = 'i686-slc5-gcc43-opt' #Output file fileO = FileSpec() fileO.lfn = "%s.evgen.pool.root" % job.jobName fileO.destinationDBlock = job.destinationDBlock fileO.destinationSE = job.destinationSE fileO.dataset = job.destinationDBlock fileO.destinationDBlockToken = 'ATLASDATADISK' fileO.type = 'output' job.addFile(fileO) #Log file fileL = FileSpec() fileL.lfn = "%s.job.log.tgz" % job.jobName fileL.destinationDBlock = job.destinationDBlock fileL.destinationSE = job.destinationSE fileL.dataset = job.destinationDBlock fileL.destinationDBlockToken = 'ATLASDATADISK' fileL.type = 'log' job.addFile(fileL) job.jobParameters = "2760 105048 19901 101 200 MC10.105048.PythiaB_ccmu3mu1X.py %s NONE NONE NONE MC10JobOpts-latest-test.tar.gz" % fileO.lfn return job
def convertToJobFileSpec(self, datasetSpec, setType=None, useEventService=False): jobFileSpec = JobFileSpec() jobFileSpec.fileID = self.fileID jobFileSpec.datasetID = datasetSpec.datasetID jobFileSpec.jediTaskID = datasetSpec.jediTaskID jobFileSpec.lfn = self.lfn jobFileSpec.GUID = self.GUID if setType is None: jobFileSpec.type = self.type else: jobFileSpec.type = setType jobFileSpec.scope = self.scope jobFileSpec.fsize = self.fsize jobFileSpec.checksum = self.checksum jobFileSpec.attemptNr = self.attemptNr # dataset attribute if datasetSpec is not None: # dataset if datasetSpec.containerName not in [None, '']: jobFileSpec.dataset = datasetSpec.containerName else: jobFileSpec.dataset = datasetSpec.datasetName if self.type in datasetSpec.getInputTypes( ) or setType in datasetSpec.getInputTypes(): # prodDBlock jobFileSpec.prodDBlock = datasetSpec.datasetName # storage token if datasetSpec.storageToken not in ['', None]: jobFileSpec.dispatchDBlockToken = datasetSpec.storageToken else: # destinationDBlock jobFileSpec.destinationDBlock = datasetSpec.datasetName # storage token if datasetSpec.storageToken not in ['', None]: jobFileSpec.destinationDBlockToken = datasetSpec.storageToken.split( '/')[0] # destination if datasetSpec.destination not in ['', None]: jobFileSpec.destinationSE = datasetSpec.destination # set prodDBlockToken for Event Service if useEventService and datasetSpec.getObjectStore( ) is not None: jobFileSpec.prodDBlockToken = 'objectstore^{0}'.format( datasetSpec.getObjectStore()) # allow no output if datasetSpec.isAllowedNoOutput(): jobFileSpec.allowNoOutput() # return return jobFileSpec
def convertToJobFileSpec(self,datasetSpec,setType=None,useEventService=False): jobFileSpec = JobFileSpec() jobFileSpec.fileID = self.fileID jobFileSpec.datasetID = datasetSpec.datasetID jobFileSpec.jediTaskID = datasetSpec.jediTaskID jobFileSpec.lfn = self.lfn jobFileSpec.GUID = self.GUID if setType == None: jobFileSpec.type = self.type else: jobFileSpec.type = setType jobFileSpec.scope = self.scope jobFileSpec.fsize = self.fsize jobFileSpec.checksum = self.checksum jobFileSpec.attemptNr = self.attemptNr # dataset attribute if datasetSpec != None: # dataset if not datasetSpec.containerName in [None,'']: jobFileSpec.dataset = datasetSpec.containerName else: jobFileSpec.dataset = datasetSpec.datasetName if self.type in datasetSpec.getInputTypes() or setType in datasetSpec.getInputTypes(): # prodDBlock jobFileSpec.prodDBlock = datasetSpec.datasetName # storage token if not datasetSpec.storageToken in ['',None]: jobFileSpec.dispatchDBlockToken = datasetSpec.storageToken else: # destinationDBlock jobFileSpec.destinationDBlock = datasetSpec.datasetName # storage token if not datasetSpec.storageToken in ['',None]: jobFileSpec.destinationDBlockToken = datasetSpec.storageToken.split('/')[0] # destination if not datasetSpec.destination in ['',None]: jobFileSpec.destinationSE = datasetSpec.destination # set prodDBlockToken for Event Service if useEventService and datasetSpec.getObjectStore() != None: jobFileSpec.prodDBlockToken = 'objectstore^{0}'.format(datasetSpec.getObjectStore()) # allow no output if datasetSpec.isAllowedNoOutput(): jobFileSpec.allowNoOutput() # return return jobFileSpec
fileI.type = 'input' job.addFile(fileI) fileD = FileSpec() fileD.dataset = 'ddo.000001.Atlas.Ideal.DBRelease.v040701' fileD.prodDBlock = 'ddo.000001.Atlas.Ideal.DBRelease.v030101' fileD.lfn = 'DBRelease-4.7.1.tar.gz' fileD.type = 'input' job.addFile(fileD) fileOE = FileSpec() fileOE.lfn = "%s.HITS.pool.root" % job.jobName fileOE.destinationDBlock = job.destinationDBlock fileOE.destinationSE = job.destinationSE fileOE.dataset = job.destinationDBlock fileOE.destinationDBlockToken = 'ATLASDATADISK' fileOE.type = 'output' job.addFile(fileOE) fileOL = FileSpec() fileOL.lfn = "%s.job.log.tgz" % job.jobName fileOL.destinationDBlock = job.destinationDBlock fileOL.destinationSE = job.destinationSE fileOL.dataset = job.destinationDBlock fileOL.destinationDBlockToken = 'ATLASDATADISK' fileOL.type = 'log' job.addFile(fileOL) job.jobParameters="%s %s NONE 1 3250 55866 ATLAS-CSC-02-01-00 55866 55866 QGSP_EMV None %s DEFAULT" % \ (fileI.lfn,fileOE.lfn,fileD.lfn) jobList.append(job)
fileI.type = 'input' job.addFile(fileI) fileD = FileSpec() fileD.dataset = 'ddo.000001.Atlas.Ideal.DBRelease.v170602' fileD.prodDBlock = fileD.dataset fileD.lfn = 'DBRelease-17.6.2.tar.gz' fileD.type = 'input' job.addFile(fileD) fileOA = FileSpec() fileOA.lfn = "%s.HITS.pool.root" % job.jobName fileOA.destinationDBlock = job.destinationDBlock fileOA.destinationSE = job.destinationSE fileOA.dataset = job.destinationDBlock fileOA.destinationDBlockToken = 'ATLASDATADISK' fileOA.type = 'output' job.addFile(fileOA) fileOL = FileSpec() fileOL.lfn = "%s.job.log.tgz" % job.jobName fileOL.destinationDBlock = job.destinationDBlock fileOL.destinationSE = job.destinationSE fileOL.dataset = job.destinationDBlock fileOL.destinationDBlockToken = 'ATLASDATADISK' fileOL.type = 'log' job.addFile(fileOL) job.jobParameters='inputEvgenFile=%s outputHitsFile=%s maxEvents=3 skipEvents=0 DBRelease=%s geometryVersion=ATLAS-GEO-18-01-03_VALIDATION conditionsTag=OFLCOND-SDR-BS7T-05-14 randomSeed=1 physicsList=QGSP_BERT RunNumber=116870 firstEvent=1' % (fileI.lfn,fileOA.lfn,fileD.lfn) jobList.append(job)