Logo ROOT   6.12/07
Reference Guide
geom_default.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve
3 /// Demonstrates usage of "Default" geometry alias.
4 ///
5 /// \image html eve_geom_default.png
6 /// \macro_code
7 ///
8 /// \author Matevz Tadel
9 
10 void geom_default()
11 {
13 
14  gEve->RegisterGeometryAlias("Default", "http://root.cern.ch/files/alice.root");
15 
17 
18  TGeoNode* node1 = gGeoManager->GetTopVolume()->FindNode("ITSV_1");
19  TEveGeoTopNode* its = new TEveGeoTopNode(gGeoManager, node1);
20  gEve->AddGlobalElement(its);
21 
22  TGeoNode* node2 = gGeoManager->GetTopVolume()->FindNode("TPC_M_1");
23  TEveGeoTopNode* tpc = new TEveGeoTopNode(gGeoManager, node2);
24  gEve->AddGlobalElement(tpc);
25 
27 }
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
void RegisterGeometryAlias(const TString &alias, const TString &filename)
Register 'name' as an alias for geometry file 'filename'.
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Definition: TEveManager.h:168
TGeoManager * GetDefaultGeometry()
Get the default geometry.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement...
Definition: TEveGeoNode.h:92
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:559
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition: TGeoNode.h:39
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:500
const Bool_t kTRUE
Definition: RtypesCore.h:87
TGeoNode * FindNode(const char *name) const
search a daughter inside the list of nodes