64 fVizDB (0), fVizDBReplace(
kTRUE), fVizDBUpdate(
kTRUE),
107 throw(eh +
"There can be only one!");
175 for (
Int_t vc = 0; vc < viewer_count; ++vc)
235 fBrowser->TRootBrowser::CloseWindow();
388 while (stamped_elements.
Next(key, value))
408 while (stamped_elements.
Next(key, value))
442 static const TEveException eh(
"TEveElement::ElementChanged ");
505 static const TEveException eh(
"TEveManager::RemoveFromListTree ");
508 throw(eh +
"not a top-level item.");
569 if (
GetEditor()->GetEveElement() == element)
579 if (element->fImpliedSelected > 0)
581 if (element->fImpliedHighlighted > 0)
649 pair->
SetValue(dynamic_cast<TObject*>(model));
722 if (re.
Match(filename) != 2) {
723 Error(
"SaveVizDB",
"filename does not match required format '(.+)\\.\\w+'.");
727 TString exp_filename(filename);
730 std::ofstream out(exp_filename, std::ios::out | std::ios::trunc);
731 out <<
"void " << re[1] <<
"()\n";
733 out <<
" TEveManager::Create();\n";
746 var_name.
Form(
"x%03d", var_id++);
769 TString exp_filename = filename;
771 printf(
"%s loading: '%s' -> '%s'.\n", eh.
Data(),
772 filename.
Data(), exp_filename.
Data());
783 Warning(eh,
"TGeoManager is locked ... unlocking it.");
787 throw(eh +
"TGeoManager::Import() failed for '" + exp_filename +
"'.");
793 gGeoManager->GetTopVolume()->VisibleDaughters(1);
797 TFile f(exp_filename,
"READ");
801 TIter next(gGeoManager->GetListOfVolumes());
810 vol->SetLineColor(newID);
830 throw(eh +
"geometry alias '" + alias +
"' not registered.");
869 while((cls = (
TClass *)nextcl()))
902 if (
gROOT->IsBatch())
904 throw eh +
"ROOT is running in batch mode.";
910 throw eh +
"window system not initialized.";
void ElementStamped(TEveElement *element)
Mark element as changed – it will be processed on next redraw.
TEveWindowManager * fWindowManager
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
void SetVizModel(TEveElement *model)
Set visualization-parameter model element.
A TFolder object is a collection of objects and folders.
void Remove(ULong64_t hash, Long64_t key)
Remove entry with specified key from the TExMap.
TEveWindowSlot * GetCurrentWindowAsSlot() const
Return current window dynamic-casted to TEveWindowSlot.
void DisplayElement(TEveElement *re)
Show a TEveElement in editor.
Base class for event management and navigation.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
virtual void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1)
Start embedding external frame in the tab "pos" and tab element "subpos".
The manager class for any TGeo geometry.
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
Eve representation of TGLScene.
void DoRedraw3D()
Perform 3D redraw of scenes and viewers whose contents has changed.
List of Viewers providing common operations on TEveViewer collections.
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=0)
Create a new tab in a given tab-widget and populate it with a default window-slot.
void EditElement(TEveElement *element)
Show element in default editor.
Collectable string class.
Specialization of TGedEditor for proper update propagation to TEveManager.
R__EXTERN void * gTQSender
virtual ~TEveManager()
Destructor.
TEveViewerList * fViewers
void DestroyElementRenderers(TEveElement *element)
Loop over all scenes and remove all instances of element from them.
Bool_t HasChildren() const
An identity transformation.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
static void DestroyEditors()
Destroys all editors. Called from EVE termination.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
void IncDenyDestroy()
Increases the deny-destroy count of the element.
Specialization of TRootBrowser for Eve.
TEveGedEditor * GetEditor() const
Class supporting a collection of lines with C++ code.
void RegisterGeometryAlias(const TString &alias, const TString &filename)
Register 'name' as an alias for geometry file 'filename'.
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Description of TEveWindowSlot.
Bool_t ElementPaste(TEveElement *element)
Paste has been called.
virtual void CollectSceneParents(List_t &scenes)
Collect all parents of class TEveScene.
virtual void Destroy()
Destroy this element.
TEveElement * FindVizDBEntry(const TString &tag)
Find a visualization-parameter database entry corresponding to tag.
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=0)
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
R__EXTERN TApplication * gApplication
void SaveVizDB(const TString &filename)
Save visualization-parameter database to file filename.
TObject * At(Int_t idx) const
void RemoveFromListTree(TEveElement *element, TGListTree *lt, TGListTreeItem *lti)
Remove top-level element from list-tree with specified tree-item.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
TEveSelection * fSelection
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
virtual void PropagateVizParamsToProjecteds()
Propagate visualization parameters to dependent elements.
TEveElementList * fOrphanage
TExMap * fStampedElements
TGeoManager * GetDefaultGeometry()
Get the default geometry.
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
void LoadVizDB(const TString &filename, Bool_t replace, Bool_t update)
Load visualization-parameter database from file filename.
TGListTree * GetListTree() const
Get default list-tree widget.
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
TGeoManager * GetGeometryByAlias(const TString &alias)
Get geometry with given alias.
static TEveWindowSlot * CreateWindowMainFrame(TEveWindow *eve_parent=0)
Create a new main-frame and populate it with a default window-slot.
virtual TObject * GetModel() const
static void Terminate()
Properly terminate global TEveManager.
void SetStatusLine(const char *text)
Set the text in the right side of browser's status bar.
void ReplaceWindow(TEveWindow *w)
Replace this window with the passed one.
TCanvas * AddCanvasTab(const char *name)
Add a new canvas tab.
void ClearROOTClassSaved()
Work-around uber ugly hack used in SavePrimitive and co.
static Bool_t IsLocked()
Check lock state.
virtual void Start(Long_t milliSec=-1, Bool_t singleShot=kFALSE)
Starts the timer with a milliSec timeout.
void Info(const char *location, const char *msgfmt,...)
TExceptionHandler * fExcHandler
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TGStatusBar * GetStatusBar() const
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
static void SetupEnvironment()
Setup Include and Macro paths.
void SaveVizParams(std::ostream &out, const TString &tag, const TString &var)
Save visualization parameters for this element with given tag.
virtual void DestroyElements()
Destroy all children of this element.
void Error(const char *location, const char *msgfmt,...)
TGWindow * GetMainWindow() const
Get the main window, i.e. EVE-browser.
virtual void ClearStamps()
void RegisterRedraw3D()
Register a request for 3D redraw.
TGeoManager * GetGeometry(const TString &filename)
Get geometry with given filename.
void SanitizeTabCounts()
TRootBrowser keeps (somewhat unnecessarily) counters for number ob tabs on each position.
void ScenesChanged(TEveElement::List_t &scenes)
Mark all scenes from the given list as changed.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
void SetValue(TObject *val)
void ElementChanged(TEveElement *element, Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE)
Element was changed, perform framework side action.
TGListTreeItem * AddEvent(TEveEventManager *event)
Add a new event and make it the current event.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
virtual void SetOwnerKeyValue(Bool_t ownkeys=kTRUE, Bool_t ownvals=kTRUE)
Set ownership for keys and values.
void DestroyScenes()
Destroy all scenes and their contents.
Long64_t GetValue(ULong64_t hash, Long64_t key)
Return the value belonging to specified key and hash value.
static void NeedGraphicsLibs()
Static method.
static void ElementChanged(TEveElement *el)
Element was changed. Update editors showing it.
static void LockGeometry()
Lock current geometry so that no other geometry can be imported.
virtual TGListTreeItem * AddIntoListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Add this element into ltree to an already existing item parent_lti.
R__EXTERN TSystem * gSystem
TMacro * GetMacro(const char *name) const
Find macro in fMacroFolder by name.
virtual void SetStatusText(const char *txt, Int_t col)
Set text in culumn col in status bar.
void CloseEveWindow()
Close button has been clicked on EVE main window (browser).
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
void SetHighlightMode()
Set to 'highlight' mode.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
void ClearOrphanage()
Clear the orphanage.
TEveGedEditor * GetEditor() const
Returns main object editor.
TEveViewer * SpawnNewViewer(const char *name, const char *title="", Bool_t embed=kTRUE)
Create a new GL viewer.
TEveEventManager * fCurrentEvent
char * Form(const char *fmt,...)
List of Scenes providing common operations on TEveScene collections.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
The ROOT global object gROOT contains a list of all defined classes.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
virtual void AddElement(TEveElement *el)
Add el to the list of children.
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
void Warning(const char *location, const char *msgfmt,...)
Make sure there is a SINGLE running TEveSelection for each selection type (select/highlight).
void Delete(Option_t *opt="")
Delete all entries stored in the TExMap.
TGTab * GetTabRight() const
virtual void ClearViewPort()
Clear view port and redraw full content.
virtual Color_t GetLineColor() const
Return the line color.
virtual Bool_t RemoveFromListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Remove element from list-tree 'ltree' where its parent item is 'parent_lti'.
void InitializeGraphics()
Initialize the graphics environment.
void InitPlugins(Option_t *opt="FI")
Initialize standard plugins.
TGListTreeItem * GetParent() const
Class used by TMap to store (key,value) pairs.
std::list< TEveElement * > List_t
TGLViewer * GetGLViewer() const
virtual void RemoveImpliedSelected(TEveElement *el)
Remove element from all implied-selected sets.
UChar_t GetChangeBits() const
R__EXTERN TGeoManager * gGeoManager
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
static void Macro(const char *mac)
Execute macro 'mac'. Do not reload the macro.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
unsigned long long ULong64_t
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element's children, i.e.
Central application manager for Eve.
static constexpr double s
void Beep(Int_t freq=-1, Int_t duration=-1, Bool_t setDefault=kFALSE)
Beep for duration milliseconds with a tone of frequency freq.
The color creation and management class.
virtual void StopEmbedding(const char *name=0)
virtual TObject * FindObject(const char *name) const
Search object identified by name in the tree of folders inside this folder.
TEveViewer * GetDefaultViewer() const
Returns the default viewer - the first one in the fViewers list.
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
TEveGListTreeEditorFrame * fLTEFrame
TObject * FindObject(const char *keyname) const
Check if a (key,value) pair exists with keyname as name of the key.
R__EXTERN TGeoIdentity * gGeoIdentity
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
void RemoveElement(TEveElement *element, TEveElement *parent)
Remove element from parent.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value)
Get next entry from TExMap. Returns kFALSE at end of map.
void ConnectSignals()
Connect list-tree signals.
virtual void AddElement(TEveElement *el)
Call base-class implementation.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
TEveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
void ProcessSceneChanges(Bool_t dropLogicals, TExMap *stampMap)
Loop over all scenes and update them accordingly:
virtual EStatus Handle(std::exception &exc)
Handle exceptions deriving from TEveException.
Exception class thrown by TEve classes and macros.
TObject * GetValue(const char *keyname) const
Returns a pointer to the value associated with keyname as name of the key.
void RepaintAllScenes(Bool_t dropLogicals)
Repaint all scenes.
Bool_t InsertVizDBEntry(const TString &tag, TEveElement *model, Bool_t replace, Bool_t update)
Insert a new visualization-parameter database entry.
Composite GUI frame for parallel display of a TGListTree and TEveGedEditor.
TEveManager(const TEveManager &)
void ElementSelect(TEveElement *element)
Select an element.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
Exception handler for Eve exceptions.
static void ElementDeleted(TEveElement *el)
Element is being deleted. Close editors showing it.
void PreDeleteElement(TEveElement *element)
Called from TEveElement prior to its destruction so the framework components (like object editor) can...
Int_t Substitute(TString &s, const TString &r, Bool_t doDollarSubst=kTRUE)
Substitute matching part of s with r, dollar back-ref substitution is performed if doDollarSubst is t...
virtual void DeleteWindow()
Delete window.
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
void DestroyWindows()
Wait for all windows to shut-down.
virtual TObject * GetEditorObject(const TEveException &eh) const
TEveElement * GetEveElement() const
Return eve-element if it is the model object.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
static void UnlockGeometry()
Unlock current geometry.
static void SetupGUI()
Setup icon pictures and mime-types.
This class stores a (key,value) pair using an external hash.
Eve representation of TGLViewer.
TGStatusBar * GetStatusBar() const
Returns main window status bar.
void AddAt(UInt_t slot, ULong64_t hash, Long64_t key, Long64_t value)
Add an (key,value) pair to the table.
virtual void Close(Option_t *option="")
Close a file.
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
const char * Data() const
TGLSAViewer * SpawnGLViewer(TGedEditor *ged=0, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE)
Spawn new GLViewer and adopt it.
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
TEveSelection * fHighlight