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 | |
81515106 |
27 | if (gSystem->Getenv("ALICE_ROOT") == 0) |
28 | { |
29 | Error(kEH.Data(), "ALICE_ROOT is not defined, aborting."); |
30 | gSystem->Exit(1); |
84aff7a4 |
31 | } |
81515106 |
32 | |
33 | TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); |
34 | |
35 | if (gSystem->AccessPathName(evedir) == kTRUE) |
36 | { |
37 | Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist."); |
84aff7a4 |
38 | gSystem->Exit(1); |
39 | } |
40 | |
41 | TString macPath(gROOT->GetMacroPath()); |
81515106 |
42 | macPath += Form(":%s/macros", evedir.Data()); |
43 | gInterpreter->AddIncludePath(evedir); |
44 | if (gSystem->Getenv("ALICE_ROOT") != 0) |
45 | { |
46 | macPath += Form(":%s/alice-macros", evedir.Data()); |
707b281a |
47 | gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT"))); |
84aff7a4 |
48 | gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT"))); |
49 | gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT")); |
50 | } |
51 | gROOT->SetMacroPath(macPath); |
52 | |
ebbc41f8 |
53 | // How to hadle AliLog properly? |
c2c4b7a2 |
54 | AliLog* log = new AliLog; |
55 | |
84aff7a4 |
56 | TRint app("App", &argc, argv); |
57 | |
58 | TEveManager::Create(); |
59 | |
81515106 |
60 | gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/alice_fullgeo.root", evedir.Data())); |
61 | |
84aff7a4 |
62 | app.Run(); // Never returns. |
707b281a |
63 | |
ebbc41f8 |
64 | delete log; |
65 | |
84aff7a4 |
66 | return 0; |
5987168b |
67 | } |