View ROOT Files directly in VS Code!

For me, there are two problems with the new toy.

  1. When VS Code works in one of the “SSH TARGETS” in the “Remote Explorer”, it doesn’t seem to be able to browse remote ROOT files at all (well, at least I wasn’t able to get it working).

  2. It is only well suited for simple / flat ntuples which use ordinary C++ data types. It does not really understand C++ classes, including ROOT’s own classes, so it “flattens” all available data. Assume that you have a “TTree” which keeps some “objects”. Take a simple “TVector3” and all three coordinates are mixed together (and there is no way to draw, e.g., the “X()” or the “Mag()”).

Well, ROOT provides a standalone tool (needs the python feature): rootbrowse
Without python, you can simply execute (e.g., create a shell alias): root -e "TBrowser b"
Of course, you do need a working ROOT binary distribution for them … but if you work on ROOT related source code, you anyhow must have it on your “target machine”.
These standard ROOT executables do understand all standard ROOT classes, and if your ROOT files use some nonstandard ones, you can simply load the corresponding shared libraries to be able to inspect them.