I am working on a simple event display based on Eve.
I would like to display the full geometry (without transparency and other tweaks otherwise useful for the event display part) in a separate tab. I therefore do the following:
slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
TEveViewer *v = new TEveViewer("Geometry");
slot->ReplaceWindow(v);
TGLSAViewer* geometryViewer = v->SpawnGLViewer((TGedEditor*)gEve->GetEditor());
On the other hand, I have a class producing a TGeoVolume representing my detector. If I do
it properly draws the object in a new GLViewer. The question is: how can I draw it in my existing geometryViewer instead?
To get TGeo into Eve scenes you need to to use TEveGeoTopNode class. See for example tutorials/eve/geom_cms.C.
If you want to have several views it in general makes sense to also create several scenes. Think of a scene as a high level container that can be added to several views. See alice_vsd.C for an example … it uses MultiView.C code for managing several views.
Thanks.
I know that indeed, and this is what I do in the code so far.
My intention here is a bit different: while the geometry displayed in the multiview-inspired tab is simplified (transparency, no 3D calo towers, etc.), I would like to have another tab with the full-fledged geometry. My intention is not to overlay any event to that… just to show a nice 3D picture unrelated with the other event-display aspects of the application.
Yes, the geom_cms example was very useful to start. The code that presently displays my geometry started from there. But I don’t htink that I can use the same mechanism to register two different versions of the geometry and show it differently in different scene.
Or then there is a mechanism to show different level of hierarchy in different scenes, as well as a mechanism to disable the transparency in a given scene?
The other thing that I tried is to adopt the GLViewer by calling
with
for the first argument. But I don’t know what to pass for the frame.
Anyway, in terms of functionality, my present version is ok. So if there is no easy way I will continue as I do presently (that’s for the next Delphes release, coming soon). It would just be nicer to have the more detailed geometry in a tab instead of a separate window.
You can have the same geometry drawn from different roots with different depts and daughter flags but there is no control for transparency (I think … unless it was added to tgeo). uaf-2.t2.ucsd.edu/~matevz/tmp/geom_cms_two.C
TEveGeoTop node is in fact just a wrapper over what Draw() and TGeoPainter would do … but it sets the top volume and TGeoPainter parameters before firing it off.
Other than MultiView.C see also window_manager.C for how to setup different eve window configurations. Eve window manager supports also undocking/redocking of windows, see the top three menu entries under “Actions” menu in an eve window. Current window is the one with bluish title bar.