Logo ROOT   6.07/09
Reference Guide
geom_alias.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve
3 /// Demonstates usage of geometry aliases - merge ALICE ITS with ATLAS MUON.
4 ///
5 /// \image html eve_geom_alias.png
6 /// \macro_code
7 ///
8 /// \author Matevz Tadel
9 
10 void geom_alias()
11 {
13 
14  gEve->RegisterGeometryAlias("ALICE", "http://root.cern.ch/files/alice.root");
15  gEve->RegisterGeometryAlias("ATLAS", "http://root.cern.ch/files/atlas.root");
16 
17 
19 
20  TGeoNode* node1 = gGeoManager->GetTopVolume()->FindNode("ITSV_1");
21  TEveGeoTopNode* its = new TEveGeoTopNode(gGeoManager, node1);
22  gEve->AddGlobalElement(its);
23 
24 
26 
27  TGeoNode* node2 = gGeoManager->GetTopVolume()->FindNode("OUTE_1");
28  TEveGeoTopNode* atlas = new TEveGeoTopNode(gGeoManager, node2);
29  gEve->AddGlobalElement(atlas);
30 
31 
33 
34  // EClipType not exported to CINT (see TGLUtil.h):
35  // 0 - no clip, 1 - clip plane, 2 - clip box
38  v->RefreshPadEditor(v);
39 
40  v->CurrentCamera().RotateRad(-0.5, -2.4);
41  v->DoDraw();
42 }
void SetClipType(TGLClip::EType type)
Set current clip active in viewer - 'type' is one of kClipNone kClipPlane or kClipBox.
Definition: TGLClip.cxx:580
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
void DoDraw(Bool_t swap_buffers=kTRUE)
Draw out the viewer.
Definition: TGLViewer.cxx:546
void RegisterGeometryAlias(const TString &alias, const TString &filename)
Register 'name' as an alias for geometry file 'filename'.
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
Definition: TGLCamera.cxx:927
TGeoManager * GetGeometryByAlias(const TString &alias)
Get geometry with given alias.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:497
TGLClipSet * GetClipSet() const
Definition: TGLViewer.h:262
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement...
Definition: TEveGeoNode.h:92
SVector< double, 2 > v
Definition: Dict.h:5
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
TGLCamera & CurrentCamera() const
Definition: TGLViewer.h:267
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:53
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:554
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
virtual void RefreshPadEditor(TObject *obj=0)
Update GED editor if it is set.
Definition: TGLViewer.cxx:2255
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:51
const Bool_t kTRUE
Definition: Rtypes.h:91
TGeoNode * FindNode(const char *name) const
search a daughter inside the list of nodes