本文整理汇总了Python中FWCore.PythonUtilities.LumiList.LumiList.__and__方法的典型用法代码示例。如果您正苦于以下问题:Python LumiList.__and__方法的具体用法?Python LumiList.__and__怎么用?Python LumiList.__and__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FWCore.PythonUtilities.LumiList.LumiList
的用法示例。
在下文中一共展示了LumiList.__and__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getDatasetLumiList
# 需要导入模块: from FWCore.PythonUtilities.LumiList import LumiList [as 别名]
# 或者: from FWCore.PythonUtilities.LumiList.LumiList import __and__ [as 别名]
def getDatasetLumiList(self, name, catalog, check=False):
from FWCore.PythonUtilities.LumiList import LumiList
lumisToSkip = catalog[name].get("lumisToSkip", None)
if lumisToSkip:
print "Dataset %s has list of lumi sections to skip in catalog" % name
lumisToSkip = LumiList(compactList=lumisToSkip)
dlist = LumiList()
for fil in catalog[name]["files"]:
flist = LumiList(runsAndLumis=fil.get("lumis", {}))
if lumisToSkip and not check:
flist = flist.__sub__(lumisToSkip)
if check:
andlist = dlist.__and__(flist)
## print andlist, fil.get("name")
if len(andlist) != 0:
print "Warning: duplicate lumi sections in dataset. %s" % fil.get("name")
print andlist, flist
dlist += flist
return dlist