.help metacommand extension and use with Python/Jupyter

ROOT Version: 6.22/02
Platform: CentOS 7
Compiler: GCC 4.8

Dear ROOT developers,

Thank you for a great feature you implemented recently: Class Reference Guide
access with .help metacommand announced in
ROOT Version 6.20 Release Notes.

I want to ask you some questions about this .help documentation command.

Can you tell me how to use .help command for a project deriving from ROOT?
Here is a quick-and-dirty patch to implement a TApplication::set_url()
method (renamed to .txt for upload): 0001-bt_spn-20401-TApplication-Reference-URL-can-be-set.txt (8.3 KB) .

However I realise that an add_url() method may be more relevant: ROOT
elements would then open ROOT: ROOT Reference Documentation while a derived
class may open a different (even local) URL.

I wasn’t able to find an equivalent command with Python or Jupyter (C++ or
Python). That’s why I used TApplication::ProcessLine():

$ ipython -c "import ROOT; ROOT.gApplication.ProcessLine('.help TCanvas')"

Can you show me a less cumbersome command please?

I also notice that the following command didn’t open the requested

$ root -q -e ".help TCanvas::GetWw"

Best regards,

1 Like

@Axel Can you comment?

First of all, thanks for your appreciation of .help! I bet many of our users don’t know about it :slight_smile:

I think we should try to tweak the model a bit. I suppose the idea is to have user code support for .help? I.e. you have your classes documented as some URL, and ROOT has its some place else?

Then we’d need to annotate the libraries with their documentation location. We could do that as part of the dictionaries. Better ideas?

For Python we should hook the functions invoked by .help into Python’s help system. Ideas? Remember that we have PyROOT, i.e. we get to add to what Python sees as our classes.

Cheers, Axel.

Thank you for your answer.

You perfectly understood our request. Using the aforementioned patch
here is the result of an installation of ROOT and a derived project.

Both Doxygen documentations were merged. And a rootlogon was written:

void rootlogon() {

The “proof of concept” seems to work for ROOT:

$ root -q /[...]/rootlogon.C -e ".help TCanvas::GetWindowTopX"

and the derived project:

$ root -q /[...]/rootlogon.C -e ".help URANIE::DataServer::TNormalDistribution::getParameterMu"

I decided not to overwrite ROOT documentation. Hence incoherence of the navigation panel can be observed.

As a mere user of ROOT I don’t know what would be the best implementation.
Some users may need a standalone offline installation (without access to ROOT: ROOT Reference Documentation). And being able to “move” an installation may be useful (Building ROOT from source - ROOT).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.