How to read function documentation

This is probably a standard C++ thing, but I’m a C++ noob.
What I’m looking for is something similar to Python’s help(function_name), something that will just tell me what a function takes as input and what it does. I guess this information is in the ROOT reference guide, but I’m struggling to actually find the function I’m looking for there.

Specifically, I’m trying to figure out the format string of the function Draw, which I guess is part of the class TF1.

Not sure there is an equivalent of Python’s help() in C++/doxygen. However, I believe this is what you want to look at from TF1. Cheers,

For a quick reference within the root prompt, you can use the Tab key; e.g.

 TF1 *f = new TF1(<tab>

will give you a list of all constructors and their inputs. Then,

 f->D<tab>

would give you (after “f” was already created as a TF1) a list of all member functions that start with D, etc.
This doesn’t display descriptions or other details, but it’s still useful.

2 Likes

Thanks for both of your help!

@amadio, what did you search in order to find the function? When I search TF1::Draw, there are no matches.

Hi,
you can just search Draw and then select the version you want from the drop-down menu.

OK that makes sense :slight_smile:

I just went into the top node of TF1 and did a browser search for Draw.