]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alieve_main/alieve_main.cxx
Not ready for previous changes, revert to stable code.
[u/mrichter/AliRoot.git] / EVE / alieve_main / alieve_main.cxx
index cd5e3f185fbccbe22933ad511eb0b29c2002a23c..fc520258e858024025936e0ec9292afd1bc92c94 100644 (file)
@@ -7,18 +7,23 @@
  * full copyright notice.                                                 *
  **************************************************************************/
 
+#include <EveBase/AliEveConfigManager.h>
+
 #include <TInterpreter.h>
 #include <TRint.h>
 #include <TROOT.h>
 #include <TPRegexp.h>
 #include <TSystem.h>
 #include <TError.h>
+#include <RVersion.h>
 
 #include <AliLog.h>
 
 #include <TEveUtil.h>
 #include <TEveManager.h>
 #include <TEveSelection.h>
+#include <TEveBrowser.h>
+#include <TEveViewer.h>
 
 #include <Getline.h>
 
@@ -47,33 +52,48 @@ int main(int argc, char **argv)
   {
     macPath += Form(":%s/alice-macros", evedir.Data());
     gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT")));
     gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
     gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
   }
   {
     // TabCom fails on double-colon in macro-path.
+    // I fixed this in ROOT sometime ago ... could be removed
+    // when we go to 5.26.
     TPMERegexp doubleColon(":{2,}", "og");
     doubleColon.Substitute(macPath, ":");
   }
   gROOT->SetMacroPath(macPath);
 
-  // How to hadle AliLog properly?
-  AliLog *log = new AliLog;
+  // make sure logger is instantiated
+  AliLog::GetRootLogger();
   TRint  *app = new TRint("App", &argc, argv);
 
+#if ROOT_VERSION_CODE >= ROOT_VERSION(5,25,4) || defined XXX_LATEST_ROOT
+  // Waiting for update by Pawel. Now GED in ROOT is better again :)
+  // Uncomment when fixed in AliEveGedXXX.
+  // TEveGListTreeEditorFrame::SetEditorClass("AliEveGedEditor");
+#endif
+
   TEveManager::Create();
-  gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_Projectable);
-  gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_Projectable);
+  gEve->GetDefaultViewer()->SetElementName("3D View");
+  gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound);
+  gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound);
 
   gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data()));
 
+  try {AliEveConfigManager::InitializeMaster();}
+  catch (TEveException exc) {
+       AliErrorGeneral("alieve_main",exc.Data());
+  }
+
   app->Run(kTRUE);
 
+  if (gEve && gEve->GetBrowser())
+    gEve->GetBrowser()->UnmapWindow();
   TEveManager::Terminate();
 
   app->Terminate(0);
 
-  delete log;
-
   return 0;
 }