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