本文整理汇总了Python中DataFormats.FWLite.Events.fileIndicies方法的典型用法代码示例。如果您正苦于以下问题:Python Events.fileIndicies方法的具体用法?Python Events.fileIndicies怎么用?Python Events.fileIndicies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataFormats.FWLite.Events
的用法示例。
在下文中一共展示了Events.fileIndicies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Events
# 需要导入模块: from DataFormats.FWLite import Events [as 别名]
# 或者: from DataFormats.FWLite.Events import fileIndicies [as 别名]
#! /usr/bin/env python
from DataFormats.FWLite import Events, Handle
import optparse
print "starting python test"
files = ['empty.root', 'good.root', 'empty.root', 'good_delta5.root']
events = Events (files)
thingHandle = Handle ('std::vector<edmtest::Thing>')
indicies = events.fileIndicies()
for event in events:
newIndicies = event.fileIndicies()
if indicies != newIndicies:
print "new file"
indicies = newIndicies
event.getByLabel ('Thing', thingHandle)
thing = thingHandle.product()
for loop in range (thing.size()):
print thing.at (loop).a
events.toBegin()
for event in events:
pass
events.toBegin()
for event in events:
event.getByLabel ('Thing', thingHandle)