我已經與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. 與maven集成玩框架
- 2. Cortana與Bot框架集成
- 3. 集成Bot框架與UWP
- 4. 集成Hadoop和HDF5
- 5. HDF5和ROOT文件
- 6. 大氣與Spring MVC框架的集成:
- 7. ding與zend框架的集成
- 8. 與Spring集成框架的Tcp連接
- 9. 良好的JavaScript框架與Django集成?
- 10. three20框架集成?
- 11. 將Sendgrid與Zend框架集成
- 12. 如何將MySQL與Zend框架集成?
- 13. 如何將wicket框架與mongoDB集成?
- 14. 如何將extJs與zend框架集成?
- 15. 將Javascript MVC框架與後端集成
- 16. 如何將ExtJS與Spring框架集成
- 17. 集成MVC(PHP)框架與CMS
- 18. 集成Spotify SDK與其他框架
- 19. GWT與Spring安全框架集成
- 20. 與ZK框架集成JQuery步驟
- 21. C++庫與Ionic框架集成
- 22. Themeforest主題與Yii框架集成
- 23. 集成Play框架2.0和Spring框架
- 24. 將JavaScript框架與Java Web框架集成
- 25. Java Ajax框架集成
- 26. monodevelop實體框架集成
- 27. Zend框架和Authorize.net集成
- 28. Javascript集成測試框架
- 29. 集成測試框架?
- 30. android,andengine,pureMVC框架集成
也發現這個獨立(這是我找到的)。 – 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