]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/vzero_hits.C
From Pawel Debski: more modes for VizDB.
[u/mrichter/AliRoot.git] / EVE / alice-macros / vzero_hits.C
index 6704df335f94a81069076f5fcdc618096eb65119..aaa0f1a6ac86c81a06d0aba21a41dabcc5ffa1c2 100644 (file)
@@ -1,33 +1,36 @@
 // $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
 
-Reve::PointSet*
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+TEvePointSet*
 vzero_hits(const char *varexp    = "fX:fY:fZ",
           const char *selection = "")
 {
-  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
   rl->LoadHits("VZERO");
 
   TTree* ht = rl->GetTreeH("VZERO", 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  Reve::PointSet* points = new Reve::PointSet(Form("VZERO Hits '%s'", selection));
-  char form[1000];
-  sprintf(form,"VZERO Hits '%s'", selection);
-  Reve::PointSet* points = new Reve::PointSet(form);
-
-  TPointSelector ps(ht, points, varexp, selection);
+
+  TEvePointSet* points = new TEvePointSet(Form("SIM Hits VZERO '%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("VZERO Hits"));
+  const TString viz_tag("SIM Hits VZERO");
+  points->ApplyVizTag(viz_tag, "Hits");
+
+  points->SetTitle(Form("N=%d", points->Size()));
   points->SetMarkerSize(.5);
-  points->SetMarkerColor((Color_t)2);
+  points->SetMarkerColor(2);
 
-  gReve->AddRenderElement(points);
-  gReve->Redraw3D();
+  gEve->AddElement(points);
+  gEve->Redraw3D();
 
   return points;
 }