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


Python GenericValidationData.createConfiguration方法代码示例

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


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

示例1: createConfiguration

# 需要导入模块: from genericValidation import GenericValidationData [as 别名]
# 或者: from genericValidation.GenericValidationData import createConfiguration [as 别名]
 def createConfiguration(self, path, configBaseName = "TkAlZMuMuValidation" ):
     cfgName = "%s.%s.%s_cfg.py"%( configBaseName, self.name,
                                   self.alignmentToValidate.name )
     repMap = self.getRepMap()
     cfgs = {cfgName:replaceByMap(configTemplates.ZMuMuValidationTemplate,
                                  repMap)}
     GenericValidationData.createConfiguration(self, cfgs, path)
开发者ID:ajaykumar649,项目名称:GeometryComparitionTools,代码行数:9,代码来源:zMuMuValidation.py

示例2: createConfiguration

# 需要导入模块: from genericValidation import GenericValidationData [as 别名]
# 或者: from genericValidation.GenericValidationData import createConfiguration [as 别名]
 def createConfiguration(self, path):
     cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
                                   self.alignmentToValidate.name )
     repMap = self.getRepMap()
     cfgs = {cfgName: configTemplates.PrimaryVertexValidationTemplate}
     self.filesToCompare[GenericValidationData.defaultReferenceName] = \
         repMap["finalResultFile"]
     GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
开发者ID:archiron,项目名称:cmssw,代码行数:10,代码来源:primaryVertexValidation.py

示例3: createConfiguration

# 需要导入模块: from genericValidation import GenericValidationData [as 别名]
# 或者: from genericValidation.GenericValidationData import createConfiguration [as 别名]
 def createConfiguration(self, path):
     cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
                                   self.alignmentToValidate.name )
     repMap = self.getRepMap()
     self.filesToCompare[GenericValidationData.defaultReferenceName] = \
         replaceByMap(".oO[eosdir]Oo./0_zmumuHisto.root", repMap)
     cfgs = {cfgName: configTemplates.ZMuMuValidationTemplate}
     GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
开发者ID:Andrej-CMS,项目名称:cmssw,代码行数:10,代码来源:zMuMuValidation.py

示例4: createConfiguration

# 需要导入模块: from genericValidation import GenericValidationData [as 别名]
# 或者: from genericValidation.GenericValidationData import createConfiguration [as 别名]
 def createConfiguration(self, path ):
     cfgName = "TkAlMcValidate.%s.%s_cfg.py"%(self.name,
                                              self.alignmentToValidate.name)
     repMap = self.getRepMap()
     cfgs = {cfgName:replaceByMap(configTemplates.mcValidateTemplate,
                                  repMap)}
     self.filesToCompare[GenericValidationData.defaultReferenceName] = \
         repMap["resultFile"]
     GenericValidationData.createConfiguration(self, cfgs, path)
开发者ID:12345ieee,项目名称:cmg-cmssw,代码行数:11,代码来源:monteCarloValidation.py

示例5: createConfiguration

# 需要导入模块: from genericValidation import GenericValidationData [as 别名]
# 或者: from genericValidation.GenericValidationData import createConfiguration [as 别名]
    def createConfiguration(self, path, configBaseName = "TkAlOfflineValidation"):
        # if offline validation uses N parallel jobs, we create here N cfg files
        numberParallelJobs = int( self.general["parallelJobs"] )
        # limit maximum number of parallel jobs to 40
        # (each output file is approximately 20MB)
        maximumNumberJobs = 40
        if numberParallelJobs > maximumNumberJobs:
            msg = ("Maximum allowed number of parallel jobs "
                   +str(maximumNumberJobs)+" exceeded!!!")
            raise AllInOneError(msg)
        # if maxevents is not specified, cannot calculate number of events for
        # each parallel job, and therefore running only a single job
        if int( self.general["maxevents"] ) == -1:
            msg = ("Maximum number of events (maxevents) not specified: "
                   "cannot use parallel jobs in offline validation")
            raise AllInOneError(msg)
        if numberParallelJobs > 1:    
            if self.general["offlineModuleLevelHistsTransient"] == "True":
                msg = ("To be able to merge results when running parallel jobs,"
                       " set offlineModuleLevelHistsTransient to false.")
                raise AllInOneError(msg)
        for index in range(numberParallelJobs):
            cfgName = "%s.%s.%s_%s_cfg.py"%(configBaseName, self.name,
                                            self.alignmentToValidate.name,
                                            str(index))
            repMap = self.getRepMap()
            # in this parallel job, skip index*(maxEvents/nJobs) events from
            # the beginning
            # (first index is zero, so no skipping for a single job)
            # and use _index_ in the name of the output file
            repMap.update({"nIndex": str(index)})
            # Create the result file directly to datadir since should not use /tmp/
            # see https://cern.service-now.com/service-portal/article.do?n=KB0000484
            repMap.update({
                "outputFile": replaceByMap(".oO[datadir]Oo./AlignmentValidation_"
                                           + self.name +
                                           "_.oO[name]Oo._.oO[nIndex]Oo..root",
                                           repMap )
                })
            repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
            repMap["outputFile"] = os.path.abspath( repMap["outputFile"] )

            cfgs = {cfgName:replaceByMap(configTemplates.offlineParallelTemplate,
                                         repMap)}
            self.filesToCompare[GenericValidationData.defaultReferenceName] = repMap["resultFile"] 
            GenericValidationData.createConfiguration(self, cfgs, path)
开发者ID:aashaqshah,项目名称:cmssw-1,代码行数:48,代码来源:offlineValidation.py

示例6: createConfiguration

# 需要导入模块: from genericValidation import GenericValidationData [as 别名]
# 或者: from genericValidation.GenericValidationData import createConfiguration [as 别名]
    def createConfiguration(self, path):
        cfgName = "%s.%s.%s_cfg.py"%( self.configBaseName, self.name,
                                      self.alignmentToValidate.name )
        repMap = self.getRepMap()
        if self.NJobs > 1 and self.general["offlineModuleLevelHistsTransient"] == "True":
            msg = ("To be able to merge results when running parallel jobs,"
                   " set offlineModuleLevelHistsTransient to false.")
            raise AllInOneError(msg)

        templateToUse = configTemplates.offlineTemplate
        if self.AutoAlternates:
            if "Cosmics" in self.general["trackcollection"]:
                Bfield = self.dataset.magneticFieldForRun()
                if Bfield > 3.3 and Bfield < 4.3:                 #Should never be 4.3, but this covers strings, which always compare bigger than ints
                    templateToUse = configTemplates.CosmicsOfflineValidation
                    print ("B field for %s = %sT.  Using the template for cosmics at 3.8T.\n"
                           "To override this behavior, specify AutoAlternates = false in the [alternateTemplates] section") % (self.dataset.name(), Bfield)
                elif Bfield < 0.5:
                    templateToUse = configTemplates.CosmicsAt0TOfflineValidation
                    print ("B field for %s = %sT.  Using the template for cosmics at 0T.\n"
                           "To override this behavior, specify AutoAlternates = false in the [alternateTemplates] section") % (self.dataset.name(), Bfield)
                else:
                    try:
                        if "unknown " in Bfield:
                            msg = Bfield.replace("unknown ","",1)
                        elif "Bfield" is "unknown":
                            msg = "Can't get the B field for %s." % self.dataset.name()
                    except TypeError:
                        msg = "B field for %s = %sT.  This is not that close to 0T or 3.8T." % (self.dataset.name(), Bfield)
                    raise AllInOneError(msg + "\n"
                                        "To use this data, turn off the automatic alternates using AutoAlternates = false\n"
                                        "in the [alternateTemplates] section, and choose the alternate template yourself.")

        cfgs = {cfgName: templateToUse}
        self.filesToCompare[
            GenericValidationData.defaultReferenceName ] = repMap["finalResultFile"]
        return GenericValidationData.createConfiguration(self, cfgs, path, repMap = repMap)
开发者ID:DesyTau,项目名称:cmssw,代码行数:39,代码来源:offlineValidation.py


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