当前位置: 首页>>代码示例>>Python>>正文


Python ReRecoWorkloadFactory.getTestArguments方法代码示例

本文整理汇总了Python中WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory.getTestArguments方法的典型用法代码示例。如果您正苦于以下问题:Python ReRecoWorkloadFactory.getTestArguments方法的具体用法?Python ReRecoWorkloadFactory.getTestArguments怎么用?Python ReRecoWorkloadFactory.getTestArguments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory的用法示例。


在下文中一共展示了ReRecoWorkloadFactory.getTestArguments方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
def getSchema(groupName = 'PeopleLikeMe', userName = 'me'):
    schema = ReRecoWorkloadFactory.getTestArguments()
    schema['RequestName'] = 'TestReReco'
    schema['RequestType'] = 'ReReco'
    schema['Requestor'] = '%s' % userName
    schema['Group'] = '%s' % groupName
    return schema
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:9,代码来源:utils.py

示例2: getSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
def getSchema(groupName="PeopleLikeMe", userName="me"):
    schema = ReRecoWorkloadFactory.getTestArguments()
    # make sure that ScramArch and CMSSWVersion have valid values
    # since they would be validated and should pass certain regexp
    if "ScramArch" not in schema or schema["ScramArch"] == "fake":
        schema["ScramArch"] = "slc5_amd64_gcc478"
    if "CMSSWVersion" not in schema or schema["CMSSWVersion"] == "fake":
        schema["CMSSWVersion"] = "CMSSW_7_0_0"
    schema["RequestName"] = "TestReReco"
    schema["RequestType"] = "ReReco"
    schema["Requestor"] = "%s" % userName
    schema["Group"] = "%s" % groupName
    return schema
开发者ID:dciangot,项目名称:WMCore,代码行数:15,代码来源:utils.py

示例3: createReRecoSpec

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
 def createReRecoSpec(self, specName, returnType="spec", splitter = None,
                      inputDataset = None, dbsUrl = None, **additionalArgs):
     # update args, then reset them
     args = ReRecoWorkloadFactory.getTestArguments()
     args.update(additionalArgs)
     args["ConfigCacheID"] = createConfig(args["CouchDBName"])
     factory = ReRecoWorkloadFactory()
     spec =  factory.factoryWorkloadConstruction(specName, args)
     if inputDataset != None:
         spec.taskIterator().next().data.input.dataset.primary = inputDataset
     if dbsUrl != None:
         print(dbsUrl)
         spec.taskIterator().next().data.input.dataset.dbsurl = dbsUrl
     return self._selectReturnType(spec, returnType, splitter)
开发者ID:AndresTanasijczuk,项目名称:WMCore,代码行数:16,代码来源:WMSpecGenerator.py

示例4: getMergeACDCSpec

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
    def getMergeACDCSpec(self, splittingAlgo = 'ParentlessMergeBySize', splittingArgs = {}):
        """
        _getMergeACDCSpec_

        Get a ACDC spec for the merge task of a ReReco workload
        """
        factory = ReRecoWorkloadFactory()
        rerecoArgs = ReRecoWorkloadFactory.getTestArguments()
        rerecoArgs["ConfigCacheID"] = createConfig(rerecoArgs["CouchDBName"])
        Tier1ReRecoWorkload = factory.factoryWorkloadConstruction(self.workflowName, rerecoArgs)
        Tier1ReRecoWorkload.truncate('ACDC_%s' % self.workflowName, '/%s/DataProcessing/DataProcessingMergeRECOoutput' % self.workflowName,
                                     self.couchUrl, self.acdcDBName)
        Tier1ReRecoWorkload.setJobSplittingParameters('/ACDC_%s/DataProcessingMergeRECOoutput' % self.workflowName,
                                                      splittingAlgo, splittingArgs)
        return Tier1ReRecoWorkload
开发者ID:elasticaso,项目名称:WMCore,代码行数:17,代码来源:ResubmitBlock_t.py

示例5: createReRecoSpec

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
    def createReRecoSpec(self, specName, returnType="spec", splitter = None,
                         assignKwargs={}, **additionalArgs):
        # update args, then reset them
        args = ReRecoWorkloadFactory.getTestArguments()
        args.update(additionalArgs)
        args["ConfigCacheID"] = createConfig(args["CouchDBName"])
        factory = ReRecoWorkloadFactory()
        spec = factory.factoryWorkloadConstruction(specName, args)

        if assignKwargs:
            args = ReRecoWorkloadFactory.getAssignTestArguments()
            args.update(assignKwargs)
            spec.updateArguments(args)

        return self._selectReturnType(spec, returnType, splitter)
开发者ID:alexanderrichards,项目名称:WMCore,代码行数:17,代码来源:WMSpecGenerator.py

示例6: getProcessingACDCSpec

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
    def getProcessingACDCSpec(self, splittingAlgo = 'LumiBased', splittingArgs = {'lumis_per_job' : 8},
                              setLocationFlag = False):
        """
        _getProcessingACDCSpec_

        Get a ACDC spec for the processing task of a ReReco workload
        """
        factory = ReRecoWorkloadFactory()
        rerecoArgs = ReRecoWorkloadFactory.getTestArguments()
        rerecoArgs["ConfigCacheID"] = createConfig(rerecoArgs["CouchDBName"])
        Tier1ReRecoWorkload = factory.factoryWorkloadConstruction(self.workflowName, rerecoArgs)
        Tier1ReRecoWorkload.truncate('ACDC_%s' % self.workflowName, '/%s/DataProcessing' % self.workflowName, self.couchUrl,
                                     self.acdcDBName)
        Tier1ReRecoWorkload.setJobSplittingParameters('/ACDC_%s/DataProcessing' % self.workflowName, splittingAlgo, splittingArgs)
        if setLocationFlag:
            Tier1ReRecoWorkload.setTrustLocationFlag()
            Tier1ReRecoWorkload.setSiteWhitelist(self.siteWhitelist)
        return Tier1ReRecoWorkload
开发者ID:elasticaso,项目名称:WMCore,代码行数:20,代码来源:ResubmitBlock_t.py

示例7: getReRecoArgs

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
def getReRecoArgs(parent=False):
    """ Returns default values defined in the spec workload """
    rerecoArgs = ReRecoWorkloadFactory.getTestArguments()
    if parent:
        rerecoArgs.update(IncludeParents="True")
    return rerecoArgs
开发者ID:vkuznet,项目名称:WMCore,代码行数:8,代码来源:Dataset_t.py

示例8: DatasetTestCase

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
"""

import unittest

from WMCore.WorkQueue.Policy.Start.Dataset import Dataset
from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory
from WMCore.Services.EmulatorSwitch import EmulatorHelper
from WMCore.Services.DBS.DBSReader import DBSReader
from WMCore_t.WMSpec_t.samples.MultiTaskProcessingWorkload \
    import workload as MultiTaskProcessingWorkload
from WMCore.WorkQueue.WorkQueueExceptions import *
from WMCore_t.WorkQueue_t.WorkQueue_t import getFirstTask
from WMQuality.Emulators.DataBlockGenerator import Globals
from WMQuality.Emulators.WMSpecGenerator.WMSpecGenerator import createConfig

rerecoArgs = ReRecoWorkloadFactory.getTestArguments()
parentProcArgs = ReRecoWorkloadFactory.getTestArguments()
parentProcArgs.update(IncludeParents = "True")

class DatasetTestCase(unittest.TestCase):

    splitArgs = dict(SliceType = 'NumberOfFiles', SliceSize = 5)

    def setUp(self):
        Globals.GlobalParams.resetParams()
        EmulatorHelper.setEmulators(phedex = True, dbs = True,
                            siteDB = True, requestMgr = False)

    def tearDown(self):
        EmulatorHelper.resetEmulators()
开发者ID:nikmagini,项目名称:WMCore,代码行数:32,代码来源:Dataset_t.py

示例9: testFilesets

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]

#.........这里部分代码省略.........
                   (3,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/merged-MergedRECO',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim',
                    'FileBased',
                    'Skim'),
                   (5,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimMergeSkimA/merged-logArchive',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimMergeSkimA/SomeSkimSkimAMergeLogCollect',
                    'MinFileBased',
                    'LogCollect'),
                   (8,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimMergeSkimB/merged-logArchive',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimMergeSkimB/SomeSkimSkimBMergeLogCollect',
                    'MinFileBased',
                    'LogCollect'),
                   (10,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/unmerged-logArchive',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimLogCollect',
                    'MinFileBased',
                    'LogCollect'),
                   (6,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/unmerged-SkimARAW-RECO',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimCleanupUnmergedSkimA',
                    'SiblingProcessingBased',
                    'Cleanup'),
                   (4,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/unmerged-SkimARAW-RECO',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimMergeSkimA',
                    'ParentlessMergeBySize',
                    'Merge'),
                   (9,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/unmerged-SkimBUSER',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimCleanupUnmergedSkimB',
                    'SiblingProcessingBased',
                    'Cleanup'),
                   (7,
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/unmerged-SkimBUSER',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput/SomeSkim/SomeSkimMergeSkimB',
                    'ParentlessMergeBySize',
                    'Merge'),
                   (17,
                    '/TestWorkload/DataProcessing/unmerged-DQMoutputDQM',
                    '/TestWorkload/DataProcessing/DataProcessingCleanupUnmergedDQMoutput',
                    'SiblingProcessingBased',
                    'Cleanup'),
                   (13,
                    '/TestWorkload/DataProcessing/unmerged-DQMoutputDQM',
                    '/TestWorkload/DataProcessing/DataProcessingMergeDQMoutput',
                    'ParentlessMergeBySize',
                    'Merge'),
                   (18,
                    '/TestWorkload/DataProcessing/unmerged-logArchive',
                    '/TestWorkload/DataProcessing/LogCollect',
                    'MinFileBased',
                    'LogCollect'),
                   (12,
                    '/TestWorkload/DataProcessing/unmerged-RECOoutputRECO',
                    '/TestWorkload/DataProcessing/DataProcessingCleanupUnmergedRECOoutput',
                    'SiblingProcessingBased',
                    'Cleanup'),
                   (2,
                    '/TestWorkload/DataProcessing/unmerged-RECOoutputRECO',
                    '/TestWorkload/DataProcessing/DataProcessingMergeRECOoutput',
                    'ParentlessMergeBySize',
                    'Merge'),
                   (1,
                    'TestWorkload-DataProcessing-/MinimumBias/ComissioningHI-v1/RAW',
                    '/TestWorkload/DataProcessing',
                    'EventAwareLumiBased',
                    'Processing')]

        testArguments = ReRecoWorkloadFactory.getTestArguments()
        testArguments["ConfigCacheID"] = self.injectReRecoConfig()
        testArguments.update({"SkimName1": "SomeSkim",
                              "SkimInput1": "RECOoutput",
                              "Skim1ConfigCacheID": self.injectSkimConfig()})
        testArguments["CouchURL"] = os.environ["COUCHURL"]
        testArguments["CouchDBName"] = "rereco_t"
        testArguments["EnableHarvesting"] = True
        testArguments["DQMConfigCacheID"] = self.injectDQMHarvestConfig()

        factory = ReRecoWorkloadFactory()
        testWorkload = factory.factoryWorkloadConstruction("TestWorkload", testArguments)

        testWMBSHelper = WMBSHelper(testWorkload, "DataProcessing", blockName=testArguments['InputDataset'],
                                    cachepath=self.testInit.testDir)
        testWMBSHelper.createTopLevelFileset()
        testWMBSHelper._createSubscriptionsInWMBS(testWMBSHelper.topLevelTask, testWMBSHelper.topLevelFileset)

        self.assertItemsEqual(testWorkload.listOutputProducingTasks(), expOutTasks)

        workflows = self.listTasksByWorkflow.execute(workflow="TestWorkload")
        self.assertItemsEqual([item['task'] for item in workflows], expWfTasks)

        # returns a tuple of id, name, open and last_update
        filesets = self.listFilesets.execute()
        self.assertItemsEqual([item[1] for item in filesets], expFsets)

        subscriptions = self.listSubsMapping.execute(workflow="TestWorkload", returnTuple=True)
        self.assertItemsEqual(subscriptions, subMaps)
开发者ID:vkuznet,项目名称:WMCore,代码行数:104,代码来源:ReReco_t.py

示例10: testReRecoDroppingRECO

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
    def testReRecoDroppingRECO(self):
        """
        _testReRecoDroppingRECO_

        Verify that ReReco workflows can be created and inserted into WMBS
        correctly.  The ReReco workflow is just a DataProcessing workflow with
        skims tacked on. This tests run on unmerged RECO output
        """
        skimConfig = self.injectSkimConfig()
        recoConfig = self.injectReRecoConfig()
        dataProcArguments = ReRecoWorkloadFactory.getTestArguments()
        dataProcArguments["ProcessingString"] = "ProcString"
        dataProcArguments["ConfigCacheID"] = recoConfig
        dataProcArguments.update({"SkimName1": "SomeSkim",
                                  "SkimInput1": "RECOoutput",
                                  "Skim1ConfigCacheID": skimConfig})
        dataProcArguments["CouchURL"] = os.environ["COUCHURL"]
        dataProcArguments["CouchDBName"] = "rereco_t"
        dataProcArguments["TransientOutputModules"] = ["RECOoutput"]
        dataProcArguments["EnableHarvesting"] = True
        dataProcArguments["DQMConfigCacheID"] = self.injectDQMHarvestConfig()

        factory = ReRecoWorkloadFactory()
        testWorkload = factory.factoryWorkloadConstruction("TestWorkload", dataProcArguments)

        self.assertEqual(testWorkload.data.tasks.DataProcessing.tree.children. \
                         SomeSkim.tree.children.SomeSkimMergeSkimB.steps.cmsRun1.output.modules. \
                         Merged.mergedLFNBase,
                         '/store/data/FAKE/MinimumBias/USER/SkimBFilter-ProcString-v1')

        testWMBSHelper = WMBSHelper(testWorkload, "DataProcessing", "SomeBlock", cachepath=self.testDir)
        testWMBSHelper.createTopLevelFileset()
        testWMBSHelper._createSubscriptionsInWMBS(testWMBSHelper.topLevelTask, testWMBSHelper.topLevelFileset)

        skimWorkflow = Workflow(name="TestWorkload",
                                task="/TestWorkload/DataProcessing/SomeSkim")
        skimWorkflow.load()

        self.assertEqual(len(skimWorkflow.outputMap.keys()), 3,
                         "Error: Wrong number of WF outputs.")

        goldenOutputMods = {"SkimA": "RAW-RECO", "SkimB": "USER"}
        for goldenOutputMod, tier in goldenOutputMods.items():
            fset = goldenOutputMod + tier
            mergedOutput = skimWorkflow.outputMap[fset][0]["merged_output_fileset"]
            unmergedOutput = skimWorkflow.outputMap[fset][0]["output_fileset"]

            mergedOutput.loadData()
            unmergedOutput.loadData()

            self.assertEqual(mergedOutput.name,
                             "/TestWorkload/DataProcessing/SomeSkim/SomeSkimMerge%s/merged-Merged%s" % (
                             goldenOutputMod, tier),
                             "Error: Merged output fileset is wrong: %s" % mergedOutput.name)
            self.assertEqual(unmergedOutput.name, "/TestWorkload/DataProcessing/SomeSkim/unmerged-%s" % fset,
                             "Error: Unmerged output fileset is wrong: %s" % unmergedOutput.name)

        logArchOutput = skimWorkflow.outputMap["logArchive"][0]["merged_output_fileset"]
        unmergedLogArchOutput = skimWorkflow.outputMap["logArchive"][0]["output_fileset"]
        logArchOutput.loadData()
        unmergedLogArchOutput.loadData()

        self.assertEqual(logArchOutput.name, "/TestWorkload/DataProcessing/SomeSkim/unmerged-logArchive",
                         "Error: LogArchive output fileset is wrong.")
        self.assertEqual(unmergedLogArchOutput.name, "/TestWorkload/DataProcessing/SomeSkim/unmerged-logArchive",
                         "Error: LogArchive output fileset is wrong.")

        for goldenOutputMod, tier in goldenOutputMods.items():
            mergeWorkflow = Workflow(name="TestWorkload",
                                     task="/TestWorkload/DataProcessing/SomeSkim/SomeSkimMerge%s" % goldenOutputMod)
            mergeWorkflow.load()

            self.assertEqual(len(mergeWorkflow.outputMap.keys()), 2,
                             "Error: Wrong number of WF outputs.")

            mergedMergeOutput = mergeWorkflow.outputMap["Merged%s" % tier][0]["merged_output_fileset"]
            unmergedMergeOutput = mergeWorkflow.outputMap["Merged%s" % tier][0]["output_fileset"]

            mergedMergeOutput.loadData()
            unmergedMergeOutput.loadData()

            self.assertEqual(mergedMergeOutput.name,
                             "/TestWorkload/DataProcessing/SomeSkim/SomeSkimMerge%s/merged-Merged%s" % (
                             goldenOutputMod, tier),
                             "Error: Merged output fileset is wrong.")
            self.assertEqual(unmergedMergeOutput.name,
                             "/TestWorkload/DataProcessing/SomeSkim/SomeSkimMerge%s/merged-Merged%s" % (
                             goldenOutputMod, tier),
                             "Error: Unmerged output fileset is wrong.")

            logArchOutput = mergeWorkflow.outputMap["logArchive"][0]["merged_output_fileset"]
            unmergedLogArchOutput = mergeWorkflow.outputMap["logArchive"][0]["output_fileset"]
            logArchOutput.loadData()
            unmergedLogArchOutput.loadData()

            self.assertEqual(logArchOutput.name,
                             "/TestWorkload/DataProcessing/SomeSkim/SomeSkimMerge%s/merged-logArchive" % goldenOutputMod,
                             "Error: LogArchive output fileset is wrong: %s" % logArchOutput.name)
            self.assertEqual(unmergedLogArchOutput.name,
                             "/TestWorkload/DataProcessing/SomeSkim/SomeSkimMerge%s/merged-logArchive" % goldenOutputMod,
#.........这里部分代码省略.........
开发者ID:vkuznet,项目名称:WMCore,代码行数:103,代码来源:ReReco_t.py

示例11: testReReco

# 需要导入模块: from WMCore.WMSpec.StdSpecs.ReReco import ReRecoWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory import getTestArguments [as 别名]
    def testReReco(self):
        """
        _testReReco_

        Verify that ReReco workflows can be created and inserted into WMBS
        correctly.
        """
        skimConfig = self.injectSkimConfig()
        recoConfig = self.injectReRecoConfig()
        dataProcArguments = ReRecoWorkloadFactory.getTestArguments()
        dataProcArguments["ProcessingString"] = "ProcString"
        dataProcArguments["ConfigCacheID"] = recoConfig
        dataProcArguments.update({"SkimName1": "SomeSkim",
                                  "SkimInput1": "RECOoutput",
                                  "Skim1ConfigCacheID": skimConfig})
        dataProcArguments["CouchURL"] = os.environ["COUCHURL"]
        dataProcArguments["CouchDBName"] = "rereco_t"
        dataProcArguments["EnableHarvesting"] = True
        dataProcArguments["DQMConfigCacheID"] = recoConfig

        factory = ReRecoWorkloadFactory()
        testWorkload = factory.factoryWorkloadConstruction("TestWorkload", dataProcArguments)

        self.assertEqual(testWorkload.data.tasks.DataProcessing.tree.children.DataProcessingMergeRECOoutput.\
                         tree.children.SomeSkim.tree.children.SomeSkimMergeSkimB.steps.cmsRun1.output.modules.\
                         Merged.mergedLFNBase,
                         '/store/data/FAKE/MinimumBias/USER/SkimBFilter-ProcString-v1')

        testWMBSHelper = WMBSHelper(testWorkload, "DataProcessing", "SomeBlock", cachepath = self.testDir)
        testWMBSHelper.createTopLevelFileset()
        testWMBSHelper._createSubscriptionsInWMBS(testWMBSHelper.topLevelTask, testWMBSHelper.topLevelFileset)

        procWorkflow = Workflow(name = "TestWorkload",
                                task = "/TestWorkload/DataProcessing")
        procWorkflow.load()

        self.assertEqual(len(procWorkflow.outputMap.keys()), 3,
                         "Error: Wrong number of WF outputs.")

        goldenOutputMods = ["RECOoutput", "DQMoutput"]
        for goldenOutputMod in goldenOutputMods:
            mergedOutput = procWorkflow.outputMap[goldenOutputMod][0]["merged_output_fileset"]
            unmergedOutput = procWorkflow.outputMap[goldenOutputMod][0]["output_fileset"]
            mergedOutput.loadData()
            unmergedOutput.loadData()

            self.assertEqual(mergedOutput.name, "/TestWorkload/DataProcessing/DataProcessingMerge%s/merged-Merged" % goldenOutputMod,
                                 "Error: Merged output fileset is wrong: %s" % mergedOutput.name)
            self.assertEqual(unmergedOutput.name, "/TestWorkload/DataProcessing/unmerged-%s" % goldenOutputMod,
                             "Error: Unmerged output fileset is wrong.")

        logArchOutput = procWorkflow.outputMap["logArchive"][0]["merged_output_fileset"]
        unmergedLogArchOutput = procWorkflow.outputMap["logArchive"][0]["output_fileset"]
        logArchOutput.loadData()
        unmergedLogArchOutput.loadData()

        self.assertEqual(logArchOutput.name, "/TestWorkload/DataProcessing/unmerged-logArchive",
                         "Error: LogArchive output fileset is wrong.")
        self.assertEqual(unmergedLogArchOutput.name, "/TestWorkload/DataProcessing/unmerged-logArchive",
                         "Error: LogArchive output fileset is wrong.")

        for goldenOutputMod in goldenOutputMods:
            mergeWorkflow = Workflow(name = "TestWorkload",
                                     task = "/TestWorkload/DataProcessing/DataProcessingMerge%s" % goldenOutputMod)
            mergeWorkflow.load()

            self.assertEqual(len(mergeWorkflow.outputMap.keys()), 2,
                             "Error: Wrong number of WF outputs.")

            mergedMergeOutput = mergeWorkflow.outputMap["Merged"][0]["merged_output_fileset"]
            unmergedMergeOutput = mergeWorkflow.outputMap["Merged"][0]["output_fileset"]

            mergedMergeOutput.loadData()
            unmergedMergeOutput.loadData()

            self.assertEqual(mergedMergeOutput.name, "/TestWorkload/DataProcessing/DataProcessingMerge%s/merged-Merged" % goldenOutputMod,
                             "Error: Merged output fileset is wrong.")
            self.assertEqual(unmergedMergeOutput.name, "/TestWorkload/DataProcessing/DataProcessingMerge%s/merged-Merged" % goldenOutputMod,
                             "Error: Unmerged output fileset is wrong.")

            logArchOutput = mergeWorkflow.outputMap["logArchive"][0]["merged_output_fileset"]
            unmergedLogArchOutput = mergeWorkflow.outputMap["logArchive"][0]["output_fileset"]
            logArchOutput.loadData()
            unmergedLogArchOutput.loadData()

            self.assertEqual(logArchOutput.name, "/TestWorkload/DataProcessing/DataProcessingMerge%s/merged-logArchive" % goldenOutputMod,
                             "Error: LogArchive output fileset is wrong: %s" % logArchOutput.name)
            self.assertEqual(unmergedLogArchOutput.name, "/TestWorkload/DataProcessing/DataProcessingMerge%s/merged-logArchive" % goldenOutputMod,
                             "Error: LogArchive output fileset is wrong.")

        topLevelFileset = Fileset(name = "TestWorkload-DataProcessing-SomeBlock")
        topLevelFileset.loadData()

        procSubscription = Subscription(fileset = topLevelFileset, workflow = procWorkflow)
        procSubscription.loadData()

        self.assertEqual(procSubscription["type"], "Processing",
                         "Error: Wrong subscription type.")
        self.assertEqual(procSubscription["split_algo"], "EventAwareLumiBased",
                         "Error: Wrong split algo.")
#.........这里部分代码省略.........
开发者ID:BrunoCoimbra,项目名称:WMCore,代码行数:103,代码来源:ReReco_t.py


注:本文中的WMCore.WMSpec.StdSpecs.ReReco.ReRecoWorkloadFactory.getTestArguments方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。