https://github.com/pseyfert/go-list-root-trees
list ttrees in a root file
https://github.com/pseyfert/go-list-root-trees
Last synced: 8 months ago
JSON representation
list ttrees in a root file
- Host: GitHub
- URL: https://github.com/pseyfert/go-list-root-trees
- Owner: pseyfert
- License: gpl-3.0
- Created: 2018-08-27T21:51:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T21:41:10.000Z (about 7 years ago)
- Last Synced: 2025-04-12T04:05:10.641Z (about 1 year ago)
- Language: Go
- Size: 3.56 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-list-root-trees
[](LICENSE)
[](https://travis-ci.org/pseyfert/go-list-root-trees)
This is a command line tool to list all trees in a root file.
The behaviour should be similar to that of `root_numpy.list_trees`. That is,
trees in subdirectories in a file are listed.
This should shorten a user's lookups traversing subdirectories.
The tool is intended to ease usage of other command line programs that read
trees from root files, such as DooSelection tools or the
[tmva-branch-adder](https://github.com/pseyfert/tmva-branch-adder). It can be
used for tab completion functions.
printout looks like:
```
pseyfert@robusta ~/coding/tmva-branch-adder > root-ls-tree /afs/cern.ch/user/p/pseyfert/DTT.root
EventTuple/EventTuple B02DD/DecayTree GetIntegratedLuminosity/LumiTuple
```
# TODO:
- for the intended use case of tab completions, low latency is key, so a
closer look at performance should be taken at some point.
- possibly an argument to prepend path names to the printout in a root
standard format (`rootls` accepts `.root:/`) So for
some interfaces having filename and tree path together might be more
convenient:
```
pseyfert@robusta ~/coding/tmva-branch-adder > root-ls-tree -f /afs/cern.ch/user/p/pseyfert/DTT.root
/afs/cern.ch/user/p/pseyfert/DTT.root:EventTuple/EventTuple
/afs/cern.ch/user/p/pseyfert/DTT.root:B02DD/DecayTree
/afs/cern.ch/user/p/pseyfert/DTT.root:GetIntegratedLuminosity/LumiTuple
```