Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveManager.h
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TEveManager
13#define ROOT_TEveManager
14
15#include "TEveElement.h"
16
17#include "TSysEvtHandler.h"
18#include "TTimer.h"
19#include "TVirtualPad.h"
20
21class TMap;
22class TExMap;
23class TMacro;
24class TFolder;
25class TCanvas;
26class TGeoManager;
27
28class TGTab;
29class TGStatusBar;
30class TGListTree;
31class TGListTreeItem;
32class TGStatusBar;
33class TGWindow;
34
35class TGLViewer;
36
37class TEveSelection;
39class TEveBrowser;
40class TEveGedEditor;
41
42class TEveViewer; class TEveViewerList;
43class TEveScene; class TEveSceneList;
44
47
48
50{
51 TEveManager(const TEveManager&); // Not implemented
52 TEveManager& operator=(const TEveManager&); // Not implemented
53
54public:
56 {
57 private:
58 TRedrawDisabler(const TRedrawDisabler&); // Not implemented
59 TRedrawDisabler& operator=(const TRedrawDisabler&); // Not implemented
60
62 public:
64 { if (fMgr) fMgr->DisableRedraw(); }
66 { if (fMgr) fMgr->EnableRedraw(); }
67
68 ClassDef(TRedrawDisabler, 0); // Exception-safe EVE redraw-disabler.
69 };
70
72 {
73 public:
75 virtual ~TExceptionHandler() { Remove(); }
76
77 virtual EStatus Handle(std::exception& exc);
78
79 ClassDef(TExceptionHandler, 0); // Exception handler for Eve exceptions.
80 };
81
82protected:
84
88
91
94
96
100
104
112
113 // Fine grained scene updates.
115
116 // Selection / hihglight elements
119
122
123public:
124 TEveManager(UInt_t w, UInt_t h, Bool_t map_window=kTRUE, Option_t* opt="FI");
125 virtual ~TEveManager();
126
128
131
135 void ClearOrphanage();
136
137 TEveBrowser* GetBrowser() const { return fBrowser; }
139 TEveGedEditor* GetEditor() const;
140 TGStatusBar* GetStatusBar() const;
141
143
144 TEveSceneList* GetScenes() const { return fScenes; }
145 TEveViewerList* GetViewers() const { return fViewers; }
146
150
152
153 TCanvas* AddCanvasTab(const char* name);
154 TGWindow* GetMainWindow() const;
157 TEveViewer* SpawnNewViewer(const char* name, const char* title="", Bool_t embed=kTRUE);
158 TEveScene* SpawnNewScene(const char* name, const char* title="");
159
161 TMacro* GetMacro(const char* name) const;
162
163 void EditElement(TEveElement* element);
164
167
168 void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
169 {
171 if (resetCameras) fResetCameras = kTRUE;
172 if (dropLogicals) fDropLogicals = kTRUE;
173 }
174 void RegisterRedraw3D();
175 void DoRedraw3D();
176 void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE);
177
180
181 void ElementChanged(TEveElement* element, Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE);
183
184 // Fine grained updates via stamping.
185 void ElementStamped(TEveElement* element);
186
187 // These are more like TEveManager stuff.
188 TGListTree* GetListTree() const;
191
193
194 void AddElement(TEveElement* element, TEveElement* parent=0);
195 void AddGlobalElement(TEveElement* element, TEveElement* parent=0);
196
197 void RemoveElement(TEveElement* element, TEveElement* parent);
198 void PreDeleteElement(TEveElement* element);
199
200 void ElementSelect(TEveElement* element);
202
203 // VizDB - Visualization-parameter data-base.
204 Bool_t InsertVizDBEntry(const TString& tag, TEveElement* model,
205 Bool_t replace, Bool_t update);
206 Bool_t InsertVizDBEntry(const TString& tag, TEveElement* model);
207 TEveElement* FindVizDBEntry (const TString& tag);
208
209 void LoadVizDB(const TString& filename, Bool_t replace, Bool_t update);
210 void LoadVizDB(const TString& filename);
211 void SaveVizDB(const TString& filename);
212
214 Bool_t GetVizDBUpdate () const { return fVizDBUpdate; }
217
218
219 // Geometry management.
220 TGeoManager* GetGeometry(const TString& filename);
223 void RegisterGeometryAlias(const TString& alias, const TString& filename);
224
225 void SetStatusLine(const char* text);
226 void ClearROOTClassSaved();
227
228 void CloseEveWindow();
229
230 static TEveManager* Create(Bool_t map_window=kTRUE, Option_t* opt="FIV");
231 static void Terminate();
232
233 // Access to internals, needed for low-level control in advanced
234 // applications.
235
237
239
240 ClassDef(TEveManager, 0); // Eve application manager.
241};
242
244
245#endif
#define R__EXTERN
Definition DllImport.h:27
ROOT::R::TRInterface & r
Definition Object.C:4
#define h(i)
Definition RSha256.hxx:106
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
const Bool_t kFALSE
Definition RtypesCore.h:92
bool Bool_t
Definition RtypesCore.h:63
const Bool_t kTRUE
Definition RtypesCore.h:91
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
R__EXTERN TEveManager * gEve
char name[80]
Definition TGX11.cxx:110
The Canvas class.
Definition TCanvas.h:23
Specialization of TRootBrowser for Eve.
A list of TEveElements.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
std::list< TEveElement * > List_t
Definition TEveElement.h:71
Base class for event management and navigation.
Composite GUI frame for parallel display of a TGListTree and TEveGedEditor.
Definition TEveBrowser.h:83
Specialization of TGedEditor for proper update propagation to TEveManager.
Exception handler for Eve exceptions.
Definition TEveManager.h:72
virtual EStatus Handle(std::exception &exc)
Handle exceptions deriving from TEveException.
TRedrawDisabler(const TRedrawDisabler &)
TRedrawDisabler & operator=(const TRedrawDisabler &)
TRedrawDisabler(TEveManager *m)
Definition TEveManager.h:63
Central application manager for Eve.
Definition TEveManager.h:50
TMap * fVizDB
Definition TEveManager.h:85
TExceptionHandler * GetExcHandler() const
TEveWindowManager * fWindowManager
Definition TEveManager.h:97
Bool_t GetVizDBUpdate() const
Int_t fRedrawDisabled
void DoRedraw3D()
Perform 3D redraw of scenes and viewers whose contents has changed.
void DisableRedraw()
void ClearOrphanage()
Clear the orphanage.
void SetStatusLine(const char *text)
Set the text in the right side of browser's status bar.
TGStatusBar * GetStatusBar() const
Returns main window status bar.
TEveViewerList * fViewers
Definition TEveManager.h:98
void SetKeepEmptyCont(Bool_t k)
TGListTree * GetListTree() const
Get default list-tree widget.
TEveViewerList * GetViewers() const
TEveElementList * fOrphanage
TGeoManager * GetDefaultGeometry()
Get the default geometry.
TTimer fRedrawTimer
void RegisterRedraw3D()
Register a request for 3D redraw.
TExMap * PtrToStampedElements()
TEveGListTreeEditorFrame * GetLTEFrame() const
TEveSelection * fSelection
Bool_t fDropLogicals
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
Bool_t fTimerActive
Bool_t fFullRedraw
static void Terminate()
Properly terminate global TEveManager.
TEveSelection * GetSelection() const
void CloseEveWindow()
Close button has been clicked on EVE main window (browser).
void ClearROOTClassSaved()
Work-around uber ugly hack used in SavePrimitive and co.
TEveSceneList * GetScenes() const
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
void PreDeleteElement(TEveElement *element)
Called from TEveElement prior to its destruction so the framework components (like object editor) can...
TEveGListTreeEditorFrame * fLTEFrame
Definition TEveManager.h:93
Bool_t fVizDBUpdate
Definition TEveManager.h:87
TGeoManager * GetGeometryByAlias(const TString &alias)
Get geometry with given alias.
void ScenesChanged(TEveElement::List_t &scenes)
Mark all scenes from the given list as changed.
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
TEveViewer * GetDefaultViewer() const
Returns the default viewer - the first one in the fViewers list.
Bool_t GetKeepEmptyCont() const
TEveScene * GetGlobalScene() const
TCanvas * AddCanvasTab(const char *name)
Add a new canvas tab.
TExceptionHandler * fExcHandler
Definition TEveManager.h:83
TEveBrowser * GetBrowser() const
Bool_t fKeepEmptyCont
TEveScene * fGlobalScene
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=0)
Bool_t ElementPaste(TEveElement *element)
Paste has been called.
void ElementChanged(TEveElement *element, Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE)
Element was changed, perform framework side action.
void ElementSelect(TEveElement *element)
Select an element.
virtual ~TEveManager()
Destructor.
void EditElement(TEveElement *element)
Show element in default editor.
TEveBrowser * fBrowser
Definition TEveManager.h:92
void SetUseOrphanage(Bool_t o)
Bool_t InsertVizDBEntry(const TString &tag, TEveElement *model, Bool_t replace, Bool_t update)
Insert a new visualization-parameter database entry.
void RemoveElement(TEveElement *element, TEveElement *parent)
Remove element from parent.
void SetVizDBUpdate(Bool_t u)
TEveManager(const TEveManager &)
void RegisterGeometryAlias(const TString &alias, const TString &filename)
Register 'name' as an alias for geometry file 'filename'.
TEveSelection * fHighlight
TEveWindowManager * GetWindowManager() const
TEveGedEditor * GetEditor() const
Returns main object editor.
TEveScene * fEventScene
void EnableRedraw()
void SaveVizDB(const TString &filename)
Save visualization-parameter database to file filename.
void SetCurrentEvent(TEveEventManager *mgr)
TEveViewer * SpawnNewViewer(const char *name, const char *title="", Bool_t embed=kTRUE)
Create a new GL viewer.
TEveElement * FindVizDBEntry(const TString &tag)
Find a visualization-parameter database entry corresponding to tag.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TEveManager & operator=(const TEveManager &)
void EnforceTimerActive(Bool_t ta)
TMacro * GetMacro(const char *name) const
Find macro in fMacroFolder by name.
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
TGListTreeItem * AddEvent(TEveEventManager *event)
Add a new event and make it the current event.
Bool_t GetUseOrphanage() const
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Bool_t fVizDBReplace
Definition TEveManager.h:86
TFolder * GetMacroFolder() const
TFolder * fMacroFolder
Definition TEveManager.h:95
TEveSceneList * fScenes
Definition TEveManager.h:99
TExMap * fStampedElements
Bool_t fResetCameras
void RemoveFromListTree(TEveElement *element, TGListTree *lt, TGListTreeItem *lti)
Remove top-level element from list-tree with specified tree-item.
TGWindow * GetMainWindow() const
Get the main window, i.e. EVE-browser.
void LoadVizDB(const TString &filename, Bool_t replace, Bool_t update)
Load visualization-parameter database from file filename.
Bool_t GetVizDBReplace() const
TMap * fGeometryAliases
Definition TEveManager.h:90
void SetVizDBReplace(Bool_t r)
TGeoManager * GetGeometry(const TString &filename)
Get geometry with given filename.
TEveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
TEveSelection * GetHighlight() const
TMap * fGeometries
Definition TEveManager.h:89
Bool_t fUseOrphanage
void ElementStamped(TEveElement *element)
Mark element as changed – it will be processed on next redraw.
TEveElementList * GetOrphanage() const
TEveEventManager * fCurrentEvent
TEveScene * GetEventScene() const
TEveEventManager * GetCurrentEvent() const
List of Scenes providing common operations on TEveScene collections.
Definition TEveScene.h:80
Eve representation of TGLScene.
Definition TEveScene.h:27
Make sure there is a SINGLE running TEveSelection for each selection type (select/highlight).
List of Viewers providing common operations on TEveViewer collections.
Definition TEveViewer.h:80
Eve representation of TGLViewer.
Definition TEveViewer.h:31
Manager for EVE windows.
This class stores a (key,value) pair using an external hash.
Definition TExMap.h:33
A TFolder object is a collection of objects and folders.
Definition TFolder.h:30
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition TGLViewer.h:55
Definition TGTab.h:62
The manager class for any TGeo geometry.
Definition TGeoManager.h:45
Class supporting a collection of lines with C++ code.
Definition TMacro.h:31
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition TMap.h:40
virtual void Remove()
Remove std::exception handler from system handler list.
virtual void Add()
Add std::exception handler to system handler list.
Basic string class.
Definition TString.h:136
Handles synchronous and a-synchronous timer events.
Definition TTimer.h:51
TText * text
auto * m
Definition textangle.C:8