]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
From Ivana: generalize geom_gentle_muon.C macro thus removing the need for additional...
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 May 2009 15:16:44 +0000 (15:16 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 May 2009 15:16:44 +0000 (15:16 +0000)
EVE/alice-macros/geom_gentle_muon.C
EVE/alice-macros/geom_gentle_muon_draw.C [deleted file]
EVE/macros/visscan_init.C

index a8458a0f83a411e4a9ec6b8828689861e7bebfc5..ade9b8add5b8f119263b9097a968c038f58c98a6 100644 (file)
@@ -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 (file)
index 59e5827..0000000
+++ /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;
-
-}
-
index e94e3dc44f6bf319899cc57c833854836f05384f..0345e85e08c5a7b14d7c077e8df8603114bdcec0 100644 (file)
@@ -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