]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/tpc_clusters.C
Adding more information to the debug output
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_clusters.C
index 8f90458f54f5fe322e67a15e3a1b7c832a1023f2..cc486b2992314c2f490d187b14c2ff05d7aa15b0 100644 (file)
@@ -72,17 +72,15 @@ TEvePointSet* tpc_clusters(TEveElement* cont=0, Float_t maxR=270)
 
   delete clrow;
 
+  rl->UnloadRecPoints("TPC");
+
   if (clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE)
   {
-    Warning("tpc_clusters", "No TPC clusters");
+    Warning("tpc_clusters.C", "No TPC clusters");
     delete clusters;
     return 0;
   }
 
-  clusters->SetMarkerStyle(2);
-  clusters->SetMarkerSize(0.2);
-  clusters->SetMarkerColor(4);
-
   char form[1000];
   sprintf(form,"TPC Clusters");
   clusters->SetName(form);
@@ -90,7 +88,22 @@ TEvePointSet* tpc_clusters(TEveElement* cont=0, Float_t maxR=270)
   char tip[1000];
   sprintf(tip,"N=%d", clusters->Size());
   clusters->SetTitle(tip);
+
+  const TString viz_tag("TPC Clusters");
+  if (gEve->FindVizDBEntry(viz_tag) == 0)
+  {
+    TEvePointSet* m = new TEvePointSet();
+    m->SetMarkerColor(4);
+    m->SetMarkerSize(0.2);
+    m->SetMarkerStyle(2);
+    gEve->InsertVizDBEntry(viz_tag, m);
+  }
+  // The above can be removed when going to new root - then call:
+  // clusters->ApplyVizTag(viz_tag, "Clusters");
+  clusters->ApplyVizTag(viz_tag);
+
   gEve->AddElement(clusters, cont);
+
   gEve->Redraw3D();
 
   return clusters;