]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/alieve_main/alieve_main.cxx
Temporary fix to avoid xrootd thrashing
[u/mrichter/AliRoot.git] / EVE / Alieve / alieve_main / alieve_main.cxx
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9 #include <TInterpreter.h>
10 #include <TRint.h>
11 #include <TROOT.h>
12 #include <TSystem.h>
13 #include <TError.h>
14
15 #include <TEveUtil.h>
16 #include <TEveManager.h>
17
18 #include <Getline.h>
19
20 int main(int argc, char **argv)
21 {
22   static const TEveException eH("alieve::main");
23
24   if(gSystem->Getenv("REVESYS") == 0) {
25     if(gSystem->Getenv("ALICE_ROOT") != 0) {
26       Info(eH.Data(), "setting REVESYS from ALICE_ROOT.");
27       gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
28     } else {
29       Error(eH.Data(), "REVESYS not defined, neither is ALICE_ROOT.");
30       gSystem->Exit(1);
31     }
32   }
33   if(gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) {
34     Error(eH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS"));
35     gSystem->Exit(1);
36   }
37
38   TString macPath(gROOT->GetMacroPath());
39   macPath += Form(":%s/macros", gSystem->Getenv("REVESYS"));
40   gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS"));
41   if(gSystem->Getenv("ALICE_ROOT") != 0) {
42     macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS"));
43     gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
44     gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
45   }
46   gROOT->SetMacroPath(macPath);
47
48   TRint app("App", &argc, argv);
49
50   TEveManager::Create();
51
52
53   app.Run(); // Never returns.
54   return 0;
55 }