Hi, this is a pretty basic question but I could not find existing posts about it.
I had my code in a big analysis.C file which I ran as a named macro using:
In the file I had my main function called “analysis” and several other functions.
I want to move the other functions now to an external file so that I can #include/.L them separately from the main “analysis” function. I took all the function declarations and put them in algorithms.h and the definitions in algorithms.C (along with proper #includes).
From CINT I can .L algorithms.C+ and see the functions and use them. But now I am unsure how to make analysis.C know about the algorithms file. I put #include “algorithms.h” but it does not like it, I also tried putting gROOT->LoadMacro(“algorithms.C+”) in the body of the analysis function, but always it says “not defined in current scope”.
What is the proper way to include personal .h and .C files into another ROOT named macro? I thought it would be straightforward, but apparently I am missing something.
Thanks,
Jean-François