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


Python MonteCarloWorkloadFactory.__call__方法代码示例

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


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

示例1: __call__

# 需要导入模块: from WMCore.WMSpec.StdSpecs.MonteCarlo import MonteCarloWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.MonteCarlo.MonteCarloWorkloadFactory import __call__ [as 别名]
    def __call__(self, workloadName, arguments):
        """
        Create a workload instance for a LHE Step0 request
        Just pass it down to MonteCarlo
        """
        #Override splitting arguments
        # Splitting arguments
        timePerEvent     = int(arguments.get('TimePerEvent', 60))
        filterEfficiency = float(arguments.get('FilterEfficiency', 1.0))
        totalTime        = int(arguments.get('TotalTime', 9 * 3600))
        self.totalEvents = int(int(arguments['RequestNumEvents']) / filterEfficiency)
        if arguments.get("LheInputFiles", False) == True \
             or arguments.get("LheInputFiles", False) == "True":
            self.lheInputFiles = True

        # These are mostly place holders because the job splitting algo and
        # parameters will be updated after the workflow has been created.
        eventsPerJob = int(totalTime/timePerEvent/filterEfficiency)
        self.prodJobSplitAlgo  = arguments.setdefault("ProdJobSplitAlgo", 'EventBased')
        self.prodJobSplitArgs  = arguments.setdefault("ProdJobSplitArgs",
                                               {"events_per_job": eventsPerJob,
                                                "events_per_lumi": arguments['EventsPerLumi']})
        self.prodJobSplitArgs.setdefault("lheInputFiles", self.lheInputFiles)
        mcWorkload = MonteCarloWorkloadFactory.__call__(self, workloadName, arguments)
        mcWorkload.setBlockCloseSettings(mcWorkload.getBlockCloseMaxWaitTime(), 5,
                                         250000000, mcWorkload.getBlockCloseMaxSize())

        return mcWorkload
开发者ID:cinquo,项目名称:WMCore,代码行数:30,代码来源:LHEStepZero.py

示例2: __call__

# 需要导入模块: from WMCore.WMSpec.StdSpecs.MonteCarlo import MonteCarloWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.MonteCarlo.MonteCarloWorkloadFactory import __call__ [as 别名]
    def __call__(self, workloadName, arguments):
        """
        Create a workload instance for a LHE Step0 request
        Just pass it down to MonteCarlo
        """
        #Override splitting arguments
        # Splitting arguments
        timePerEvent     = int(arguments.get('TimePerEvent', 60))
        filterEfficiency = float(arguments.get('FilterEfficiency', 1.0))
        totalTime        = int(arguments.get('TotalTime', 9 * 3600))
        self.totalEvents = int(int(arguments['RequestNumEvents']) / filterEfficiency)

        # These are mostly place holders because the job splitting algo and
        # parameters will be updated after the workflow has been created.
        eventsPerJob = int(totalTime/timePerEvent/filterEfficiency)
        self.prodJobSplitAlgo  = arguments.setdefault("ProdJobSplitAlgo", 'EventBased')
        self.prodJobSplitArgs  = arguments.setdefault("ProdJobSplitArgs",
                                               {"events_per_job": eventsPerJob,
                                                "events_per_lumi": arguments['EventsPerLumi']})
        return MonteCarloWorkloadFactory.__call__(self, workloadName, arguments)
开发者ID:stuartw,项目名称:WMCore,代码行数:22,代码来源:LHEStepZero.py

示例3: __call__

# 需要导入模块: from WMCore.WMSpec.StdSpecs.MonteCarlo import MonteCarloWorkloadFactory [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.MonteCarlo.MonteCarloWorkloadFactory import __call__ [as 别名]
 def __call__(self, workflowName, args):
     workload = MonteCarloWorkloadFactory.__call__(self, workflowName, args)
     #delattr(workload.taskIterator().next().steps().data.application.configuration,
     #        'configCacheUrl')
     return workload
开发者ID:AndresTanasijczuk,项目名称:WMCore,代码行数:7,代码来源:TestMonteCarloWorkload.py


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