R__ADD_INCLUDE_PATH($RATROOT/include); R__ADD_INCLUDE_PATH($RATROOT/include/libpq); R__ADD_INCLUDE_PATH($RATROOT/include/external); R__ADD_LIBRARY_PATH($RATROOT/lib); R__LOAD_LIBRARY(RATEvent_$RATSYSTEM); void rootinit(){ gROOT->SetStyle("Plain"); gStyle->SetCanvasBorderMode(0); gStyle->SetPadBorderMode(0); gStyle->SetPadColor(0); gStyle->SetCanvasColor(0); string RATSYSTEM = getenv("RATSYSTEM"); string libname = string("libRATEvent_") + RATSYSTEM; gSystem->AddDynamicPath(TString::Format("%s/%s", getenv("RATROOT"), "lib")); gSystem->Load(libname.c_str()); cout << "RAT: Libraries loaded." << endl; // Try to get the compiler to determine later options. // Sometimes, the compiler version returns just "c++" (default), // so also return the build architecture which contains the compiler. string compiler(gSystem->GetBuildCompilerVersion()); string buildarc(gSystem->GetBuildArch()); // Use isystem (if available) to prevent compiler warnings when compiling from ROOT. string include_prefix = "-I"; if (compiler.find("gcc") != string::npos || compiler.find("g++") != string::npos || compiler.find("clang") != string::npos || buildarc.find("gcc") != string::npos || buildarc.find("g++") != string::npos || buildarc.find("clang") != string::npos){ include_prefix = "-isystem"; } vector includes; includes.push_back("include"); includes.push_back("include/libpq"); includes.push_back("include/external"); for(size_t i=0; iAddIncludePath(header.c_str()); gInterpreter->AddIncludePath(header_stripped.c_str()); } RAT::Log::Init("/dev/null"); RAT::DB* gRATDB = RAT::DB::Get(); RAT::DU::Utility* gRAT = RAT::DU::Utility::Get(); }