]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/pmd_hits.C
doxy: code cleanup: comments and clarifications
[u/mrichter/AliRoot.git] / EVE / alice-macros / pmd_hits.C
index c1580a04e0a160383262cf2c0789c729b5f525e7..558123dc1f1bbea3c6f8fac732724252f33289d6 100644 (file)
@@ -4,9 +4,21 @@
 /**************************************************************************
  * 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.                                                 *
  **************************************************************************/
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TTree.h>
+#include <TStyle.h>
+#include <TString.h>
+#include <TEveManager.h>
+#include <TEvePointSet.h>
+#include <TEveTrans.h>
+
+#include <AliRunLoader.h>
+#include <AliEveEventManager.h>
+#endif
+
 TEvePointSet*
 pmd_hits(const char *varexp    = "fX:fY:fZ",
         const char *selection = "")
@@ -15,23 +27,19 @@ pmd_hits(const char *varexp    = "fX:fY:fZ",
   rl->LoadHits("PMD");
 
   TTree* ht = rl->GetTreeH("PMD", 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("PMD Hits '%s'", selection));
-  char form[1000];
-  sprintf(form,"PMD Hits '%s'", selection);
-  TEvePointSet* points = new TEvePointSet(form);
+
+  TEvePointSet* points = new TEvePointSet(Form("PMD Hits '%s'", selection));
 
   TEvePointSelector ps(ht, points, varexp, selection);
   ps.Select();
 
-  //PH  points->SetTitle(Form("N=%d", points->Size()));
-  sprintf(form,"N=%d", points->Size());
-  points->SetTitle(form);
+  points->SetName(Form("PMD Hits"));
+  const TString viz_tag("SIM Hits PMD");
+  points->ApplyVizTag(viz_tag, "Hits");
+
+  points->SetTitle(Form("N=%d", points->Size()));
   points->SetMarkerSize(.5);
-  points->SetMarkerColor((Color_t)2);
+  points->SetMarkerColor(2);
 
   gEve->AddElement(points);
   gEve->Redraw3D();