本文整理汇总了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
示例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)
示例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