TBrowser not working


ROOT Version: 6.28/04
Platform: Ubuntu 22.04
Compiler: Built for linuxx8664gcc on May 08 2023, 02:44:07 (?)


I downloaded the Root precompiled version into my local PC. In my local PC I have a file file.root, which I want to explore visually. In a terminal I navigate to wherever this file is, and type root to open Root. Now I type TBrowser("file.root"). A web browser window opens up, in blank, and some error is shown in Root with a suggestion to use --web=off. I close Root and run root --web=off, and now enter TBrowser("file.root"). Now the GUI opens up, and one second later it closes. No message is printed.

I know the file is not corrupted because a colleague can open it with the TBrowser.

What am I doing wrong?

Hi @0101101,

Two mistakes there, it seems. First of all the first argument to the TBrowser constructor is not a path to the file (as you can see here). It is a name used to identify that TBrowser instance instead.

Second, the code, as typed creates a temporary TBrowser object that gets destructed immediately after.

Here’s what you can do instead:

  1. Launch ROOT passing the path to the .root file as in:
$ root /path/to/file.root
  1. Create a TBrowser as follows:
root [0] TBrowser b;

Cheers,
J.

1 Like

Gracias @jalopezg !

1 Like