]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/emcal_hits.C
From Pawel Debski: more modes for VizDB.
[u/mrichter/AliRoot.git] / EVE / alice-macros / emcal_hits.C
index 56518af5144698ed08e5182bba06479bff064c53..4d47af0707b89c0c4e2901bca27790a3abc82236 100644 (file)
@@ -4,7 +4,7 @@
 /**************************************************************************
  * 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*
@@ -16,14 +16,8 @@ emcal_hits(const char *varexp    = "fX:fY:fZ",
   rl->LoadHits("EMCAL");
 
   TTree* ht = rl->GetTreeH("EMCAL", 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("EMCAL Hits '%s'", selection));
-  char form[1000];
-  sprintf(form,"EMCAL Hits '%s'", selection);
-  TEvePointSet* points = new TEvePointSet(form);
+
+  TEvePointSet* points = new TEvePointSet(Form("EMCAL Hits '%s'", selection));
 
   TEvePointSelector ps(ht, points, varexp, selection);
   ps.Select();
@@ -34,11 +28,13 @@ emcal_hits(const char *varexp    = "fX:fY:fZ",
     return 0;
   }
 
-  //PH  points->SetTitle(Form("N=%d", points->Size()));
-  sprintf(form,"N=%d", points->Size());
-  points->SetTitle(form);
+  points->SetName(Form("EMCAL Hits"));
+  const TString viz_tag("SIM Hits EMCAL");
+  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, cont);
   gEve->Redraw3D();