2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #include <TInterpreter.h>
20 #include <TEveManager.h>
21 #include <TEveSelection.h>
25 int main(int argc, char **argv)
27 static const TEveException kEH("alieve::main");
29 if (gSystem->Getenv("ALICE_ROOT") == 0)
31 Error(kEH.Data(), "ALICE_ROOT is not defined, aborting.");
35 TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
37 if (gSystem->AccessPathName(evedir) == kTRUE)
39 Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist.");
43 TString macPath(gROOT->GetMacroPath());
44 macPath += Form(":%s/macros", evedir.Data());
45 gInterpreter->AddIncludePath(evedir);
46 if (gSystem->Getenv("ALICE_ROOT") != 0)
48 macPath += Form(":%s/alice-macros", evedir.Data());
49 gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
50 gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
51 gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
54 // TabCom fails on double-colon in macro-path.
55 TPMERegexp doubleColon(":{2,}", "og");
56 doubleColon.Substitute(macPath, ":");
58 gROOT->SetMacroPath(macPath);
60 // How to hadle AliLog properly?
61 AliLog* log = new AliLog;
63 TRint app("App", &argc, argv);
65 TEveManager::Create();
66 gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_Projectable);
67 gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_Projectable);
69 gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data()));
73 TEveManager::Terminate();