ROOT logo
// @(#)root/eve:$Id$
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TEveManager.h"

#include "TEveSelection.h"
#include "TEveViewer.h"
#include "TEveScene.h"
#include "TEveEventManager.h"
#include "TEveWindowManager.h"

#include "TEveBrowser.h"
#include "TEveGedEditor.h"

#include "TGStatusBar.h"

#include "TGLSAViewer.h"

#include "TGeoManager.h"
#include "TGeoMatrix.h"
#include "TObjString.h"
#include "TROOT.h"
#include "TFile.h"
#include "TMap.h"
#include "TExMap.h"
#include "TMacro.h"
#include "TFolder.h"
#include "TBrowser.h"
#include "TCanvas.h"
#include "TSystem.h"
#include "TRint.h"
#include "TVirtualX.h"
#include "TEnv.h"
#include "TColor.h"
#include "TVirtualGL.h"
#include "TPluginManager.h"
#include "TPRegexp.h"
#include "TClass.h"

#include "Riostream.h"

TEveManager* gEve = 0;

//______________________________________________________________________________
// TEveManager
//
// Central aplication manager for Eve.
// Manages elements, GUI, GL scenes and GL viewers.

ClassImp(TEveManager);

//______________________________________________________________________________
TEveManager::TEveManager(UInt_t w, UInt_t h, Bool_t map_window, Option_t* opt) :
   fExcHandler  (0),
   fVizDB       (0), fVizDBReplace(kTRUE), fVizDBUpdate(kTRUE),
   fGeometries  (0),
   fGeometryAliases (0),
   fBrowser     (0),

   fMacroFolder (0),

   fWindowManager  (0),
   fViewers        (0),
   fScenes         (0),
   fGlobalScene    (0),
   fEventScene     (0),
   fCurrentEvent   (0),

   fRedrawDisabled (0),
   fResetCameras   (kFALSE),
   fDropLogicals   (kFALSE),
   fKeepEmptyCont  (kFALSE),
   fTimerActive    (kFALSE),
   fRedrawTimer    (),

   fStampedElements(0),
   fSelection      (0),
   fHighlight      (0),

   fOrphanage      (0),
   fUseOrphanage   (kFALSE)
{
   // Constructor.
   // If map_window is true, the TEveBrowser window is mapped.
   //
   // Option string is first parsed for the following characters:
   //   V - spawn a default GL viewer.
   //
   // The consumed characters are removed from the options and they
   // are passed to TEveBrowser for creation of additional plugins.
   //
   // Default options: "FIV" - file-browser, command-line, GL-viewer.


   static const TEveException eh("TEveManager::TEveManager ");

   if (gEve != 0)
      throw(eh + "There can be only one!");

   gEve = this;

   fExcHandler = new TExceptionHandler;

   fGeometries      = new TMap; fGeometries->SetOwnerKeyValue();
   fGeometryAliases = new TMap; fGeometryAliases->SetOwnerKeyValue();
   fVizDB           = new TMap; fVizDB->SetOwnerKeyValue();

   fStampedElements = new TExMap;

   fSelection = new TEveSelection("Global Selection");
   fSelection->IncDenyDestroy();
   fHighlight = new TEveSelection("Global Highlight");
   fHighlight->SetHighlightMode();
   fHighlight->IncDenyDestroy();

   fOrphanage = new TEveElementList("Global Orphanage");
   fOrphanage->IncDenyDestroy();

   fRedrawTimer.Connect("Timeout()", "TEveManager", this, "DoRedraw3D()");
   fMacroFolder = new TFolder("EVE", "Visualization macros");
   gROOT->GetListOfBrowsables()->Add(fMacroFolder);


   fWindowManager = new TEveWindowManager("WindowManager", "Manager of EVE windows");

   // Build GUI
   fBrowser   = new TEveBrowser(w, h);

   // ListTreeEditor
   fBrowser->StartEmbedding(0);
   fLTEFrame = new TEveGListTreeEditorFrame;
   fBrowser->StopEmbedding("Eve");
   fLTEFrame->ConnectSignals();

   // See how many GL viewers are requested, remove from options.
   TString str_opt(opt);
   TPMERegexp viewer_re("V", "g");
   Int_t viewer_count = viewer_re.Substitute(str_opt, "", kFALSE);

   // Create the main window / browse.
   fBrowser->InitPlugins(str_opt);
   if (map_window)
      fBrowser->MapWindow();

   // --------------------------------

   fWindowManager->IncDenyDestroy();
   AddToListTree(fWindowManager, kFALSE);

   fViewers = new TEveViewerList("Viewers");
   fViewers->IncDenyDestroy();
   AddToListTree(fViewers, kFALSE);

   fScenes  = new TEveSceneList ("Scenes");
   fScenes->IncDenyDestroy();
   AddToListTree(fScenes, kFALSE);

   fGlobalScene = new TEveScene("Geometry scene");
   fGlobalScene->IncDenyDestroy();
   fScenes->AddElement(fGlobalScene);

   fEventScene = new TEveScene("Event scene");
   fEventScene->IncDenyDestroy();
   fScenes->AddElement(fEventScene);

   for (Int_t vc = 0; vc < viewer_count; ++vc)
   {
      TEveViewer* v = SpawnNewViewer(Form("Viewer %d", vc+1));
      v->AddScene(fGlobalScene);
      v->AddScene(fEventScene);
   }

   if (GetDefaultViewer())
   {
      EditElement(GetDefaultViewer());
   }

   /**************************************************************************/
   /**************************************************************************/

   gSystem->ProcessEvents();
}

//______________________________________________________________________________
TEveManager::~TEveManager()
{
   // Destructor.

   // Stop timer and deny further redraw requests.
   fRedrawTimer.Stop();
   fTimerActive = kTRUE;

   delete fCurrentEvent;
   fCurrentEvent = 0;

   fGlobalScene->DecDenyDestroy();
   fEventScene->DecDenyDestroy();
   fScenes->DestroyScenes();
   fScenes->DecDenyDestroy();
   fScenes->Destroy();
   fScenes = 0;

   fViewers->DestroyElements();
   fViewers->DecDenyDestroy();
   fViewers->Destroy();
   fViewers = 0;

   fWindowManager->DestroyWindows();
   fWindowManager->DecDenyDestroy();
   fWindowManager->Destroy();
   fWindowManager = 0;

   fOrphanage->DecDenyDestroy();
   fHighlight->DecDenyDestroy();
   fSelection->DecDenyDestroy();

   gROOT->GetListOfBrowsables()->Remove(fMacroFolder);
   delete fMacroFolder;
   
   delete fGeometryAliases;
   delete fGeometries;
   delete fVizDB;
   delete fExcHandler;
   delete fStampedElements;

   fLTEFrame->DeleteWindow();

   fBrowser->DontCallClose();
   fBrowser->TRootBrowser::CloseWindow();
}

//______________________________________________________________________________
void TEveManager::ClearOrphanage()
{
   // Clear the orphanage.

   Bool_t old_state = fUseOrphanage;
   fUseOrphanage = kFALSE;
   fOrphanage->DestroyElements();
   fUseOrphanage = old_state;
}

//==============================================================================

//______________________________________________________________________________
TGWindow* TEveManager::GetMainWindow() const
{
   // Get the main window, i.e. EVE-browser.

   return fBrowser;
}

//______________________________________________________________________________
TEveViewer* TEveManager::GetDefaultViewer() const
{
   // Returns the default viewer - the first one in the fViewers list.

   return dynamic_cast<TEveViewer*>(fViewers->FirstChild());
}

//______________________________________________________________________________
TGLViewer* TEveManager::GetDefaultGLViewer() const
{
   // Get TGLViewer of the default TEveViewer.

   TEveViewer *ev = GetDefaultViewer();
   return ev ? ev->GetGLViewer() : 0;
}

//______________________________________________________________________________
TEveGedEditor* TEveManager::GetEditor() const
{
   // Returns main object editor.

   return fLTEFrame->GetEditor();
}

//______________________________________________________________________________
TGStatusBar* TEveManager::GetStatusBar() const
{
   // Returns main window status bar.

   return fBrowser->GetStatusBar();
}

//==============================================================================

//______________________________________________________________________________
TCanvas* TEveManager::AddCanvasTab(const char* name)
{
   // Add a new canvas tab.

   fBrowser->StartEmbedding(1, -1);
   TCanvas* c = new TCanvas;
   fBrowser->StopEmbedding(name);

   return c;
}

//______________________________________________________________________________
TEveViewer* TEveManager::SpawnNewViewer(const char* name, const char* title,
                                        Bool_t embed)
{
   // Create a new GL viewer.

   TEveWindowSlot* slot = 0;
   if (embed)
   {
      slot = fWindowManager->GetCurrentWindowAsSlot();
      if (slot == 0)
      {
         // In principle should have some default/current container
         // in TEveWindowManager.
         // Also to store closed windows.
         slot = TEveWindow::CreateWindowInTab(fBrowser->GetTabRight());
         fBrowser->SanitizeTabCounts();
      }
   }
   else
   {
      slot = TEveWindow::CreateWindowMainFrame();
   }

   TEveViewer* v = new TEveViewer(name, title);
   v->SpawnGLViewer(embed ? GetEditor() : 0);

   slot->ReplaceWindow(v);

   fViewers->AddElement(v);

   return v;
}

//______________________________________________________________________________
TEveScene* TEveManager::SpawnNewScene(const char* name, const char* title)
{
   // Create a new scene.

   TEveScene* s = new TEveScene(name, title);
   AddElement(s, fScenes);
   return s;
}

/******************************************************************************/
// Macro management
/******************************************************************************/

//______________________________________________________________________________
TMacro* TEveManager::GetMacro(const char* name) const
{
   // Find macro in fMacroFolder by name.

   return dynamic_cast<TMacro*>(fMacroFolder->FindObject(name));
}

/******************************************************************************/
// Editor
/******************************************************************************/

//______________________________________________________________________________
void TEveManager::EditElement(TEveElement* element)
{
   // Show element in default editor.

   static const TEveException eh("TEveManager::EditElement ");

   GetEditor()->DisplayElement(element);
}

/******************************************************************************/
// 3D TEvePad management
/******************************************************************************/

//______________________________________________________________________________
void TEveManager::RegisterRedraw3D()
{
   // Register a request for 3D redraw.

   fRedrawTimer.Start(0, kTRUE);
   fTimerActive = kTRUE;
}

//______________________________________________________________________________
void TEveManager::DoRedraw3D()
{
   // Perform 3D redraw of scenes and viewers whose contents has
   // changed.

   static const TEveException eh("TEveManager::DoRedraw3D ");

   // printf("TEveManager::DoRedraw3D redraw triggered\n");

   // Process element visibility changes, mark relevant scenes as changed.
   {
      TEveElement::List_t scenes;
      Long64_t   key, value;
      TExMapIter stamped_elements(fStampedElements);
      while (stamped_elements.Next(key, value))
      {
         TEveElement *el = reinterpret_cast<TEveElement*>(key);
         if (el->GetChangeBits() & TEveElement::kCBVisibility)
         {
            el->CollectSceneParents(scenes);
         }
      }
      ScenesChanged(scenes);
   }

   // Process changes in scenes.
   fScenes ->ProcessSceneChanges(fDropLogicals, fStampedElements);
   fViewers->RepaintChangedViewers(fResetCameras, fDropLogicals);

   // Process changed elements again, update GUI (just editor so far,
   // but more can come).
   {
      Long64_t   key, value;
      TExMapIter stamped_elements(fStampedElements);
      while (stamped_elements.Next(key, value))
      {
         TEveElement *el = reinterpret_cast<TEveElement*>(key);
         if (GetEditor()->GetModel() == el->GetEditorObject(eh))
            EditElement(el);
         TEveGedEditor::ElementChanged(el);

         el->ClearStamps();
      }
   }
   fStampedElements->Delete();
   GetListTree()->ClearViewPort(); // Fix this when several list-trees can be added.

   fResetCameras = kFALSE;
   fDropLogicals = kFALSE;

   fTimerActive = kFALSE;
}

//______________________________________________________________________________
void TEveManager::FullRedraw3D(Bool_t resetCameras, Bool_t dropLogicals)
{
   // Perform 3D redraw of all scenes and viewers.

   fScenes ->RepaintAllScenes (dropLogicals);
   fViewers->RepaintAllViewers(resetCameras, dropLogicals);
}

/******************************************************************************/

//______________________________________________________________________________
void TEveManager::ElementChanged(TEveElement* element, Bool_t update_scenes, Bool_t redraw)
{
   // Element was changed, perform framework side action.
   // Called from TEveElement::ElementChanged().

   static const TEveException eh("TEveElement::ElementChanged ");

   if (GetEditor()->GetModel() == element->GetEditorObject(eh))
      EditElement(element);
   TEveGedEditor::ElementChanged(element);

   if (update_scenes) {
      TEveElement::List_t scenes;
      element->CollectSceneParents(scenes);
      ScenesChanged(scenes);
   }

   if (redraw)
      Redraw3D();
}

//______________________________________________________________________________
void TEveManager::ScenesChanged(TEveElement::List_t& scenes)
{
   // Mark all scenes from the given list as changed.

   for (TEveElement::List_i s=scenes.begin(); s!=scenes.end(); ++s)
      ((TEveScene*)*s)->Changed();
}

//______________________________________________________________________________
void TEveManager::ElementStamped(TEveElement* element)
{
   // Mark element as changed -- it will be processed on next redraw.

   UInt_t slot;
   if (fStampedElements->GetValue((ULong64_t) element, (Long64_t) element, slot) == 0)
   {
      fStampedElements->AddAt(slot, (ULong64_t) element, (Long64_t) element, 1);
   }
}


/******************************************************************************/
// GUI interface
/******************************************************************************/

//______________________________________________________________________________
TGListTree* TEveManager::GetListTree() const
{
   // Get default list-tree widget.

   return fLTEFrame->fListTree;
}

TGListTreeItem*
TEveManager::AddToListTree(TEveElement* re, Bool_t open, TGListTree* lt)
{
   // Add element as a top-level to a list-tree.
   // Only add a single copy of a render-element as a top level.

   if (lt == 0) lt = GetListTree();
   TGListTreeItem* lti = re->AddIntoListTree(lt, (TGListTreeItem*)0);
   if (open) lt->OpenItem(lti);
   return lti;
}

//______________________________________________________________________________
void TEveManager::RemoveFromListTree(TEveElement* element,
                                     TGListTree* lt, TGListTreeItem* lti)
{
   // Remove top-level element from list-tree with specified tree-item.

   static const TEveException eh("TEveManager::RemoveFromListTree ");

   if (lti->GetParent())
      throw(eh + "not a top-level item.");

   element->RemoveFromListTree(lt, 0);
}

/******************************************************************************/

//______________________________________________________________________________
TGListTreeItem* TEveManager::AddEvent(TEveEventManager* event)
{
   // Add a new event and make it the current event.
   // It is added into the event-scene and as a top-level list-tree
   // item.

   fCurrentEvent = event;
   fCurrentEvent->IncDenyDestroy();
   AddElement(fCurrentEvent, fEventScene);
   return AddToListTree(event, kTRUE);
}

//______________________________________________________________________________
void TEveManager::AddElement(TEveElement* element, TEveElement* parent)
{
   // Add an element. If parent is not specified it is added into
   // current event (which is created if does not exist).

   if (parent == 0) {
      if (fCurrentEvent == 0)
         AddEvent(new TEveEventManager("Event", "Auto-created event directory"));
      parent = fCurrentEvent;
   }

   parent->AddElement(element);
}

//______________________________________________________________________________
void TEveManager::AddGlobalElement(TEveElement* element, TEveElement* parent)
{
   // Add a global element, i.e. one that does not change on each
   // event, like geometry or projection manager.
   // If parent is not specified it is added to a global scene.

   if (parent == 0)
      parent = fGlobalScene;

   parent->AddElement(element);
}

/******************************************************************************/

//______________________________________________________________________________
void TEveManager::RemoveElement(TEveElement* element,
                                TEveElement* parent)
{
   // Remove element from parent.

   parent->RemoveElement(element);
}

//______________________________________________________________________________
void TEveManager::PreDeleteElement(TEveElement* element)
{
   // Called from TEveElement prior to its destruction so the
   // framework components (like object editor) can unreference it.

   if (GetEditor()->GetEveElement() == element)
      EditElement(0);
   TEveGedEditor::ElementDeleted(element);

   if (fScenes)
      fScenes->DestroyElementRenderers(element);

   if (fStampedElements->GetValue((ULong64_t) element, (Long64_t) element) != 0)
      fStampedElements->Remove((ULong64_t) element, (Long64_t) element);

   if (element->fImpliedSelected > 0)
      fSelection->RemoveImpliedSelected(element);
   if (element->fImpliedHighlighted > 0)
      fHighlight->RemoveImpliedSelected(element);
}

/******************************************************************************/

//______________________________________________________________________________
void TEveManager::ElementSelect(TEveElement* element)
{
   // Select an element.
   // Now it only calls EditElement() - should also update selection state.

   if (element != 0)
      EditElement(element);
}

//______________________________________________________________________________
Bool_t TEveManager::ElementPaste(TEveElement* element)
{
   // Paste has been called.

   // The object to paste is taken from the editor (this is not
   // exactly right) and handed to 'element' for pasting.

   TEveElement* src = GetEditor()->GetEveElement();
   if (src)
      return element->HandleElementPaste(src);
   return kFALSE;
}


//==============================================================================
// VizDB interface
//==============================================================================

//______________________________________________________________________________
Bool_t TEveManager::InsertVizDBEntry(const TString& tag, TEveElement* model,
                                     Bool_t replace, Bool_t update)
{
   // Insert a new visualization-parameter database entry. Returns
   // true if the element is inserted successfully.
   // If entry with the same key already exists the behaviour depends on the
   // 'replace' flag:
   //   true  - The old model is deleted and new one is inserted (default).
   //           Clients of the old model are transferred to the new one and
   //           if 'update' flag is true (default), the new model's parameters
   //           are assigned to all clients.
   //   false - The old model is kept, false is returned.
   //
   // If insert is successful, the ownership of the model-element is
   // transferred to the manager.

   TPair* pair = (TPair*) fVizDB->FindObject(tag);
   if (pair)
   {
      if (replace)
      {
         model->IncDenyDestroy();
         model->SetRnrChildren(kFALSE);

         TEveElement* old_model = dynamic_cast<TEveElement*>(pair->Value());
         if (old_model)
         {
            while (old_model->HasChildren())
            {
               TEveElement *el = old_model->FirstChild();
               el->SetVizModel(model);
               if (update)
               {
                  el->CopyVizParams(model);
                  el->PropagateVizParamsToProjecteds();
               }
            }
            old_model->DecDenyDestroy();
         }
         pair->SetValue(dynamic_cast<TObject*>(model));
         return kTRUE;
      }
      else
      {
         return kFALSE;
      }
   }
   else
   {
      model->IncDenyDestroy();
      model->SetRnrChildren(kFALSE);
      fVizDB->Add(new TObjString(tag), dynamic_cast<TObject*>(model));
      return kTRUE;
   }
}

//______________________________________________________________________________
Bool_t TEveManager::InsertVizDBEntry(const TString& tag, TEveElement* model)
{
   // Insert a new visualization-parameter database entry with the default
   // parameters for replace and update, as specified by members
   // fVizDBReplace(default=kTRUE) and fVizDBUpdate(default=kTRUE).
   // See docs of the above function.

   return InsertVizDBEntry(tag, model, fVizDBReplace, fVizDBUpdate);
}

//______________________________________________________________________________
TEveElement* TEveManager::FindVizDBEntry(const TString& tag)
{
   // Find a visualization-parameter database entry corresponding to tag.
   // If the entry is not found 0 is returned.

   return dynamic_cast<TEveElement*>(fVizDB->GetValue(tag));
}

//______________________________________________________________________________
void TEveManager::LoadVizDB(const TString& filename, Bool_t replace, Bool_t update)
{
   // Load visualization-parameter database from file filename. The
   // replace, update arguments replace the values of fVizDBReplace
   // and fVizDBUpdate members for the duration of the macro
   // execution.

   Bool_t ex_replace = fVizDBReplace;
   Bool_t ex_update  = fVizDBUpdate;
   fVizDBReplace = replace;
   fVizDBUpdate  = update;

   LoadVizDB(filename);

   fVizDBReplace = ex_replace;
   fVizDBUpdate  = ex_update;
}

//______________________________________________________________________________
void TEveManager::LoadVizDB(const TString& filename)
{
   // Load visualization-parameter database from file filename.
   // State of data-members fVizDBReplace and fVizDBUpdate determine
   // how the registered entries are handled.

   TEveUtil::Macro(filename);
   Redraw3D();
}

//______________________________________________________________________________
void TEveManager::SaveVizDB(const TString& filename)
{
   // Save visualization-parameter database to file filename.

   TPMERegexp re("(.+)\\.\\w+");
   if (re.Match(filename) != 2) {
      Error("SaveVizDB", "filename does not match required format '(.+)\\.\\w+'.");
      return;
   }

   TString exp_filename(filename);
   gSystem->ExpandPathName(exp_filename);

   ofstream out(exp_filename, ios::out | ios::trunc);
   out << "void " << re[1] << "()\n";
   out << "{\n";
   out << "   TEveManager::Create();\n";

   ClearROOTClassSaved();

   Int_t       var_id = 0;
   TString     var_name;
   TIter       next(fVizDB);
   TObjString *key;
   while ((key = (TObjString*)next()))
   {
      TEveElement* mdl = dynamic_cast<TEveElement*>(fVizDB->GetValue(key));
      if (mdl)
      {
         var_name.Form("x%03d", var_id++);
         mdl->SaveVizParams(out, key->String(), var_name);
      }
      else
      {
         Warning("SaveVizDB", "Saving failed for key '%s'.", key->String().Data());
      }
   }

   out << "}\n";
   out.close();
}

//==============================================================================
// GeoManager, geometry-alias registration
//==============================================================================

//______________________________________________________________________________
TGeoManager* TEveManager::GetGeometry(const TString& filename)
{
   // Get geometry with given filename.
   // This is cached internally so the second time this function is
   // called with the same argument the same geo-manager is returned.
   // gGeoManager is set to the return value.

   static const TEveException eh("TEveManager::GetGeometry ");

   TString exp_filename = filename;
   gSystem->ExpandPathName(exp_filename);
   printf("%s loading: '%s' -> '%s'.\n", eh.Data(),
          filename.Data(), exp_filename.Data());

   gGeoManager = (TGeoManager*) fGeometries->GetValue(filename);
   if (gGeoManager)
   {
      gGeoIdentity = (TGeoIdentity*) gGeoManager->GetListOfMatrices()->At(0);
   }
   else
   {
      Bool_t locked = TGeoManager::IsLocked();
      if (locked) {
         Warning(eh, "TGeoManager is locked ... unlocking it.");
         TGeoManager::UnlockGeometry();
      }
      if (TGeoManager::Import(filename) == 0) {
         throw(eh + "TGeoManager::Import() failed for '" + exp_filename + "'.");
      }
      if (locked) {
         TGeoManager::LockGeometry();
      }

      gGeoManager->GetTopVolume()->VisibleDaughters(1);

      // Import colors exported by Gled, if they exist.
      {
         TFile f(exp_filename, "READ");
         TObjArray* collist = (TObjArray*) f.Get("ColorList");
         f.Close();
         if (collist != 0) {
            TIter next(gGeoManager->GetListOfVolumes());
            TGeoVolume* vol;
            while ((vol = (TGeoVolume*) next()) != 0)
            {
               Int_t oldID = vol->GetLineColor();
               TColor* col = (TColor*)collist->At(oldID);
               Float_t r, g, b;
               col->GetRGB(r, g, b);
               Int_t  newID = TColor::GetColor(r,g,b);
               vol->SetLineColor(newID);
            }
         }
      }

      fGeometries->Add(new TObjString(filename), gGeoManager);
   }
   return gGeoManager;
}

//______________________________________________________________________________
TGeoManager* TEveManager::GetGeometryByAlias(const TString& alias)
{
   // Get geometry with given alias.
   // The alias must be registered via RegisterGeometryAlias().

   static const TEveException eh("TEveManager::GetGeometry ");

   TObjString* full_name = (TObjString*) fGeometryAliases->GetValue(alias);
   if (!full_name)
      throw(eh + "geometry alias '" + alias + "' not registered.");
   return GetGeometry(full_name->String());
}

//______________________________________________________________________________
TGeoManager* TEveManager::GetDefaultGeometry()
{
   // Get the default geometry.
   // It should be registered via RegisterGeometryName("Default", <URL>).

   return GetGeometryByAlias("Default");
}

//______________________________________________________________________________
void TEveManager::RegisterGeometryAlias(const TString& alias, const TString& filename)
{
   // Register 'name' as an alias for geometry file 'filename'.
   // The old aliases are silently overwritten.
   // After that the geometry can be retrieved also by calling:
   //   gEve->GetGeometryByName(name);

   fGeometryAliases->Add(new TObjString(alias), new TObjString(filename));
}

//==============================================================================

//______________________________________________________________________________
void TEveManager::SetStatusLine(const char* text)
{
   // Set the text in the right side of browser's status bar.

   fBrowser->SetStatusText(text, 1);
}

//______________________________________________________________________________
void TEveManager::ClearROOTClassSaved()
{
   // Work-around uber ugly hack used in SavePrimitive and co.

   TIter   nextcl(gROOT->GetListOfClasses());
   TClass *cls;
   while((cls = (TClass *)nextcl()))
   {
      cls->ResetBit(TClass::kClassSaved);
   }
}

//______________________________________________________________________________
void TEveManager::CloseEveWindow()
{
   // Close button has been clicked on EVE main window (browser).
   // Cleanup and terminate application.

   TGMainFrame *mf = (TGMainFrame*) gTQSender;
   TEveBrowser *eb = dynamic_cast<TEveBrowser*>(mf);
   if (eb == fBrowser)
   {
      mf->DontCallClose();
      Terminate();
      gApplication->Terminate();
   }
}


/******************************************************************************/
// Static initialization.
/******************************************************************************/

//______________________________________________________________________________
TEveManager* TEveManager::Create(Bool_t map_window, Option_t* opt)
{
   // If global TEveManager* gEve is not set initialize it.
   // Returns gEve.

   static const TEveException eh("TEveManager::Create ");

   if (gEve == 0)
   {
      // Make sure that the GUI system is initialized.
      if (gROOT->IsBatch())
      {
         throw eh + "ROOT is running in batch mode.";
      }
      TApplication::NeedGraphicsLibs();
      gApplication->InitializeGraphics();
      if (gROOT->IsBatch() || gClient == 0 || gClient->IsZombie())
      {
         throw eh + "window system not initialized.";
      }

      Int_t w = 1024;
      Int_t h =  768;

      TEveUtil::SetupEnvironment();
      TEveUtil::SetupGUI();
      gEve = new TEveManager(w, h, map_window, opt);
   }
   return gEve;
}

//______________________________________________________________________________
void TEveManager::Terminate()
{
   // Properly terminate global TEveManager.

   if (!gEve) return;

   TEveGedEditor::DestroyEditors();

   delete gEve;
   gEve = 0;
}

//==============================================================================
//==============================================================================
// TEveManager::TExceptionHandler
//==============================================================================

//______________________________________________________________________________
//
// Exception handler for Eve exceptions.

ClassImp(TEveManager::TExceptionHandler);

//______________________________________________________________________________
TStdExceptionHandler::EStatus
TEveManager::TExceptionHandler::Handle(std::exception& exc)
{
   // Handle exceptions deriving from TEveException.

   TEveException* ex = dynamic_cast<TEveException*>(&exc);
   if (ex) {
      Info("Handle", "%s", ex->Data());
      gEve->SetStatusLine(ex->Data());
      gSystem->Beep();
      return kSEHandled;
   } else {
      return kSEProceed;
   }
}
 TEveManager.cxx:1
 TEveManager.cxx:2
 TEveManager.cxx:3
 TEveManager.cxx:4
 TEveManager.cxx:5
 TEveManager.cxx:6
 TEveManager.cxx:7
 TEveManager.cxx:8
 TEveManager.cxx:9
 TEveManager.cxx:10
 TEveManager.cxx:11
 TEveManager.cxx:12
 TEveManager.cxx:13
 TEveManager.cxx:14
 TEveManager.cxx:15
 TEveManager.cxx:16
 TEveManager.cxx:17
 TEveManager.cxx:18
 TEveManager.cxx:19
 TEveManager.cxx:20
 TEveManager.cxx:21
 TEveManager.cxx:22
 TEveManager.cxx:23
 TEveManager.cxx:24
 TEveManager.cxx:25
 TEveManager.cxx:26
 TEveManager.cxx:27
 TEveManager.cxx:28
 TEveManager.cxx:29
 TEveManager.cxx:30
 TEveManager.cxx:31
 TEveManager.cxx:32
 TEveManager.cxx:33
 TEveManager.cxx:34
 TEveManager.cxx:35
 TEveManager.cxx:36
 TEveManager.cxx:37
 TEveManager.cxx:38
 TEveManager.cxx:39
 TEveManager.cxx:40
 TEveManager.cxx:41
 TEveManager.cxx:42
 TEveManager.cxx:43
 TEveManager.cxx:44
 TEveManager.cxx:45
 TEveManager.cxx:46
 TEveManager.cxx:47
 TEveManager.cxx:48
 TEveManager.cxx:49
 TEveManager.cxx:50
 TEveManager.cxx:51
 TEveManager.cxx:52
 TEveManager.cxx:53
 TEveManager.cxx:54
 TEveManager.cxx:55
 TEveManager.cxx:56
 TEveManager.cxx:57
 TEveManager.cxx:58
 TEveManager.cxx:59
 TEveManager.cxx:60
 TEveManager.cxx:61
 TEveManager.cxx:62
 TEveManager.cxx:63
 TEveManager.cxx:64
 TEveManager.cxx:65
 TEveManager.cxx:66
 TEveManager.cxx:67
 TEveManager.cxx:68
 TEveManager.cxx:69
 TEveManager.cxx:70
 TEveManager.cxx:71
 TEveManager.cxx:72
 TEveManager.cxx:73
 TEveManager.cxx:74
 TEveManager.cxx:75
 TEveManager.cxx:76
 TEveManager.cxx:77
 TEveManager.cxx:78
 TEveManager.cxx:79
 TEveManager.cxx:80
 TEveManager.cxx:81
 TEveManager.cxx:82
 TEveManager.cxx:83
 TEveManager.cxx:84
 TEveManager.cxx:85
 TEveManager.cxx:86
 TEveManager.cxx:87
 TEveManager.cxx:88
 TEveManager.cxx:89
 TEveManager.cxx:90
 TEveManager.cxx:91
 TEveManager.cxx:92
 TEveManager.cxx:93
 TEveManager.cxx:94
 TEveManager.cxx:95
 TEveManager.cxx:96
 TEveManager.cxx:97
 TEveManager.cxx:98
 TEveManager.cxx:99
 TEveManager.cxx:100
 TEveManager.cxx:101
 TEveManager.cxx:102
 TEveManager.cxx:103
 TEveManager.cxx:104
 TEveManager.cxx:105
 TEveManager.cxx:106
 TEveManager.cxx:107
 TEveManager.cxx:108
 TEveManager.cxx:109
 TEveManager.cxx:110
 TEveManager.cxx:111
 TEveManager.cxx:112
 TEveManager.cxx:113
 TEveManager.cxx:114
 TEveManager.cxx:115
 TEveManager.cxx:116
 TEveManager.cxx:117
 TEveManager.cxx:118
 TEveManager.cxx:119
 TEveManager.cxx:120
 TEveManager.cxx:121
 TEveManager.cxx:122
 TEveManager.cxx:123
 TEveManager.cxx:124
 TEveManager.cxx:125
 TEveManager.cxx:126
 TEveManager.cxx:127
 TEveManager.cxx:128
 TEveManager.cxx:129
 TEveManager.cxx:130
 TEveManager.cxx:131
 TEveManager.cxx:132
 TEveManager.cxx:133
 TEveManager.cxx:134
 TEveManager.cxx:135
 TEveManager.cxx:136
 TEveManager.cxx:137
 TEveManager.cxx:138
 TEveManager.cxx:139
 TEveManager.cxx:140
 TEveManager.cxx:141
 TEveManager.cxx:142
 TEveManager.cxx:143
 TEveManager.cxx:144
 TEveManager.cxx:145
 TEveManager.cxx:146
 TEveManager.cxx:147
 TEveManager.cxx:148
 TEveManager.cxx:149
 TEveManager.cxx:150
 TEveManager.cxx:151
 TEveManager.cxx:152
 TEveManager.cxx:153
 TEveManager.cxx:154
 TEveManager.cxx:155
 TEveManager.cxx:156
 TEveManager.cxx:157
 TEveManager.cxx:158
 TEveManager.cxx:159
 TEveManager.cxx:160
 TEveManager.cxx:161
 TEveManager.cxx:162
 TEveManager.cxx:163
 TEveManager.cxx:164
 TEveManager.cxx:165
 TEveManager.cxx:166
 TEveManager.cxx:167
 TEveManager.cxx:168
 TEveManager.cxx:169
 TEveManager.cxx:170
 TEveManager.cxx:171
 TEveManager.cxx:172
 TEveManager.cxx:173
 TEveManager.cxx:174
 TEveManager.cxx:175
 TEveManager.cxx:176
 TEveManager.cxx:177
 TEveManager.cxx:178
 TEveManager.cxx:179
 TEveManager.cxx:180
 TEveManager.cxx:181
 TEveManager.cxx:182
 TEveManager.cxx:183
 TEveManager.cxx:184
 TEveManager.cxx:185
 TEveManager.cxx:186
 TEveManager.cxx:187
 TEveManager.cxx:188
 TEveManager.cxx:189
 TEveManager.cxx:190
 TEveManager.cxx:191
 TEveManager.cxx:192
 TEveManager.cxx:193
 TEveManager.cxx:194
 TEveManager.cxx:195
 TEveManager.cxx:196
 TEveManager.cxx:197
 TEveManager.cxx:198
 TEveManager.cxx:199
 TEveManager.cxx:200
 TEveManager.cxx:201
 TEveManager.cxx:202
 TEveManager.cxx:203
 TEveManager.cxx:204
 TEveManager.cxx:205
 TEveManager.cxx:206
 TEveManager.cxx:207
 TEveManager.cxx:208
 TEveManager.cxx:209
 TEveManager.cxx:210
 TEveManager.cxx:211
 TEveManager.cxx:212
 TEveManager.cxx:213
 TEveManager.cxx:214
 TEveManager.cxx:215
 TEveManager.cxx:216
 TEveManager.cxx:217
 TEveManager.cxx:218
 TEveManager.cxx:219
 TEveManager.cxx:220
 TEveManager.cxx:221
 TEveManager.cxx:222
 TEveManager.cxx:223
 TEveManager.cxx:224
 TEveManager.cxx:225
 TEveManager.cxx:226
 TEveManager.cxx:227
 TEveManager.cxx:228
 TEveManager.cxx:229
 TEveManager.cxx:230
 TEveManager.cxx:231
 TEveManager.cxx:232
 TEveManager.cxx:233
 TEveManager.cxx:234
 TEveManager.cxx:235
 TEveManager.cxx:236
 TEveManager.cxx:237
 TEveManager.cxx:238
 TEveManager.cxx:239
 TEveManager.cxx:240
 TEveManager.cxx:241
 TEveManager.cxx:242
 TEveManager.cxx:243
 TEveManager.cxx:244
 TEveManager.cxx:245
 TEveManager.cxx:246
 TEveManager.cxx:247
 TEveManager.cxx:248
 TEveManager.cxx:249
 TEveManager.cxx:250
 TEveManager.cxx:251
 TEveManager.cxx:252
 TEveManager.cxx:253
 TEveManager.cxx:254
 TEveManager.cxx:255
 TEveManager.cxx:256
 TEveManager.cxx:257
 TEveManager.cxx:258
 TEveManager.cxx:259
 TEveManager.cxx:260
 TEveManager.cxx:261
 TEveManager.cxx:262
 TEveManager.cxx:263
 TEveManager.cxx:264
 TEveManager.cxx:265
 TEveManager.cxx:266
 TEveManager.cxx:267
 TEveManager.cxx:268
 TEveManager.cxx:269
 TEveManager.cxx:270
 TEveManager.cxx:271
 TEveManager.cxx:272
 TEveManager.cxx:273
 TEveManager.cxx:274
 TEveManager.cxx:275
 TEveManager.cxx:276
 TEveManager.cxx:277
 TEveManager.cxx:278
 TEveManager.cxx:279
 TEveManager.cxx:280
 TEveManager.cxx:281
 TEveManager.cxx:282
 TEveManager.cxx:283
 TEveManager.cxx:284
 TEveManager.cxx:285
 TEveManager.cxx:286
 TEveManager.cxx:287
 TEveManager.cxx:288
 TEveManager.cxx:289
 TEveManager.cxx:290
 TEveManager.cxx:291
 TEveManager.cxx:292
 TEveManager.cxx:293
 TEveManager.cxx:294
 TEveManager.cxx:295
 TEveManager.cxx:296
 TEveManager.cxx:297
 TEveManager.cxx:298
 TEveManager.cxx:299
 TEveManager.cxx:300
 TEveManager.cxx:301
 TEveManager.cxx:302
 TEveManager.cxx:303
 TEveManager.cxx:304
 TEveManager.cxx:305
 TEveManager.cxx:306
 TEveManager.cxx:307
 TEveManager.cxx:308
 TEveManager.cxx:309
 TEveManager.cxx:310
 TEveManager.cxx:311
 TEveManager.cxx:312
 TEveManager.cxx:313
 TEveManager.cxx:314
 TEveManager.cxx:315
 TEveManager.cxx:316
 TEveManager.cxx:317
 TEveManager.cxx:318
 TEveManager.cxx:319
 TEveManager.cxx:320
 TEveManager.cxx:321
 TEveManager.cxx:322
 TEveManager.cxx:323
 TEveManager.cxx:324
 TEveManager.cxx:325
 TEveManager.cxx:326
 TEveManager.cxx:327
 TEveManager.cxx:328
 TEveManager.cxx:329
 TEveManager.cxx:330
 TEveManager.cxx:331
 TEveManager.cxx:332
 TEveManager.cxx:333
 TEveManager.cxx:334
 TEveManager.cxx:335
 TEveManager.cxx:336
 TEveManager.cxx:337
 TEveManager.cxx:338
 TEveManager.cxx:339
 TEveManager.cxx:340
 TEveManager.cxx:341
 TEveManager.cxx:342
 TEveManager.cxx:343
 TEveManager.cxx:344
 TEveManager.cxx:345
 TEveManager.cxx:346
 TEveManager.cxx:347
 TEveManager.cxx:348
 TEveManager.cxx:349
 TEveManager.cxx:350
 TEveManager.cxx:351
 TEveManager.cxx:352
 TEveManager.cxx:353
 TEveManager.cxx:354
 TEveManager.cxx:355
 TEveManager.cxx:356
 TEveManager.cxx:357
 TEveManager.cxx:358
 TEveManager.cxx:359
 TEveManager.cxx:360
 TEveManager.cxx:361
 TEveManager.cxx:362
 TEveManager.cxx:363
 TEveManager.cxx:364
 TEveManager.cxx:365
 TEveManager.cxx:366
 TEveManager.cxx:367
 TEveManager.cxx:368
 TEveManager.cxx:369
 TEveManager.cxx:370
 TEveManager.cxx:371
 TEveManager.cxx:372
 TEveManager.cxx:373
 TEveManager.cxx:374
 TEveManager.cxx:375
 TEveManager.cxx:376
 TEveManager.cxx:377
 TEveManager.cxx:378
 TEveManager.cxx:379
 TEveManager.cxx:380
 TEveManager.cxx:381
 TEveManager.cxx:382
 TEveManager.cxx:383
 TEveManager.cxx:384
 TEveManager.cxx:385
 TEveManager.cxx:386
 TEveManager.cxx:387
 TEveManager.cxx:388
 TEveManager.cxx:389
 TEveManager.cxx:390
 TEveManager.cxx:391
 TEveManager.cxx:392
 TEveManager.cxx:393
 TEveManager.cxx:394
 TEveManager.cxx:395
 TEveManager.cxx:396
 TEveManager.cxx:397
 TEveManager.cxx:398
 TEveManager.cxx:399
 TEveManager.cxx:400
 TEveManager.cxx:401
 TEveManager.cxx:402
 TEveManager.cxx:403
 TEveManager.cxx:404
 TEveManager.cxx:405
 TEveManager.cxx:406
 TEveManager.cxx:407
 TEveManager.cxx:408
 TEveManager.cxx:409
 TEveManager.cxx:410
 TEveManager.cxx:411
 TEveManager.cxx:412
 TEveManager.cxx:413
 TEveManager.cxx:414
 TEveManager.cxx:415
 TEveManager.cxx:416
 TEveManager.cxx:417
 TEveManager.cxx:418
 TEveManager.cxx:419
 TEveManager.cxx:420
 TEveManager.cxx:421
 TEveManager.cxx:422
 TEveManager.cxx:423
 TEveManager.cxx:424
 TEveManager.cxx:425
 TEveManager.cxx:426
 TEveManager.cxx:427
 TEveManager.cxx:428
 TEveManager.cxx:429
 TEveManager.cxx:430
 TEveManager.cxx:431
 TEveManager.cxx:432
 TEveManager.cxx:433
 TEveManager.cxx:434
 TEveManager.cxx:435
 TEveManager.cxx:436
 TEveManager.cxx:437
 TEveManager.cxx:438
 TEveManager.cxx:439
 TEveManager.cxx:440
 TEveManager.cxx:441
 TEveManager.cxx:442
 TEveManager.cxx:443
 TEveManager.cxx:444
 TEveManager.cxx:445
 TEveManager.cxx:446
 TEveManager.cxx:447
 TEveManager.cxx:448
 TEveManager.cxx:449
 TEveManager.cxx:450
 TEveManager.cxx:451
 TEveManager.cxx:452
 TEveManager.cxx:453
 TEveManager.cxx:454
 TEveManager.cxx:455
 TEveManager.cxx:456
 TEveManager.cxx:457
 TEveManager.cxx:458
 TEveManager.cxx:459
 TEveManager.cxx:460
 TEveManager.cxx:461
 TEveManager.cxx:462
 TEveManager.cxx:463
 TEveManager.cxx:464
 TEveManager.cxx:465
 TEveManager.cxx:466
 TEveManager.cxx:467
 TEveManager.cxx:468
 TEveManager.cxx:469
 TEveManager.cxx:470
 TEveManager.cxx:471
 TEveManager.cxx:472
 TEveManager.cxx:473
 TEveManager.cxx:474
 TEveManager.cxx:475
 TEveManager.cxx:476
 TEveManager.cxx:477
 TEveManager.cxx:478
 TEveManager.cxx:479
 TEveManager.cxx:480
 TEveManager.cxx:481
 TEveManager.cxx:482
 TEveManager.cxx:483
 TEveManager.cxx:484
 TEveManager.cxx:485
 TEveManager.cxx:486
 TEveManager.cxx:487
 TEveManager.cxx:488
 TEveManager.cxx:489
 TEveManager.cxx:490
 TEveManager.cxx:491
 TEveManager.cxx:492
 TEveManager.cxx:493
 TEveManager.cxx:494
 TEveManager.cxx:495
 TEveManager.cxx:496
 TEveManager.cxx:497
 TEveManager.cxx:498
 TEveManager.cxx:499
 TEveManager.cxx:500
 TEveManager.cxx:501
 TEveManager.cxx:502
 TEveManager.cxx:503
 TEveManager.cxx:504
 TEveManager.cxx:505
 TEveManager.cxx:506
 TEveManager.cxx:507
 TEveManager.cxx:508
 TEveManager.cxx:509
 TEveManager.cxx:510
 TEveManager.cxx:511
 TEveManager.cxx:512
 TEveManager.cxx:513
 TEveManager.cxx:514
 TEveManager.cxx:515
 TEveManager.cxx:516
 TEveManager.cxx:517
 TEveManager.cxx:518
 TEveManager.cxx:519
 TEveManager.cxx:520
 TEveManager.cxx:521
 TEveManager.cxx:522
 TEveManager.cxx:523
 TEveManager.cxx:524
 TEveManager.cxx:525
 TEveManager.cxx:526
 TEveManager.cxx:527
 TEveManager.cxx:528
 TEveManager.cxx:529
 TEveManager.cxx:530
 TEveManager.cxx:531
 TEveManager.cxx:532
 TEveManager.cxx:533
 TEveManager.cxx:534
 TEveManager.cxx:535
 TEveManager.cxx:536
 TEveManager.cxx:537
 TEveManager.cxx:538
 TEveManager.cxx:539
 TEveManager.cxx:540
 TEveManager.cxx:541
 TEveManager.cxx:542
 TEveManager.cxx:543
 TEveManager.cxx:544
 TEveManager.cxx:545
 TEveManager.cxx:546
 TEveManager.cxx:547
 TEveManager.cxx:548
 TEveManager.cxx:549
 TEveManager.cxx:550
 TEveManager.cxx:551
 TEveManager.cxx:552
 TEveManager.cxx:553
 TEveManager.cxx:554
 TEveManager.cxx:555
 TEveManager.cxx:556
 TEveManager.cxx:557
 TEveManager.cxx:558
 TEveManager.cxx:559
 TEveManager.cxx:560
 TEveManager.cxx:561
 TEveManager.cxx:562
 TEveManager.cxx:563
 TEveManager.cxx:564
 TEveManager.cxx:565
 TEveManager.cxx:566
 TEveManager.cxx:567
 TEveManager.cxx:568
 TEveManager.cxx:569
 TEveManager.cxx:570
 TEveManager.cxx:571
 TEveManager.cxx:572
 TEveManager.cxx:573
 TEveManager.cxx:574
 TEveManager.cxx:575
 TEveManager.cxx:576
 TEveManager.cxx:577
 TEveManager.cxx:578
 TEveManager.cxx:579
 TEveManager.cxx:580
 TEveManager.cxx:581
 TEveManager.cxx:582
 TEveManager.cxx:583
 TEveManager.cxx:584
 TEveManager.cxx:585
 TEveManager.cxx:586
 TEveManager.cxx:587
 TEveManager.cxx:588
 TEveManager.cxx:589
 TEveManager.cxx:590
 TEveManager.cxx:591
 TEveManager.cxx:592
 TEveManager.cxx:593
 TEveManager.cxx:594
 TEveManager.cxx:595
 TEveManager.cxx:596
 TEveManager.cxx:597
 TEveManager.cxx:598
 TEveManager.cxx:599
 TEveManager.cxx:600
 TEveManager.cxx:601
 TEveManager.cxx:602
 TEveManager.cxx:603
 TEveManager.cxx:604
 TEveManager.cxx:605
 TEveManager.cxx:606
 TEveManager.cxx:607
 TEveManager.cxx:608
 TEveManager.cxx:609
 TEveManager.cxx:610
 TEveManager.cxx:611
 TEveManager.cxx:612
 TEveManager.cxx:613
 TEveManager.cxx:614
 TEveManager.cxx:615
 TEveManager.cxx:616
 TEveManager.cxx:617
 TEveManager.cxx:618
 TEveManager.cxx:619
 TEveManager.cxx:620
 TEveManager.cxx:621
 TEveManager.cxx:622
 TEveManager.cxx:623
 TEveManager.cxx:624
 TEveManager.cxx:625
 TEveManager.cxx:626
 TEveManager.cxx:627
 TEveManager.cxx:628
 TEveManager.cxx:629
 TEveManager.cxx:630
 TEveManager.cxx:631
 TEveManager.cxx:632
 TEveManager.cxx:633
 TEveManager.cxx:634
 TEveManager.cxx:635
 TEveManager.cxx:636
 TEveManager.cxx:637
 TEveManager.cxx:638
 TEveManager.cxx:639
 TEveManager.cxx:640
 TEveManager.cxx:641
 TEveManager.cxx:642
 TEveManager.cxx:643
 TEveManager.cxx:644
 TEveManager.cxx:645
 TEveManager.cxx:646
 TEveManager.cxx:647
 TEveManager.cxx:648
 TEveManager.cxx:649
 TEveManager.cxx:650
 TEveManager.cxx:651
 TEveManager.cxx:652
 TEveManager.cxx:653
 TEveManager.cxx:654
 TEveManager.cxx:655
 TEveManager.cxx:656
 TEveManager.cxx:657
 TEveManager.cxx:658
 TEveManager.cxx:659
 TEveManager.cxx:660
 TEveManager.cxx:661
 TEveManager.cxx:662
 TEveManager.cxx:663
 TEveManager.cxx:664
 TEveManager.cxx:665
 TEveManager.cxx:666
 TEveManager.cxx:667
 TEveManager.cxx:668
 TEveManager.cxx:669
 TEveManager.cxx:670
 TEveManager.cxx:671
 TEveManager.cxx:672
 TEveManager.cxx:673
 TEveManager.cxx:674
 TEveManager.cxx:675
 TEveManager.cxx:676
 TEveManager.cxx:677
 TEveManager.cxx:678
 TEveManager.cxx:679
 TEveManager.cxx:680
 TEveManager.cxx:681
 TEveManager.cxx:682
 TEveManager.cxx:683
 TEveManager.cxx:684
 TEveManager.cxx:685
 TEveManager.cxx:686
 TEveManager.cxx:687
 TEveManager.cxx:688
 TEveManager.cxx:689
 TEveManager.cxx:690
 TEveManager.cxx:691
 TEveManager.cxx:692
 TEveManager.cxx:693
 TEveManager.cxx:694
 TEveManager.cxx:695
 TEveManager.cxx:696
 TEveManager.cxx:697
 TEveManager.cxx:698
 TEveManager.cxx:699
 TEveManager.cxx:700
 TEveManager.cxx:701
 TEveManager.cxx:702
 TEveManager.cxx:703
 TEveManager.cxx:704
 TEveManager.cxx:705
 TEveManager.cxx:706
 TEveManager.cxx:707
 TEveManager.cxx:708
 TEveManager.cxx:709
 TEveManager.cxx:710
 TEveManager.cxx:711
 TEveManager.cxx:712
 TEveManager.cxx:713
 TEveManager.cxx:714
 TEveManager.cxx:715
 TEveManager.cxx:716
 TEveManager.cxx:717
 TEveManager.cxx:718
 TEveManager.cxx:719
 TEveManager.cxx:720
 TEveManager.cxx:721
 TEveManager.cxx:722
 TEveManager.cxx:723
 TEveManager.cxx:724
 TEveManager.cxx:725
 TEveManager.cxx:726
 TEveManager.cxx:727
 TEveManager.cxx:728
 TEveManager.cxx:729
 TEveManager.cxx:730
 TEveManager.cxx:731
 TEveManager.cxx:732
 TEveManager.cxx:733
 TEveManager.cxx:734
 TEveManager.cxx:735
 TEveManager.cxx:736
 TEveManager.cxx:737
 TEveManager.cxx:738
 TEveManager.cxx:739
 TEveManager.cxx:740
 TEveManager.cxx:741
 TEveManager.cxx:742
 TEveManager.cxx:743
 TEveManager.cxx:744
 TEveManager.cxx:745
 TEveManager.cxx:746
 TEveManager.cxx:747
 TEveManager.cxx:748
 TEveManager.cxx:749
 TEveManager.cxx:750
 TEveManager.cxx:751
 TEveManager.cxx:752
 TEveManager.cxx:753
 TEveManager.cxx:754
 TEveManager.cxx:755
 TEveManager.cxx:756
 TEveManager.cxx:757
 TEveManager.cxx:758
 TEveManager.cxx:759
 TEveManager.cxx:760
 TEveManager.cxx:761
 TEveManager.cxx:762
 TEveManager.cxx:763
 TEveManager.cxx:764
 TEveManager.cxx:765
 TEveManager.cxx:766
 TEveManager.cxx:767
 TEveManager.cxx:768
 TEveManager.cxx:769
 TEveManager.cxx:770
 TEveManager.cxx:771
 TEveManager.cxx:772
 TEveManager.cxx:773
 TEveManager.cxx:774
 TEveManager.cxx:775
 TEveManager.cxx:776
 TEveManager.cxx:777
 TEveManager.cxx:778
 TEveManager.cxx:779
 TEveManager.cxx:780
 TEveManager.cxx:781
 TEveManager.cxx:782
 TEveManager.cxx:783
 TEveManager.cxx:784
 TEveManager.cxx:785
 TEveManager.cxx:786
 TEveManager.cxx:787
 TEveManager.cxx:788
 TEveManager.cxx:789
 TEveManager.cxx:790
 TEveManager.cxx:791
 TEveManager.cxx:792
 TEveManager.cxx:793
 TEveManager.cxx:794
 TEveManager.cxx:795
 TEveManager.cxx:796
 TEveManager.cxx:797
 TEveManager.cxx:798
 TEveManager.cxx:799
 TEveManager.cxx:800
 TEveManager.cxx:801
 TEveManager.cxx:802
 TEveManager.cxx:803
 TEveManager.cxx:804
 TEveManager.cxx:805
 TEveManager.cxx:806
 TEveManager.cxx:807
 TEveManager.cxx:808
 TEveManager.cxx:809
 TEveManager.cxx:810
 TEveManager.cxx:811
 TEveManager.cxx:812
 TEveManager.cxx:813
 TEveManager.cxx:814
 TEveManager.cxx:815
 TEveManager.cxx:816
 TEveManager.cxx:817
 TEveManager.cxx:818
 TEveManager.cxx:819
 TEveManager.cxx:820
 TEveManager.cxx:821
 TEveManager.cxx:822
 TEveManager.cxx:823
 TEveManager.cxx:824
 TEveManager.cxx:825
 TEveManager.cxx:826
 TEveManager.cxx:827
 TEveManager.cxx:828
 TEveManager.cxx:829
 TEveManager.cxx:830
 TEveManager.cxx:831
 TEveManager.cxx:832
 TEveManager.cxx:833
 TEveManager.cxx:834
 TEveManager.cxx:835
 TEveManager.cxx:836
 TEveManager.cxx:837
 TEveManager.cxx:838
 TEveManager.cxx:839
 TEveManager.cxx:840
 TEveManager.cxx:841
 TEveManager.cxx:842
 TEveManager.cxx:843
 TEveManager.cxx:844
 TEveManager.cxx:845
 TEveManager.cxx:846
 TEveManager.cxx:847
 TEveManager.cxx:848
 TEveManager.cxx:849
 TEveManager.cxx:850
 TEveManager.cxx:851
 TEveManager.cxx:852
 TEveManager.cxx:853
 TEveManager.cxx:854
 TEveManager.cxx:855
 TEveManager.cxx:856
 TEveManager.cxx:857
 TEveManager.cxx:858
 TEveManager.cxx:859
 TEveManager.cxx:860
 TEveManager.cxx:861
 TEveManager.cxx:862
 TEveManager.cxx:863
 TEveManager.cxx:864
 TEveManager.cxx:865
 TEveManager.cxx:866
 TEveManager.cxx:867
 TEveManager.cxx:868
 TEveManager.cxx:869
 TEveManager.cxx:870
 TEveManager.cxx:871
 TEveManager.cxx:872
 TEveManager.cxx:873
 TEveManager.cxx:874
 TEveManager.cxx:875
 TEveManager.cxx:876
 TEveManager.cxx:877
 TEveManager.cxx:878
 TEveManager.cxx:879
 TEveManager.cxx:880
 TEveManager.cxx:881
 TEveManager.cxx:882
 TEveManager.cxx:883
 TEveManager.cxx:884
 TEveManager.cxx:885
 TEveManager.cxx:886
 TEveManager.cxx:887
 TEveManager.cxx:888
 TEveManager.cxx:889
 TEveManager.cxx:890
 TEveManager.cxx:891
 TEveManager.cxx:892
 TEveManager.cxx:893
 TEveManager.cxx:894
 TEveManager.cxx:895
 TEveManager.cxx:896
 TEveManager.cxx:897
 TEveManager.cxx:898
 TEveManager.cxx:899
 TEveManager.cxx:900
 TEveManager.cxx:901
 TEveManager.cxx:902
 TEveManager.cxx:903
 TEveManager.cxx:904
 TEveManager.cxx:905
 TEveManager.cxx:906
 TEveManager.cxx:907
 TEveManager.cxx:908
 TEveManager.cxx:909
 TEveManager.cxx:910
 TEveManager.cxx:911
 TEveManager.cxx:912
 TEveManager.cxx:913
 TEveManager.cxx:914
 TEveManager.cxx:915
 TEveManager.cxx:916
 TEveManager.cxx:917
 TEveManager.cxx:918
 TEveManager.cxx:919
 TEveManager.cxx:920
 TEveManager.cxx:921
 TEveManager.cxx:922
 TEveManager.cxx:923
 TEveManager.cxx:924
 TEveManager.cxx:925
 TEveManager.cxx:926
 TEveManager.cxx:927
 TEveManager.cxx:928
 TEveManager.cxx:929
 TEveManager.cxx:930
 TEveManager.cxx:931
 TEveManager.cxx:932
 TEveManager.cxx:933
 TEveManager.cxx:934
 TEveManager.cxx:935
 TEveManager.cxx:936
 TEveManager.cxx:937
 TEveManager.cxx:938
 TEveManager.cxx:939
 TEveManager.cxx:940
 TEveManager.cxx:941
 TEveManager.cxx:942
 TEveManager.cxx:943
 TEveManager.cxx:944
 TEveManager.cxx:945
 TEveManager.cxx:946
 TEveManager.cxx:947
 TEveManager.cxx:948
 TEveManager.cxx:949
 TEveManager.cxx:950
 TEveManager.cxx:951
 TEveManager.cxx:952
 TEveManager.cxx:953
 TEveManager.cxx:954
 TEveManager.cxx:955
 TEveManager.cxx:956
 TEveManager.cxx:957
 TEveManager.cxx:958
 TEveManager.cxx:959
 TEveManager.cxx:960
 TEveManager.cxx:961
 TEveManager.cxx:962
 TEveManager.cxx:963
 TEveManager.cxx:964
 TEveManager.cxx:965
 TEveManager.cxx:966
 TEveManager.cxx:967
 TEveManager.cxx:968
 TEveManager.cxx:969
 TEveManager.cxx:970
 TEveManager.cxx:971
 TEveManager.cxx:972
 TEveManager.cxx:973
 TEveManager.cxx:974
 TEveManager.cxx:975
 TEveManager.cxx:976
 TEveManager.cxx:977
 TEveManager.cxx:978
 TEveManager.cxx:979
 TEveManager.cxx:980
 TEveManager.cxx:981
 TEveManager.cxx:982
 TEveManager.cxx:983
 TEveManager.cxx:984
 TEveManager.cxx:985
 TEveManager.cxx:986
 TEveManager.cxx:987
 TEveManager.cxx:988
 TEveManager.cxx:989
 TEveManager.cxx:990
 TEveManager.cxx:991
 TEveManager.cxx:992
 TEveManager.cxx:993
 TEveManager.cxx:994
 TEveManager.cxx:995
 TEveManager.cxx:996
 TEveManager.cxx:997
 TEveManager.cxx:998
 TEveManager.cxx:999
 TEveManager.cxx:1000
 TEveManager.cxx:1001
 TEveManager.cxx:1002
 TEveManager.cxx:1003
 TEveManager.cxx:1004
 TEveManager.cxx:1005
 TEveManager.cxx:1006
 TEveManager.cxx:1007
 TEveManager.cxx:1008
 TEveManager.cxx:1009