本文整理汇总了Python中WMCore.DataStructs.Job.Job.baggage方法的典型用法代码示例。如果您正苦于以下问题:Python Job.baggage方法的具体用法?Python Job.baggage怎么用?Python Job.baggage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.DataStructs.Job.Job
的用法示例。
在下文中一共展示了Job.baggage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getDataStructsJob
# 需要导入模块: from WMCore.DataStructs.Job import Job [as 别名]
# 或者: from WMCore.DataStructs.Job.Job import baggage [as 别名]
def getDataStructsJob(self):
"""
_getDataStructsJob_
Returns the DataStructs version of this job
"""
job = WMJob(name = self['name'])
# Transfer all simple keys
for key in self.keys():
keyType = type(self.get(key))
if keyType in [str, long, int, float]:
job[key] = self[key]
for file in self['input_files']:
job['input_files'].append(file.returnDataStructsFile())
job['mask'] = WMMask()
for key in self["mask"].keys():
job["mask"][key] = self["mask"][key]
job.baggage = self.baggage
return job