ROOT logo
//____________________________________________________________________
//
// $Id: Compile.C 30305 2008-12-09 05:45:53Z cholm $
//
// Script to compile (using ACLic) and load a script.  It sets the
// include path to contain the relevant directories. 
//
/** 
 * Compile an FMD script using ACLic
 *
 * @param script Script to compile
 * @param option Compile option 
 * 
 * @return true on success
 * 
 * @ingroup pwglf_forward_scripts
 */
Bool_t
Compile(const char* script, Option_t* option="g")
{
  if (!script || script[0] == '\0') { 
    std::cerr << "No script to compile!" << std::endl;
    return kFALSE;
  }
  gSystem->Load("libANALYSIS.so");
  gSystem->Load("libANALYSISalice.so");
  gSystem->Load("libPWGLFforward2.so");
  TString macroPath(gROOT->GetMacroPath());
  macroPath.Append(":${ALICE_ROOT}/PWGLF/FORWARD/analysis2");
  macroPath.Append(":${ALICE_ROOT}/PWGLF/FORWARD/analysis2/scripts");
  gROOT->SetMacroPath(macroPath.Data());
  gSystem->SetIncludePath("-I`root-config --incdir` "
			  "-I${ALICE_ROOT} " 
			  "-I${ALICE_ROOT}/include " 
			  "-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2 "
			  "-I${ALICE_ROOT}/PWGLF/FORWARD/analysis2 ");
  Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option));
  return ret == 0;
}

//____________________________________________________________________
//
// EOF
// 
 Compile.C:1
 Compile.C:2
 Compile.C:3
 Compile.C:4
 Compile.C:5
 Compile.C:6
 Compile.C:7
 Compile.C:8
 Compile.C:9
 Compile.C:10
 Compile.C:11
 Compile.C:12
 Compile.C:13
 Compile.C:14
 Compile.C:15
 Compile.C:16
 Compile.C:17
 Compile.C:18
 Compile.C:19
 Compile.C:20
 Compile.C:21
 Compile.C:22
 Compile.C:23
 Compile.C:24
 Compile.C:25
 Compile.C:26
 Compile.C:27
 Compile.C:28
 Compile.C:29
 Compile.C:30
 Compile.C:31
 Compile.C:32
 Compile.C:33
 Compile.C:34
 Compile.C:35
 Compile.C:36
 Compile.C:37
 Compile.C:38
 Compile.C:39
 Compile.C:40
 Compile.C:41
 Compile.C:42
 Compile.C:43
 Compile.C:44
 Compile.C:45