103 throw(eh +
"There can be only one!");
124 fRedrawTimer.Connect(
"Timeout()",
"TEveManager",
this,
"DoRedraw3D()");
171 for (
Int_t vc = 0; vc < viewer_count; ++vc)
231 fBrowser->TRootBrowser::CloseWindow();
323 v->SpawnGLViewer(embed ?
GetEditor() :
nullptr);
384 while (stamped_elements.
Next(key, value))
404 while (stamped_elements.
Next(key, value))
428 fScenes ->RepaintAllScenes (dropLogicals);
429 fViewers->RepaintAllViewers(resetCameras, dropLogicals);
438 static const TEveException eh(
"TEveElement::ElementChanged ");
501 static const TEveException eh(
"TEveManager::RemoveFromListTree ");
504 throw(eh +
"not a top-level item.");
528 if (parent ==
nullptr) {
544 if (parent ==
nullptr)
565 if (
GetEditor()->GetEveElement() == element)
570 fScenes->DestroyElementRenderers(element);
587 if (element !=
nullptr)
627 model->IncDenyDestroy();
628 model->SetRnrChildren(
kFALSE);
655 model->IncDenyDestroy();
656 model->SetRnrChildren(
kFALSE);
718 if (re.
Match(filename) != 2) {
719 Error(
"SaveVizDB",
"filename does not match required format '(.+)\\.\\w+'.");
723 TString exp_filename(filename);
724 gSystem->ExpandPathName(exp_filename);
726 std::ofstream out(exp_filename, std::ios::out | std::ios::trunc);
727 out <<
"void " << re[1] <<
"()\n";
729 out <<
" TEveManager::Create();\n";
742 var_name.
Form(
"x%03d", var_id++);
765 TString exp_filename = filename;
766 gSystem->ExpandPathName(exp_filename);
767 printf(
"%s loading: '%s' -> '%s'.\n", eh.
Data(),
768 filename.
Data(), exp_filename.
Data());
779 Warning(eh,
"TGeoManager is locked ... unlocking it.");
783 throw(eh +
"TGeoManager::Import() failed for '" + exp_filename +
"'.");
789 gGeoManager->GetTopVolume()->VisibleDaughters(
true);
792 if (
gROOT->IsRootFile(exp_filename)) {
793 TFile f(exp_filename,
"READ");
796 if (collist !=
nullptr) {
799 while ((vol = (
TGeoVolume*) next()) !=
nullptr)
826 throw(eh +
"geometry alias '" + alias +
"' not registered.");
863 gROOT->ResetClassSaved();
893 if (
gROOT->IsBatch())
895 throw eh +
"ROOT is running in batch mode.";
901 throw eh +
"window system not initialized.";
941 Info(
"Handle",
"%s",
ex->Data());
942 gEve->SetStatusLine(
ex->Data());
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
externTApplication * gApplication
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
externTGeoManager * gGeoManager
externTGeoIdentity * gGeoIdentity
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
static void NeedGraphicsLibs()
Static method.
virtual Color_t GetLineColor() const
Return the line color.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
static Int_t GetColor(const char *hexcolor)
Specialization of TRootBrowser for Eve.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
void SaveVizParams(std::ostream &out, const TString &tag, const TString &var)
Save visualization parameters for this element with given tag.
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual TObject * GetEditorObject(const TEveException &eh) const
TEveElement * FirstChild() const
Returns the first child element or 0 if the list is empty.
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
Bool_t HasChildren() const
Short_t fImpliedHighlighted
!
virtual void PropagateVizParamsToProjecteds()
Propagate visualization parameters to dependent elements.
virtual void CollectSceneParents(List_t &scenes)
Collect all parents of class TEveScene.
std::list< TEveElement * > List_t
Short_t fImpliedSelected
!
virtual TGListTreeItem * AddIntoListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Add this element into ltree to an already existing item parent_lti.
void SetVizModel(TEveElement *model)
Set visualization-parameter model element.
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
virtual Bool_t HandleElementPaste(TEveElement *el)
React to element being pasted or dnd-ed.
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
virtual void ClearStamps()
virtual Bool_t RemoveFromListTree(TGListTree *ltree, TGListTreeItem *parent_lti)
Remove element from list-tree 'ltree' where its parent item is 'parent_lti'.
UChar_t GetChangeBits() const
Base class for event management and navigation.
Exception class thrown by TEve classes and macros.
Composite GUI frame for parallel display of a TGListTree and TEveGedEditor.
Specialization of TGedEditor for proper update propagation to TEveManager.
TEveElement * GetEveElement() const
Return eve-element if it is the model object.
static void ElementDeleted(TEveElement *el)
Element is being deleted. Close editors showing it.
void DisplayElement(TEveElement *re)
Show a TEveElement in editor.
static void DestroyEditors()
Destroys all editors. Called from EVE termination.
static void ElementChanged(TEveElement *el)
Element was changed. Update editors showing it.
Exception handler for Eve exceptions.
EStatus Handle(std::exception &exc) override
Handle exceptions deriving from TEveException.
Central application manager for Eve.
void AddElement(TEveElement *element, TEveElement *parent=nullptr)
Add an element.
TEveWindowManager * fWindowManager
void AddGlobalElement(TEveElement *element, TEveElement *parent=nullptr)
Add a global element, i.e.
void DoRedraw3D()
Perform 3D redraw of scenes and viewers whose contents has changed.
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
TGListTree * GetListTree() const
Get default list-tree widget.
TEveElementList * fOrphanage
TGeoManager * GetDefaultGeometry()
Get the default geometry.
void RegisterRedraw3D()
Register a request for 3D redraw.
TEveSelection * fSelection
static void Terminate()
Properly terminate global TEveManager.
void CloseEveWindow()
Close button has been clicked on EVE main window (browser).
void ClearROOTClassSaved()
Work-around uber ugly hack used in SavePrimitive and co.
void PreDeleteElement(TEveElement *element)
Called from TEveElement prior to its destruction so the framework components (like object editor) can...
TEveGListTreeEditorFrame * fLTEFrame
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.
TCanvas * AddCanvasTab(const char *name)
Add a new canvas tab.
TExceptionHandler * fExcHandler
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.
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.
TEveManager(const TEveManager &)
void RegisterGeometryAlias(const TString &alias, const TString &filename)
Register 'name' as an alias for geometry file 'filename'.
TEveSelection * fHighlight
TEveGedEditor * GetEditor() const
Returns main object editor.
void SaveVizDB(const TString &filename)
Save visualization-parameter database to file filename.
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.
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=nullptr)
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.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
TExMap * fStampedElements
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.
TGeoManager * GetGeometry(const TString &filename)
Get geometry with given filename.
TEveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
void ElementStamped(TEveElement *element)
Mark element as changed – it will be processed on next redraw.
TEveEventManager * fCurrentEvent
List of Scenes providing common operations on TEveScene collections.
Eve representation of TGLScene.
Make sure there is a SINGLE running TEveSelection for each selection type (select/highlight).
static void Macro(const char *mac)
Execute macro 'mac'. Do not reload the macro.
static void SetupGUI()
Setup icon pictures and mime-types.
static void SetupEnvironment()
Setup Include and Macro paths.
List of Viewers providing common operations on TEveViewer collections.
Eve representation of TGLViewer.
TGLViewer * GetGLViewer() const
Description of TEveWindowSlot.
static TEveWindowSlot * CreateWindowMainFrame(TEveWindow *eve_parent=nullptr)
Create a new main-frame and populate it with a default window-slot.
void ReplaceWindow(TEveWindow *w)
Replace this window with the passed one.
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=nullptr)
Create a new tab in a given tab-widget and populate it with a default window-slot.
Bool_t Next(ULong64_t &hash, Long64_t &key, Long64_t &value)
Get next entry from TExMap. Returns kFALSE at end of map.
This class stores a (key,value) pair using an external hash.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
<div class="legacybox"><h2>Legacy Code</h2> TFolder is a legacy interface: there will be no bug fixes...
virtual void ClearViewPort()
Clear view port and redraw full content.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
TGListTreeItem * GetParent() const
A list tree is a widget that can contain a number of items arranged in a tree structure.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
Defines top level windows that interact with the system Window Manager.
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Provides a StatusBar widget.
ROOT GUI Window base class.
An identity transformation.
The manager class for any TGeo geometry.
static void UnlockGeometry()
Unlock current geometry.
static Bool_t IsLocked()
Check lock state.
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
static void LockGeometry()
Lock current geometry so that no other geometry can be imported.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void SetLineColor(Color_t lcolor) override
Set the line color.
Class supporting a collection of lines with C++ code.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
TObject * At(Int_t idx) const override
Collectable string class.
Mother of all ROOT objects.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Wrapper for PCRE library (Perl Compatible Regular Expressions).
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...
Int_t Match(const TString &s, UInt_t start=0)
Runs a match on s against the regex 'this' was created with.
Class used by TMap to store (key,value) pairs.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.