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


Python DataProcessing.validateSchema方法代码示例

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


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

示例1: validateSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
    def validateSchema(self, schema):
        """
        _validateSchema_

        Standard DataProcessing schema validation.
        """
        DataProcessing.validateSchema(self, schema)

        self.validateConfigCacheExists(configID=schema["DQMConfigCacheID"],
                                       configCacheUrl=schema['ConfigCacheUrl'],
                                       couchDBName=schema["CouchDBName"],
                                       getOutputModules=False)
开发者ID:dmwm,项目名称:WMCore,代码行数:14,代码来源:DQMHarvest.py

示例2: validateSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
    def validateSchema(self, schema):
        """
        _validateSchema_

        Standard StdBase schema validation, plus verification
        of the ConfigCacheID
        """
        DataProcessing.validateSchema(self, schema)
        couchUrl = schema.get("ConfigCacheUrl", None) or schema["CouchURL"]
        self.validateConfigCacheExists(configID=schema["ConfigCacheID"],
                                       couchURL=couchUrl,
                                       couchDBName=schema["CouchDBName"])
        return
开发者ID:,项目名称:,代码行数:15,代码来源:

示例3: validateSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
    def validateSchema(self, schema):
        """
        _validateSchema_

        Standard StdBase schema validation, plus verification
        of the ConfigCacheID
        """
        DataProcessing.validateSchema(self, schema)
        self.validateConfigCacheExists(configID=schema["ConfigCacheID"],
                                       configCacheUrl=schema['ConfigCacheUrl'],
                                       couchDBName=schema["CouchDBName"],
                                       getOutputModules=False)

        return
开发者ID:alexanderrichards,项目名称:WMCore,代码行数:16,代码来源:MonteCarloFromGEN.py

示例4: validateSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
    def validateSchema(self, schema):
        """
        _validateSchema_

        Check for required fields, and some skim facts
        """
        DataProcessing.validateSchema(self, schema)
        mainOutputModules = self.validateConfigCacheExists(configID = schema["ConfigCacheID"],
                                                           configCacheUrl = schema['ConfigCacheUrl'],
                                                           couchDBName = schema["CouchDBName"],
                                                           getOutputModules = True).keys()

        # Skim facts have to be validated outside the usual master validation
        skimSchema = {k: v for (k, v) in schema.iteritems() if k.startswith("Skim")}
        skimArguments = self.getSkimArguments()
        skimIndex = 1
        skimInputs = set()
        while "SkimName%s" % skimIndex in schema:
            instanceArguments = {}
            for argument in skimArguments:
                realArg = argument.replace("#N", str(skimIndex))
                instanceArguments[realArg] = skimArguments[argument]
            try:
                validateArgumentsCreate(skimSchema, instanceArguments)
            except Exception as ex:
                self.raiseValidationException(str(ex))

            self.validateConfigCacheExists(configID = schema["Skim%sConfigCacheID" % skimIndex],
                                           configCacheUrl = schema['ConfigCacheUrl'],
                                           couchDBName = schema["CouchDBName"],
                                           getOutputModules=False)
            if schema["SkimInput%s" % skimIndex] not in mainOutputModules:
                error = "Processing config does not have the following output module: %s." % schema["SkimInput%s" % skimIndex]
                self.raiseValidationException(msg = error)
            skimInputs.add(schema["SkimInput%s" % skimIndex])
            skimIndex += 1

        # Validate that the transient output modules are used in a skim task
        if "TransientOutputModules" in schema:
            diffSet = set(schema["TransientOutputModules"]) - skimInputs
            if diffSet:
                self.raiseValidationException(msg = "A transient output module was specified but no skim was defined for it")
开发者ID:dmwm,项目名称:WMCore,代码行数:44,代码来源:ReReco.py

示例5: validateSchema

# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
    def validateSchema(self, schema):
        """
        _validateSchema_

        Check for required fields, and some skim facts
        """
        DataProcessing.validateSchema(self, schema)
        couchUrl = schema.get("ConfigCacheUrl", None) or schema["CouchURL"]
        mainOutputModules = self.validateConfigCacheExists(configID = schema["ConfigCacheID"],
                                                           couchURL = couchUrl,
                                                           couchDBName = schema["CouchDBName"],
                                                           getOutputModules = True).keys()

        # Skim facts have to be validated outside the usual master validation
        skimArguments = self.getSkimArguments()
        skimIndex = 1
        skimInputs = set()
        while "SkimName%s" % skimIndex in schema:
            instanceArguments = {}
            for argument in skimArguments.keys():
                realArg = argument.replace("#N", str(skimIndex))
                instanceArguments[realArg] = skimArguments[argument]
            msg = validateArguments(schema, instanceArguments)
            if msg is not None:
                self.raiseValidationException(msg)

            self.validateConfigCacheExists(configID = schema["Skim%sConfigCacheID" % skimIndex],
                                           couchURL = couchUrl,
                                           couchDBName = schema["CouchDBName"])
            if schema["SkimInput%s" % skimIndex] not in mainOutputModules:
                error = "Processing config does not have the following output module: %s." % schema["SkimInput%s" % skimIndex]
                self.raiseValidationException(msg = error)
            skimInputs.add(schema["SkimInput%s" % skimIndex])
            skimIndex += 1

        # Validate that the transient output modules are used in a skim task
        if "TransientOutputModules" in schema:
            diffSet = set(schema["TransientOutputModules"]) - skimInputs
            if diffSet:
                self.raiseValidationException(msg = "A transient output module was specified but no skim was defined for it")
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:42,代码来源:ReReco.py


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