Autocompletion in ROOT 6


I have just started transitioning from ROOT5 to 6 and I’m having an issue with my macros that used to work in ROOT 5.

Basically, in , there exists a namespace FFTtools that has a bunch of functions as well as classes. However, upon loading, I can’t call any of the functions. The namespace name itself autocompletes, but nothing past it, and if I try to use a function within the namespace, it won’t work until I create a class inside the namespace. Is this expected?

However, once I create an instance of an object within FFTtools, then suddenly I can autocomplete and call methods. Here is a snippet demonstrating the problem:

[cozzyd@midway-login2 libRootFftwWrapper]$ cat rootlogon.C 
[cozzyd@midway-login2 libRootFftwWrapper]$ ls lib/
[cozzyd@midway-login2 libRootFftwWrapper]$ root
root [0] FFTtools::doFFT(100, 0) 
ROOT_prompt_0:1:11: error: no member named 'doFFT' in namespace 'FFTtools'
FFTtools::doFFT(100, 0)
root [1] FFTtools::SineSubtract sub
(FFTtools::SineSubtract &) @0x7f8f1b05b0e8
root [2] FFTtools::
...a bunch of stuff including
... a bunch more

This can be fixed by #including the appropriate header, but it would be a little annoying to go through all the macros and make sure everything is included, when it seems like the functionality is almost there without it.

Dear Cosmin,

apologies: your post got a bit buried.
The behaviour you are reporting is due to the fact that presently ROOT6 does not support function triggered autoloading of libraries and related header autoparsing. The ultimate reason is the the resolution of function overloads.

A possible workaround can be to instantiate a class in the FFTtools namespace before calling functions or, as you already proposed, including the appropriate headers.