]>
Commit | Line | Data |
---|---|---|
25b4bdb2 | 1 | // $Id$ |
2 | ||
3 | /************************************************************************** | |
4 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
5 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
6 | * full copyright notice. * | |
7 | **************************************************************************/ | |
ba978640 | 8 | #if !defined(__CINT__) || defined(__MAKECINT__) |
9 | #include <TFile.h> | |
10 | #include <TGLViewer.h> | |
11 | #include <TEveManager.h> | |
12 | #include <TEveElement.h> | |
13 | #include <TEveGeoShape.h> | |
14 | #include <TEveGeoShapeExtract.h> | |
15 | #endif | |
25b4bdb2 | 16 | |
17 | /// \ingroup evemacros | |
18 | /// \file geom_gentle_muon.C | |
19 | /// | |
20 | /// \author B. Vulpescu, LPC; M. Tadel, CERN | |
21 | ||
20dae051 | 22 | void DrawDeep(TEveGeoShape *gsre) { |
23 | ||
24 | for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) { | |
25 | TEveGeoShape* lvl = (TEveGeoShape*) *i; | |
26 | lvl->SetRnrSelf(kFALSE); | |
27 | if (!lvl->HasChildren()) { | |
28 | lvl->SetRnrSelf(kTRUE); | |
29 | lvl->SetMainColor(3); | |
8e38a8f1 | 30 | lvl->SetMainTransparency(80); |
20dae051 | 31 | } |
32 | DrawDeep(lvl); | |
33 | } | |
34 | ||
35 | } | |
36 | ||
ae8fef5f | 37 | TEveGeoShape* geom_gentle_muon(Bool_t updateScene = kTRUE) { |
20dae051 | 38 | |
39 | TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_muon.root"); | |
40 | TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle MUON"); | |
41 | TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); | |
42 | gEve->AddGlobalElement(gsre); | |
43 | f.Close(); | |
44 | ||
45 | gsre->SetRnrSelf(kFALSE); | |
46 | ||
47 | DrawDeep(gsre); | |
48 | ||
ae8fef5f | 49 | if ( updateScene ) { |
50 | TGLViewer* v = gEve->GetDefaultGLViewer(); | |
51 | v->UpdateScene(); | |
52 | } | |
53 | ||
20dae051 | 54 | return gsre; |
55 | ||
56 | } | |
57 |