Move core classes from EveDet to EveBase.
[u/mrichter/AliRoot.git] / EVE / alieve_main / alieve_main.cxx
CommitLineData
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
16#include <TEveUtil.h>
17#include <TEveManager.h>
5987168b 18
19#include <Getline.h>
20
21int main(int argc, char **argv)
22{
84aff7a4 23 static const TEveException eH("alieve::main");
24
707b281a 25 if (gSystem->Getenv("REVESYS") == 0) {
26 if (gSystem->Getenv("ALICE_ROOT") != 0) {
84aff7a4 27 Info(eH.Data(), "setting REVESYS from ALICE_ROOT.");
28 gSystem->Setenv("REVESYS", Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
29 } else {
30 Error(eH.Data(), "REVESYS not defined, neither is ALICE_ROOT.");
31 gSystem->Exit(1);
32 }
33 }
707b281a 34 if (gSystem->AccessPathName(gSystem->Getenv("REVESYS")) == kTRUE) {
84aff7a4 35 Error(eH.Data(), "REVESYS '%s' does not exist.", gSystem->Getenv("REVESYS"));
36 gSystem->Exit(1);
37 }
38
39 TString macPath(gROOT->GetMacroPath());
40 macPath += Form(":%s/macros", gSystem->Getenv("REVESYS"));
41 gInterpreter->AddIncludePath(gSystem->Getenv("REVESYS"));
707b281a 42 if (gSystem->Getenv("ALICE_ROOT") != 0) {
84aff7a4 43 macPath += Form(":%s/alice-macros", gSystem->Getenv("REVESYS"));
707b281a 44 gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
84aff7a4 45 gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
46 gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
47 }
48 gROOT->SetMacroPath(macPath);
49
50 TRint app("App", &argc, argv);
51
52 TEveManager::Create();
53
84aff7a4 54 app.Run(); // Never returns.
707b281a 55
84aff7a4 56 return 0;
5987168b 57}