我已经与ROOT广泛合作,它有自己的数据文件格式,但由于各种原因,我们希望切换到HDF5文件。不幸的是,我们仍然需要一些在格式之间翻译文件的方法。有没有人知道任何现有的图书馆这样做?HDF5与ROOT框架的集成
回答
你可能会检查出rootpy,这对于通过PyTables转换ROOT文件到HDF5设施:如果这个问题仍然是你的兴趣http://www.rootpy.org/commands/root2hdf5.html
,最近也出现了较大的改进rootpy的root2hdf5脚本和root_numpy包(其中root2hdf5用来TTrees转换为NumPy的结构数组):
root2hdf5 -h
usage: root2hdf5 [-h] [-n ENTRIES] [-f] [--ext EXT] [-c {0,1,2,3,4,5,6,7,8,9}]
[-l {zlib,lzo,bzip2,blosc}] [--script SCRIPT] [-q]
files [files ...]
positional arguments:
files
optional arguments:
-h, --help show this help message and exit
-n ENTRIES, --entries ENTRIES
number of entries to read at once (default: 100000.0)
-f, --force overwrite existing output files (default: False)
--ext EXT output file extension (default: h5)
-c {0,1,2,3,4,5,6,7,8,9}, --complevel {0,1,2,3,4,5,6,7,8,9}
compression level (default: 5)
-l {zlib,lzo,bzip2,blosc}, --complib {zlib,lzo,bzip2,blosc}
compression algorithm (default: zlib)
--script SCRIPT Python script containing a function with the same name
that will be called on each tree and must return a tree or
list of trees that will be converted instead of the
original tree (default: None)
-q, --quiet suppress all warnings (default: False)
,当我最后一次检查的(几个月前)root2hdf5有一个限制,即它无法处理它是阵列TBranches。出于这个原因,我写了一个bash脚本:root2hdf(对于非创意名称感到抱歉)。
它将ROOT文件和文件中TTree的路径作为输入参数并生成源代码&编译为可在ROOT文件上运行的可执行文件,将它们转换为HDF5数据集。
它也有一个限制,它不能处理化合物TBranch类型,但我不知道root2hdf5也没有。
我被你的TH3Danim分心了。这很酷,但[它泄漏内存](https://github.com/ghollisjr/TH3Danim/blob/master/TH3Danim.hh#L62)。 – Shep 2014-02-10 12:53:27
啊是的TH3Danim有点灰尘;我真的只在ROOT会话中使用它,所以它没有抱怨在第一次使用时试图释放内存。我会修补它。 – ghollisjr 2014-02-11 20:24:44
很确定,仍然没有这样做:你在一个指针数组上调用数组析构函数,它只会删除指向这些对象的所有指针,而不会触及这些对象。 – Shep 2014-02-12 23:10:50
- 1. 集成Bot框架与UWP
- 2. 与maven集成玩框架
- 3. Cortana与Bot框架集成
- 4. 良好的JavaScript框架与Django集成?
- 5. 与Spring集成框架的Tcp连接
- 6. three20框架集成?
- 7. 如何将extJs与zend框架集成?
- 8. 集成MVC(PHP)框架与CMS
- 9. Themeforest主题与Yii框架集成
- 10. C++库与Ionic框架集成
- 11. 与ZK框架集成JQuery步骤
- 12. 将Javascript MVC框架与后端集成
- 13. 将JavaScript框架与Java Web框架集成
- 14. 集成Play框架2.0和Spring框架
- 15. android,andengine,pureMVC框架集成
- 16. Java Ajax框架集成
- 17. Spring和Mock框架集成
- 18. 集成测试框架?
- 19. Python,ROOT和MINUIT集成?
- 20. 框架集边框地狱框架集
- 21. C++,ROOT框架:定期调用的成员方法
- 22. 集成测试的游戏框架2.5
- 23. Perl的哪个持续集成框架?
- 24. Zend框架用户认证与Twitter和Facebook的集成
- 25. 是Drools 6.5与Spring框架的集成弃用?
- 26. 微软Bot框架与Slack的集成被破坏
- 27. WSO2 Identity Server可以与现有的CAS框架集成吗?
- 28. 集成框架.NET像骆驼/ Spring集成
- 29. 在目标c框架中集成swift
- 30. Zend框架和XML/XSLT集成
也发现这个独立(这是我找到的)。 – Shep 2012-05-19 05:57:26
现在还有其他一些: - https://github.com/havoc-io/root2hdf5 - https://github.com/diana-hep/rootconverter/blob/master/root2hdf5/src/root2hdf5.cpp – DragonTux 2016-04-20 07:55:49