]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/tpc_hits.C
Use TList::Delete, change some output
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_hits.C
index af74117d0d94d3ec918d0aede3cbf50035537962..45ed108c0468b9a3c03eac97f75745537c89e01c 100644 (file)
@@ -4,13 +4,13 @@
 /**************************************************************************
  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
- * full copyright notice.                                                 * 
+ * full copyright notice.                                                 *
  **************************************************************************/
 
 TEvePointSet*
-tpc_hits(const char *varexp    = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",
-        const char *selection = "TPC2.fArray.fR>80",
-         TEveElement* cont = 0)
+tpc_hits(const char  *varexp    = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",
+        const char  *selection = "TPC2.fArray.fR>80",
+         TEveElement *cont      = 0)
 {
   // Extracts 'major' TPC hits (not the compressed ones).
   // This gives ~2.5% of all hits.
@@ -20,13 +20,7 @@ tpc_hits(const char *varexp    = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ"
 
   TTree* ht = rl->GetTreeH("TPC", false);
 
-  //PH The line below is replaced waiting for a fix in Root
-  //PH which permits to use variable siza arguments in CINT
-  //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
-  //PH  TEvePointSet* points = new TEvePointSet(Form("TPC Hits '%s'", selection));
-  char form[1000];
-  sprintf(form,"TPC Hits '%s'", selection);
-  TEvePointSet* points = new TEvePointSet(form);
+  TEvePointSet* points = new TEvePointSet(Form("TPC Hits '%s'", selection));
   points->SetSourceCS(TEvePointSelectorConsumer::kTVT_RPhiZ);
 
   TEvePointSelector ps(ht, points, varexp, selection);
@@ -37,12 +31,16 @@ tpc_hits(const char *varexp    = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ"
     delete points;
     return 0;
   }
+  
+  points->SetName(Form("TPC Hits"));
+  const TString viz_tag("SIM Hits TPC");
+  points->ApplyVizTag(viz_tag, "Hits");
 
-  //PH  points->SetTitle(Form("N=%d", points->Size()));
-  sprintf(form,"N=%d", points->Size());
-  points->SetTitle(form);
+  points->SetTitle(Form("N=%d", points->Size()));
   points->SetMarkerSize(.5);
-  points->SetMarkerColor((Color_t)3);
+  points->SetMarkerColor(3);
+
+
 
   gEve->AddElement(points, cont);
   gEve->Redraw3D();