From ae8fef5fb4a7f2531ea94c4d8ccc9f45b231ec8b Mon Sep 17 00:00:00 2001 From: mtadel Date: Tue, 5 May 2009 15:16:44 +0000 Subject: [PATCH] From Ivana: generalize geom_gentle_muon.C macro thus removing the need for additional one. --- EVE/alice-macros/geom_gentle_muon.C | 7 ++++- EVE/alice-macros/geom_gentle_muon_draw.C | 34 ------------------------ EVE/macros/visscan_init.C | 2 +- 3 files changed, 7 insertions(+), 36 deletions(-) delete mode 100644 EVE/alice-macros/geom_gentle_muon_draw.C diff --git a/EVE/alice-macros/geom_gentle_muon.C b/EVE/alice-macros/geom_gentle_muon.C index a8458a0f83a..ade9b8add5b 100644 --- a/EVE/alice-macros/geom_gentle_muon.C +++ b/EVE/alice-macros/geom_gentle_muon.C @@ -13,7 +13,7 @@ void DrawDeep(TEveGeoShape *gsre) { } -TEveGeoShape* geom_gentle_muon() { +TEveGeoShape* geom_gentle_muon(Bool_t updateScene = kTRUE) { TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_muon.root"); TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle MUON"); @@ -25,6 +25,11 @@ TEveGeoShape* geom_gentle_muon() { DrawDeep(gsre); + if ( updateScene ) { + TGLViewer* v = gEve->GetDefaultGLViewer(); + v->UpdateScene(); + } + return gsre; } diff --git a/EVE/alice-macros/geom_gentle_muon_draw.C b/EVE/alice-macros/geom_gentle_muon_draw.C deleted file mode 100644 index 59e58275561..00000000000 --- a/EVE/alice-macros/geom_gentle_muon_draw.C +++ /dev/null @@ -1,34 +0,0 @@ -void DrawDeep(TEveGeoShape *gsre) { - - for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) { - TEveGeoShape* lvl = (TEveGeoShape*) *i; - lvl->SetRnrSelf(kFALSE); - if (!lvl->HasChildren()) { - lvl->SetRnrSelf(kTRUE); - lvl->SetMainColor(3); - lvl->SetMainTransparency(50); - } - DrawDeep(lvl); - } - -} - -TEveGeoShape* geom_gentle_muon_draw() { - - TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_muon.root"); - TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle MUON"); - TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse); - gEve->AddGlobalElement(gsre); - f.Close(); - - gsre->SetRnrSelf(kFALSE); - - DrawDeep(gsre); - - TGLViewer* v = gEve->GetDefaultGLViewer(); - v->UpdateScene(); - - return gsre; - -} - diff --git a/EVE/macros/visscan_init.C b/EVE/macros/visscan_init.C index e94e3dc44f6..0345e85e08c 100644 --- a/EVE/macros/visscan_init.C +++ b/EVE/macros/visscan_init.C @@ -73,7 +73,7 @@ void visscan_init(Bool_t show_extra_geo=kFALSE) } if (gShowMUON) { TEveUtil::LoadMacro("geom_gentle_muon.C"); - gGeomGentleMUON = geom_gentle_muon(); + gGeomGentleMUON = geom_gentle_muon(kFALSE); } // Scenes -- 2.43.0