當前位置: 首頁>>代碼示例>>Python>>正文


Python Job.merger方法代碼示例

本文整理匯總了Python中Ganga.GPIDev.Lib.Job.Job.merger方法的典型用法代碼示例。如果您正苦於以下問題:Python Job.merger方法的具體用法?Python Job.merger怎麽用?Python Job.merger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Ganga.GPIDev.Lib.Job.Job的用法示例。


在下文中一共展示了Job.merger方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _create_subjob

# 需要導入模塊: from Ganga.GPIDev.Lib.Job import Job [as 別名]
# 或者: from Ganga.GPIDev.Lib.Job.Job import merger [as 別名]
    def _create_subjob(self, job, dataset):
        logger.debug("_create_subjob")
        datatmp = []

        logger.debug("dataset size: %s" % str(len(dataset)))
        #logger.debug( "dataset: %s" % str(dataset) )

        if isinstance(dataset, LHCbDataset):
            for i in dataset:
                if isType(i, DiracFile):
                    datatmp.append(i)
                else:
                    logger.error(
                        "Unkown file-type %s, cannot perform split with file %s" % (type(i), str(i)))
                    from Ganga.Core.exceptions import GangaException
                    raise GangaException(
                        "Unkown file-type %s, cannot perform split with file %s" % (type(i), str(i)))
        elif type(dataset) == type([]) or isType(dataset, GangaList()):
            for file in dataset:
                if type(file) == type(''):
                    datatmp.append(
                        allComponentFilters['gangafiles'](file, None))
                elif isType(file, IGangaFile):
                    datatmp.append(file)
                else:
                    logger.error("Unexpected type: %s" % str(type(file)))
                    logger.error(
                        "Wanted object to inherit from type: %s: %s" % (str(type(IGangaFile()))))
                    from Ganga.Core.exceptions import GangaException
                    x = GangaException(
                        "Unknown(unexpected) file object: %s" % file)
                    raise x
        elif type(dataset) == type(''):
            datatmp.append(DiracFile(lfn=dataset))
        else:
            logger.error("Unkown dataset type, cannot perform split here")
            from Ganga.Core.exceptions import GangaException
            logger.error("Dataset found: " + str(dataset))
            raise GangaException(
                "Unkown dataset type, cannot perform split here")

        logger.debug("Creating new Job in Splitter")
        j = Job()
        logger.debug("Copying From Job")
        j.copyFrom(
            stripProxy(job), ['inputdata', 'inputsandbox', 'inputfiles'])
        logger.debug("Unsetting Splitter")
        j.splitter = None
        logger.debug("Unsetting Merger")
        j.merger = None
        # j.inputsandbox = [] ## master added automatically
        #j.inputfiles = []
        logger.debug("Setting InputData")
        j.inputdata = LHCbDataset(files=datatmp[:],
                                  persistency=self.persistency,
                                  depth=self.depth)
        #j.inputdata.XMLCatalogueSlice = self.XMLCatalogueSlice
        logger.debug("Returning new subjob")
        return j
開發者ID:kreczko,項目名稱:ganga,代碼行數:61,代碼來源:SplitByFiles.py

示例2: _create_subjob

# 需要導入模塊: from Ganga.GPIDev.Lib.Job import Job [as 別名]
# 或者: from Ganga.GPIDev.Lib.Job.Job import merger [as 別名]
    def _create_subjob(self, job, inputdata):
        j = Job()
        j.copyFrom(job)
        j.splitter = None
        j.merger = None
        j.inputsandbox = []  # master added automatically
        j.inputfiles = []
        j.inputdata = inputdata

        return j
開發者ID:Erni1619,項目名稱:ganga,代碼行數:12,代碼來源:OptionsFileSplitter.py

示例3: _create_subjob

# 需要導入模塊: from Ganga.GPIDev.Lib.Job import Job [as 別名]
# 或者: from Ganga.GPIDev.Lib.Job.Job import merger [as 別名]
    def _create_subjob(self, job, dataset):
        logger.debug("_create_subjob")
        j = Job()
        j.copyFrom(job)
        j.splitter = None
        j.merger = None
        j.inputsandbox = []  # master added automatically
        j.inputdata = GaudiDataset(files=dataset)
##         if not j.inputdata: j.inputdata = GaudiDataset(files=dataset)
# else:               j.inputdata.files = dataset
        return j
開發者ID:Erni1619,項目名稱:ganga,代碼行數:13,代碼來源:GaudiInputDataSplitter.py

示例4: split

# 需要導入模塊: from Ganga.GPIDev.Lib.Job import Job [as 別名]
# 或者: from Ganga.GPIDev.Lib.Job.Job import merger [as 別名]
    def split(self, job):
        subjobs = []

        for i in range(self.numJobs):
            j = Job()
            j.copyFrom(job)
            j.splitter = None
            j.merger = None
            j.inputsandbox = []  # master added automatically
            subjobs.append(j)

        return subjobs
開發者ID:Erni1619,項目名稱:ganga,代碼行數:14,代碼來源:TestSplitter.py

示例5: _create_subjob

# 需要導入模塊: from Ganga.GPIDev.Lib.Job import Job [as 別名]
# 或者: from Ganga.GPIDev.Lib.Job.Job import merger [as 別名]
    def _create_subjob(self, job, dataset):
        logger.debug("_create_subjob")

        datatmp = []
        if isinstance(dataset, LHCbDataset):
            for i in dataset:
                if isinstance(i, DiracFile):
                    datatmp.extend(i)
                else:
                    logger.error(
                        "Unkown file-type %s, cannot perform split with file %s" % (type(i), str(i)))
                    from Ganga.Core.exceptions import GangaException
                    raise GangaException(
                        "Unkown file-type %s, cannot perform split with file %s" % (type(i), str(i)))
        elif isinstance(dataset, list):
            from Ganga.GPIDev.Base.Proxy import isType
            for i in dataset:
                if type(i) is str:
                    datatmp.append(DiracFile(lfn=i))
                elif isType(i, DiracFile()):
                    datatmp.extend(i)
                else:
                    x = GangaException(
                        "Unknown(unexpected) file object: %s" % i)
                    raise x
        else:
            logger.error("Unkown dataset type, cannot perform split here")
            from Ganga.Core.exceptions import GangaException
            raise GangaException(
                "Unkown dataset type, cannot perform split here")

        logger.debug("Creating new Job in Splitter")
        j = Job()
        j.copyFrom(stripProxy(job))
        j.splitter = None
        j.merger = None
        j.inputsandbox = []  # master added automatically
        j.inputfiles = []
        j.inputdata = LHCbDataset(files=datatmp[:],
                                  persistency=self.persistency,
                                  depth=self.depth)
        j.inputdata.XMLCatalogueSlice = self.XMLCatalogueSlice

        return j
開發者ID:Erni1619,項目名稱:ganga,代碼行數:46,代碼來源:SplitFilesBySize.py


注:本文中的Ganga.GPIDev.Lib.Job.Job.merger方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。