我有两个根文件,现在正在使用根除3.12
td = uproot.open("data.root")
tc = uproot.open("cuts.root")
tc
包含一些十位列表,它们为td
提供选定的事件。使用“根除”,我可以加载tc
,并可以查看事件列表。可用的方法
tc.read
tc.classname
我不知道如何使用这些,它似乎没有记录。。。 由于Outlot使用numpy,所以我希望以某种方式获得一个bool数组或索引数组,以应用为cut或迭代
a = tc["EventList"]
a.read
返回
<bound method ROOTObject.read of <class 'uproot.rootio.TEntryList'>>
及
a.read()
返回
TypeError: read() missing 4 required positional arguments: 'source', 'cursor', 'context', and 'parent'
以下属性对TEntryList可用,但似乎没有一个是可以用于将事件列表应用于树的布尔或索引数组_fN
返回合理数量的条目,_fFileName
指向正确的文件,_fTreeName
正确
a = tc["EventList"]
dir(a)
返回
'_bases',
'_classname',
'_classversion',
'_copycontext',
'_fBlocks',
'_fEntriesToProcess',
'_fFileName',
'_fLists',
'_fN',
'_fNBlocks',
'_fName',
'_fReapply',
'_fTitle',
'_fTreeName',
'_fields',
'_format1',
'_format2',
'_format3',
'_hasreadobjany',
'_int32',
'_members',
'_methods',
'_postprocess',
'_pycode',
'_readinto',
'_recarray',
'_recarray_dtype',
'_versions',
'classname',
'read'
目前没有回答
相关问题 更多 >
编程相关推荐