From your “src/ROOTTermBrowser.cpp”, remove everything from “PANEL* p …” up to “delete dummy_c;” (I have no idea why you claim it is needed).
Also, try:
if ((arg == “-h”) || (arg == “-?”) || (arg == “–help”) || (arg == “–usage”))
thanks for all your comments. I’ve made it possible to invoke cmt line help via -h, --help, -? or --usage. I also expanded the help to look like the help from rootls.
I also fixed the in program help, sorry for that.
Regarding the mysterious code in src/ROOTTermBrowser.cpp, I’m not sure why this was needed, actually I wrote most of the code long time ago with root 3.14 and I think there was a problem with the compilation. I removed it as it compiles fine anyways.
About customizable colors, this is not implemented so far. I’ve just made it to work in my terminal and it’s color scheme, but this definitely is something that should be implemented.
I think you need to edit a bit the copy/paste you did from rootls …
$ rootbrowsetty -h
usage: rootbrowsetty [-h] FILE [File ...]
Display ROOT files with a tty alternative to the TBrowser
positional arguments:
FILE Input file
optional arguments:
-h, --help show this help message and exit
Examples:
- rootls example.root
Browse contents of the ROOT file 'example.root'.
- rootls file1.root file2.root
Browse contents of ROOT files 'file1.root' and 'file2.root'.
- rootls *.root
Browse contents of ROOT files whose name ends with '.root'.
The lines in the browser, I mean the panels and the separating line, as well as the help window are made with special characters. However, the histograms are actually produced by an eps parsing algorithm. The whole procedure is that when you klick on an entry in the panel and it’s a TCanvas/TH1/TBranch it is drawn and/or saved to an eps file, which is parsed back and searched for lines/polygons. Then the lines are drawn with an approximation of the original orientation which is necessary for rotated lines (for example for a TGraph, which reminds me, that they cannot be drawn right now, which is easy to implement though). OK, one could optimize the code for exactly horizontal/vertical lines and maybe also for corners, but then graphs might not always look consistently bad .
After discussion with the ROOT team it was decided that the implication as you did it can stay as a tar file people can pick from the forum when they need it.
It was also said that the proper implementation in ROOT would be to have a special option in Dump() or Print(). Then, when done, the rootbrowsetty command could be a python script based on this.
ok, that should be possible, however I think the rootbrowsertty is a bit overhead for this. There is also a binary, which is compiled with the package, that directly draws eps file to the terminal window (EpsDrawToTerm). I think this would be an easier solution, to wrap that code into the Print/Dump function.
Ok in that case we can leave it as a tar file here and people who need it can just take it from here. It is easy to install. If later on a large number of people would like to have it distributed with root we can consider including in the distribution.
Ok, will this be advertised somewhere? I mean the usual user will not go through the forum and search for new stuff just in case he might need it at some point.