Logo ROOT   6.18/05
Reference Guide
geom_atlas.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve
3/// Shows ATLAS geometry.
4///
5/// \image html eve_geom_atlas.png
6/// \macro_code
7///
8/// \author Matevz Tadel
9
10void geom_atlas()
11{
13
15 gGeoManager = gEve->GetGeometry("http://root.cern.ch/files/atlas.root");
17
18 auto node1 = gGeoManager->GetTopVolume()->FindNode("INNE_1");
19 TEveGeoTopNode* inn = new TEveGeoTopNode(gGeoManager, node1);
21
22 auto node2 = gGeoManager->GetTopVolume()->FindNode("CENT_1");
25
26 auto node3 = gGeoManager->GetTopVolume()->FindNode("OUTE_1");
27 TEveGeoTopNode* out = new TEveGeoTopNode(gGeoManager, node3);
29
31
32 // EClipType not exported to CINT (see TGLUtil.h):
33 // 0 - no clip, 1 - clip plane, 2 - clip box
34 auto v = gEve->GetDefaultGLViewer();
35 v->GetClipSet()->SetClipType(TGLClip::EType(1));
36 v->RefreshPadEditor(v);
37
38 v->CurrentCamera().RotateRad(-.7, 0.5);
39 v->DoDraw();
40}
SVector< double, 2 > v
Definition: Dict.h:5
const Bool_t kTRUE
Definition: RtypesCore.h:87
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:601
A wrapper over a TGeoNode, possibly displaced with a global trasformation stored in TEveElement.
Definition: TEveGeoNode.h:93
void AddGlobalElement(TEveElement *element, TEveElement *parent=0)
Add a global element, i.e.
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
void FullRedraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Perform 3D redraw of all scenes and viewers.
TGeoManager * GetGeometry(const TString &filename)
Get geometry with given filename.
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Definition: TFile.h:316
void DefaultColors()
Set default volume colors according to A of material.
TGeoVolume * GetTopVolume() const
Definition: TGeoManager.h:531
TGeoNode * FindNode(const char *name) const
search a daughter inside the list of nodes
const char * cnt
Definition: TXMLSetup.cxx:74