]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alieve_main/alieve_main.cxx
Compilation warning.
[u/mrichter/AliRoot.git] / EVE / 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
10 #include <TInterpreter.h>
11 #include <TRint.h>
12 #include <TROOT.h>
13 #include <TSystem.h>
14 #include <TError.h>
15
16 #include <AliLog.h>
17
18 #include <TEveUtil.h>
19 #include <TEveManager.h>
20
21 #include <Getline.h>
22
23 int main(int argc, char **argv)
24 {
25   static const TEveException kEH("alieve::main");
26
27   if (gSystem->Getenv("REVESYS") == 0) {
28     if (gSystem->Getenv("ALICE_ROOT") != 0) {
29       Info(kEH.Data(), "setting REVESYS from ALICE_ROOT.");
30       gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
31     } else {
32       Error(kEH.Data(), "REVESYS not defined, neither is ALICE_ROOT.");
33       gSystem->Exit(1);
34     }
35   }
36   if (gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) {
37     Error(kEH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS"));
38     gSystem->Exit(1);
39   }
40
41   TString macPath(gROOT->GetMacroPath());
42   macPath += Form(":%s/macros", gSystem->Getenv("REVESYS"));
43   gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS"));
44   if (gSystem->Getenv("ALICE_ROOT") != 0) {
45     macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS"));
46     gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
47     gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
48     gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
49   }
50   gROOT->SetMacroPath(macPath);
51
52   // How to hadle AliLog properly?
53   AliLog* log = new AliLog;
54
55   TRint app("App", &argc, argv);
56
57   TEveManager::Create();
58
59   app.Run(); // Never returns.
60
61   delete log;
62
63   return 0;
64 }