Ejemplo n.º 1
0
    def produceCommitBinds(self, jobID):
        """
        _produceCommitBinds_

        Produce a list of binds to commit to the database
        """

        maskList = []
        for run in self['runAndLumis']:
            for lumiPair in self['runAndLumis'][run]:
                tmpMask = WMMask()
                tmpMask['jobID'] = jobID
                tmpMask['inclusivemask'] = self['inclusivemask']
                tmpMask['FirstEvent'] = self['FirstEvent']
                tmpMask['LastEvent'] = self['LastEvent']
                tmpMask['FirstRun'] = int(run)
                tmpMask['LastRun'] = int(run)
                tmpMask['FirstLumi'] = lumiPair[0]
                tmpMask['LastLumi'] = lumiPair[1]
                maskList.append(tmpMask)

        return maskList
Ejemplo n.º 2
0
    def getDataStructsJob(self):
        """
        _getDataStructsJob_

        Returns the DataStructs version of this job
        """
        job = WMJob(name=self['name'])

        # Transfer all simple keys
        for key in self:
            if isinstance(self.get(key), (str, bytes, int, float)):
                job[key] = self[key]

        for fileObj in self['input_files']:
            job['input_files'].append(fileObj.returnDataStructsFile())

        job['mask'] = WMMask()
        for key in self["mask"]:
            job["mask"][key] = self["mask"][key]

        job.baggage = self.baggage

        return job
Ejemplo n.º 3
0
    def getDataStructsJob(self):
        """
        _getDataStructsJob_

        Returns the DataStructs version of this job
        """
        job = WMJob(name=self['name'])

        # Transfer all simple keys
        for key in self.keys():
            keyType = type(self.get(key))
            if keyType in [str, long, int, float]:
                job[key] = self[key]

        for file in self['input_files']:
            job['input_files'].append(file.returnDataStructsFile())

        job['mask'] = WMMask()
        for key in self["mask"].keys():
            job["mask"][key] = self["mask"][key]

        job.baggage = self.baggage

        return job