From 35e96462b50c5ce89b340e8d5bcab9a2cb5bfd61 Mon Sep 17 00:00:00 2001 From: cholm Date: Tue, 30 Nov 2010 20:26:53 +0000 Subject: [PATCH] Added some ignores and moved script --- PWG2/FORWARD/analysis2/scripts/Compile.C | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 PWG2/FORWARD/analysis2/scripts/Compile.C diff --git a/PWG2/FORWARD/analysis2/scripts/Compile.C b/PWG2/FORWARD/analysis2/scripts/Compile.C new file mode 100644 index 00000000000..dbfc35e38b6 --- /dev/null +++ b/PWG2/FORWARD/analysis2/scripts/Compile.C @@ -0,0 +1,40 @@ +//____________________________________________________________________ +// +// $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 + * + * @ingroup pwg2_forward_analysis_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("libPWG2forward2.so"); + TString macroPath(gROOT->GetMacroPath()); + macroPath.Append(":${ALICE_ROOT}/FMD/scripts"); + gROOT->SetMacroPath(macroPath.Data()); + gSystem->SetIncludePath("-I`root-config --incdir` " + "-I${ALICE_ROOT} " + "-I${ALICE_ROOT}/include " + "-I${ALICE_ROOT}/PWG2/FORWARD/analysis2 "); + Long_t ret = gROOT->ProcessLine(Form(".L %s+%s", script, option)); + return ret == 0; +} + +//____________________________________________________________________ +// +// EOF +// -- 2.43.0