84aff7a4 |
1 | #include <TInterpreter.h> |
2 | #include <TRint.h> |
3 | #include <TROOT.h> |
4 | #include <TSystem.h> |
5 | #include <TError.h> |
6 | |
7 | #include <TEveUtil.h> |
8 | #include <TEveManager.h> |
5987168b |
9 | |
10 | #include <Getline.h> |
11 | |
12 | int main(int argc, char **argv) |
13 | { |
84aff7a4 |
14 | static const TEveException eH("alieve::main"); |
15 | |
16 | if(gSystem->Getenv("REVESYS") == 0) { |
17 | if(gSystem->Getenv("ALICE_ROOT") != 0) { |
18 | Info(eH.Data(), "setting REVESYS from ALICE_ROOT."); |
19 | gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); |
20 | } else { |
21 | Error(eH.Data(), "REVESYS not defined, neither is ALICE_ROOT."); |
22 | gSystem->Exit(1); |
23 | } |
24 | } |
25 | if(gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) { |
26 | Error(eH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS")); |
27 | gSystem->Exit(1); |
28 | } |
29 | |
30 | TString macPath(gROOT->GetMacroPath()); |
31 | macPath += Form(":%s/macros", gSystem->Getenv("REVESYS")); |
32 | gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS")); |
33 | if(gSystem->Getenv("ALICE_ROOT") != 0) { |
34 | macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS")); |
35 | gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); |
36 | gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); |
37 | } |
38 | gROOT->SetMacroPath(macPath); |
39 | |
40 | TRint app("App", &argc, argv); |
41 | |
42 | TEveManager::Create(); |
43 | |
5987168b |
44 | |
84aff7a4 |
45 | app.Run(); // Never returns. |
46 | return 0; |
5987168b |
47 | } |