Print histograms in line-printer format on screen

Is there an option to print an histogram in line-printer ascii format on the terminal?

This is not just an anachronistic wish from a user of the good old HBOOK times. My students (who never heard of hbook nor probably even paw) would strongly benefit from this feature to quickly look at histos when running ROOT at CERN from our home institution. It is simply to slow to open canvases remotely.

The short answer is “no”. The equivalent of the PAW H/PRINT command has not been put back in ROOT. This command was useful when we had some “ASCII only” terminal. But these days that’s no the case anymore.

The drawing speed is an other issue. What is so slow in your case ? the canvas opening itself or the graphics drawing inside the canvas once it is open ? Drawing an histogram with simple settings should be very fast even over the network.

Hi,

If you have a local root installed, you can also use the remote session facility, allowing to collect the graphic output objects and to display them locally. To display a small help from the Root command prompt, just type “.R -?”: root [1] .R -? Info in <TRint::ProcessRemote>: remote session help: .R [user@]host[:dir] [-l user] [-d dbg] [[<]script] | [host] -close Create a ROOT session on the specified remote host. The variable "dir" is the remote directory to be used as working dir. The username can be specified in two ways, "-l" having the priority (as in ssh). A "dbg" value > 0 gives increasing verbosity. The last argument "script" allows to specify an alternative script to be executed remotely to startup the session, "roots" being the default. If the script is preceeded by a "<" the script will be sourced, after which "roots" is executed. The sourced script can be used to change the PATH and other variables, allowing an alternative "roots" script to be found. To close down a session do ".R host -close". To switch between sessions do ".R host", to switch to the local session do ".R". To list all open sessions do "gApplication->GetApplications()->Print()". root [2]
So you can try: root [1] .R username@lxplus.cern.ch:~/any/directory/ lxplus.cern.ch:root [2]
the prompt displays in which session you are (e.g. lxplus.cern.ch:root). Then, you can switch between local and remote session:lxplus.cern.ch:root [3] .R root [4] root [5] .R lxplus.cern.ch lxplus.cern.ch:root [6]And all this doesn’t requires a fast network connection. And it woks also between different platforms (e.g. I can connect to lxplus and display histograms from my local Windows root session).
Hope this can help.

Cheers,Bertrand.

What a pity.

It is the canvas opening that is (very) slow.

Thanks a lot for the tip. It looks exactly like what we need, except that one can not access Cern machines from outside, except lxplus.
I should investigate if Cern allows tunnelling… unless you have a better suggestion.

Hi,

Well, yes, I know, but it is what you asked for:

Or did I miss something?

Cheers, Bertrand.

[quote=“bellenot”]

Well, yes, I know, but it is what you asked for:

Or did I miss something?[/quote]
I should have made myself clearer. We run ROOT not on lxplus but on the Atlas Trigger Offline cluster, where large ntuples reside. These are updated regularly, and we need to quickly browse distributions to decide what action to take, for instance to contact an expert or to selectively slim the ntuples to transfer them offsite for a more thorough inspection.
To remotely open canvas windows from the cluster is unacceptably slow. We could envision to transfer the ntuples each time to a /tmp on lxplus and apply your suggestion, but it is cumbersome (but the best alternative up to now!). The ideal would be a fast way to browse them directly on the Atlas cluster, and that’s where I thought of the fast ascii format, which I used frequently in paw times.

Why don’t you run an Apache server on your Atlas offline cluster and access
your files from any machine on the world, eg if your server is
atlas/cern.ch/offline
you can open a root file fom any machine with

TFile *f = TFile::Open("http://atlas/cern.ch/offline/mydir/somefile.root"); and then proceed as a normal local file

Rene

Ok thanks, will give it a try.

If you can run a web server, then Rene’s last suggestion is probably your easiest. But in any case, it sounds like a good homework problem for your student to implement the line-printer ascii output for a TH1. (Meaning I don’t think the Root folks will write one, but you could.)

Cheers,
Charles

[quote=“brun”]Why don’t you run an Apache server on your Atlas offline cluster and access
your files from any machine on the world, eg if your server is
atlas/cern.ch/offline
you can open a root file fom any machine with
[/quote]

A while ago I asked if it was possible to set a username/password so you could access files from internal web servers. Any luck here?

Thanks,
Charles

Fons will answer your question

Rene

This feature still has to be added. Coming soon.

– Fons

[quote=“rdm”]This feature still has to be added. Coming soon.
[/quote]

Thanks!

Hi Charles,

the basic authentication support is now implemented in the trunk version.

Cheers, Fons.

Hi Fons,

[quote=“rdm”]Hi Charles,

the basic authentication support is now implemented in the trunk version.

Cheers, Fons.[/quote]

Sweet!

Thanks,
Charles