]>
Commit | Line | Data |
---|---|---|
d810d0de | 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 * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
707b281a | 9 | |
84aff7a4 | 10 | #include <TInterpreter.h> |
11 | #include <TRint.h> | |
12 | #include <TROOT.h> | |
13 | #include <TSystem.h> | |
14 | #include <TError.h> | |
15 | ||
c2c4b7a2 | 16 | #include <AliLog.h> |
17 | ||
84aff7a4 | 18 | #include <TEveUtil.h> |
19 | #include <TEveManager.h> | |
5987168b | 20 | |
21 | #include <Getline.h> | |
22 | ||
23 | int main(int argc, char **argv) | |
24 | { | |
a15e6d7d | 25 | static const TEveException kEH("alieve::main"); |
84aff7a4 | 26 | |
707b281a | 27 | if (gSystem->Getenv("REVESYS") == 0) { |
28 | if (gSystem->Getenv("ALICE_ROOT") != 0) { | |
a15e6d7d | 29 | Info(kEH.Data(), "setting REVESYS from ALICE_ROOT."); |
84aff7a4 | 30 | gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); |
31 | } else { | |
a15e6d7d | 32 | Error(kEH.Data(), "REVESYS not defined, neither is ALICE_ROOT."); |
84aff7a4 | 33 | gSystem->Exit(1); |
34 | } | |
35 | } | |
707b281a | 36 | if (gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) { |
a15e6d7d | 37 | Error(kEH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS")); |
84aff7a4 | 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")); | |
707b281a | 44 | if (gSystem->Getenv("ALICE_ROOT") != 0) { |
84aff7a4 | 45 | macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS")); |
707b281a | 46 | gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); |
84aff7a4 | 47 | gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); |
48 | gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); | |
49 | } | |
50 | gROOT->SetMacroPath(macPath); | |
51 | ||
ebbc41f8 | 52 | // How to hadle AliLog properly? |
c2c4b7a2 | 53 | AliLog* log = new AliLog; |
54 | ||
84aff7a4 | 55 | TRint app("App", &argc, argv); |
56 | ||
57 | TEveManager::Create(); | |
58 | ||
84aff7a4 | 59 | app.Run(); // Never returns. |
707b281a | 60 | |
ebbc41f8 | 61 | delete log; |
62 | ||
84aff7a4 | 63 | return 0; |
5987168b | 64 | } |