Problem when compiling with ACLiC

Hello Everyone.

I’m trying to run a code written by someone else. It has several subfiles where data is loaded, histograms are created ond other things.
The “main program” is this:

#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TSystem.h>
#include <TROOT.h>
#endif

void CombinedFit(TString myopt="fast"){
  char *opt;
  if(myopt.Contains("force")){
    opt=(char*)"kfg"; 
  }
  else{
    opt=(char*)"kg";
  }
  gSystem->CompileMacro("Resolution.cxx", opt);
  gSystem->CompileMacro("Acceptance.cxx", opt);
  gSystem->CompileMacro("lglMatrix.C", opt);
  gSystem->CompileMacro("scanMinuit.C", opt);
  gROOT->ProcessLine("fitnogrid();");
}

I attempt to run the program as follows:

.L /Users/macbookair/Desktop/fit_tool_2comp_prel/CombinedFit.C+
CombinedFit()

and this is the output:

Error in <ACLiC>: The file Resolution.cxx can not be found in the include path: /Users/macbookair:.::/usr/local/Cellar/root/6.22.08_2/include/root:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sd/usr/include/k":"/usr/local/Cellar/root/6.22.08_2/etc/root":"/usr/local/Cellar/root/6.22.08_2/etc/root/cling":"/usr/local/Cellar/root/6.22.08_2/include/root":"/usr/local/Cellar/root/6.22.08_2/include":"/Users/macbookair/":
Error in <ACLiC>: The file Acceptance.cxx can not be found in the include path: /Users/macbookair:.::/usr/local/Cellar/root/6.22.08_2/include/root:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sd/usr/include/k":"/usr/local/Cellar/root/6.22.08_2/etc/root":"/usr/local/Cellar/root/6.22.08_2/etc/root/cling":"/usr/local/Cellar/root/6.22.08_2/include/root":"/usr/local/Cellar/root/6.22.08_2/include":"/Users/macbookair/":
Error in <ACLiC>: The file lglMatrix.C can not be found in the include path: /Users/macbookair:.::/usr/local/Cellar/root/6.22.08_2/include/root:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sd/usr/include/k":"/usr/local/Cellar/root/6.22.08_2/etc/root":"/usr/local/Cellar/root/6.22.08_2/etc/root/cling":"/usr/local/Cellar/root/6.22.08_2/include/root":"/usr/local/Cellar/root/6.22.08_2/include":"/Users/macbookair/":
Error in <ACLiC>: The file scanMinuit.C can not be found in the include path: /Users/macbookair:.::/usr/local/Cellar/root/6.22.08_2/include/root:"/Library/Developer/CommandLineTools/SDKs/MacOSX.sd/usr/include/k":"/usr/local/Cellar/root/6.22.08_2/etc/root":"/usr/local/Cellar/root/6.22.08_2/etc/root/cling":"/usr/local/Cellar/root/6.22.08_2/include/root":"/usr/local/Cellar/root/6.22.08_2/include":"/Users/macbookair/":
input_line_15:2:3: error: use of undeclared identifier 'fitnogrid'
 (fitnogrid())
  ^
Error in <HandleInterpreterException>: Error evaluating expression (fitnogrid()).
Execution of your code was aborted.

ROOT seems unable to find the files I need, though they are on the same directory as CombinedFit.C.

I was under the impression that as long as the files you were trying to include were on the same directory as the code you where trying to run, they would always be found.
How can I solve this?

Thanks you all in advance.

Not sure whether this will help. But if I close ROOT and open it again this issue doesn’t present itself.

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