GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
demos/core/rootlogon.C
Go to the documentation of this file.
1 {
2 /*
3 
4  rootlogon.C to set the Macro and include path to the GammaWare package.
5  The system has to be properly built i.e.
6  LD_LIBRARY_PATH set to the directory where gw.rootmap is set.
7 
8  O. Stézowski
9 */
10 
11 // ---> GammaWare PART /////////////////////////
12 
13  printf("******************************************************************** \n") ;
14  printf(" Messages from Load.C \n") ;
15  printf("******************************************************************** \n") ;
16 
17  // to add to ROOT the Gw path to look for macros
18  TString tmp, macroPATH;
19 
20  macroPATH = gROOT->GetMacroPath(); tmp = Gw::Env::GetPath("MacrosPath");
21  if ( macroPATH.Contains(tmp.Data()) == false ) {
22  printf("- Add %s to the macros path \n",tmp.Data());
23  tmp += ":";
24  macroPATH.Prepend(tmp.Data()); gROOT->SetMacroPath(macroPATH.Data());
25  }
26 
27  // add GammaWare include path to ROOT for compilation
28  tmp = Gw::Env::GetPath("IncludePath"); printf("- Add %s to the include path \n",tmp.Data());
29  tmp.Prepend(" .include ");
30  gROOT->ProcessLine(tmp.Data());
31 
32 }
TString macroPATH
TString tmp
static const char * GetPath(const char *)
to get a particular GW environment variable
Definition: Env.cpp:47
printf(" Messages from Load.C \n")