]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/its_hits.C
AliHLTTPCCAGlobalMergerComponent added to compilation
[u/mrichter/AliRoot.git] / EVE / alice-macros / its_hits.C
index 3bdf33bb5aff4be90ac159a438e2f7da22a3242c..a3c6cecd3875a0e1f6e3d15fd673e2d350ba784b 100644 (file)
@@ -1,27 +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*
 its_hits(const char *varexp    = "fX:fY:fZ",
-        const char *selection = "")
+        const char *selection = "",
+         TEveElement* cont = 0)
 {
-  AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
+  AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
   rl->LoadHits("ITS");
 
   TTree* ht = rl->GetTreeH("ITS", 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("ITS Hits '%s'", selection));
+  //PH  TEvePointSet* points = new TEvePointSet(Form("ITS Hits '%s'", selection));
   char form[1000];
   sprintf(form,"ITS Hits '%s'", selection);
-  Reve::PointSet* points = new Reve::PointSet(form);
+  TEvePointSet* points = new TEvePointSet(form);
 
-  TPointSelector ps(ht, points, varexp, selection);
+  TEvePointSelector ps(ht, points, varexp, selection);
+  // ps.SetSubIdExp("fTrack:fStatus");
   ps.Select();
 
-  if( points->Size() == 0) {
-    Warning("its_hits", Form("No hits match %s %s", varexp, selection));
+  if(points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
+    Warning("its_hits", Form("No hits match '%s'", selection));
     delete points;
     return 0;
   }
@@ -30,10 +39,10 @@ its_hits(const char *varexp    = "fX:fY:fZ",
   sprintf(form,"N=%d", points->Size());
   points->SetTitle(form);
   points->SetMarkerSize(.5);
-  points->SetMarkerColor((Color_t)2);
+  points->SetMarkerColor(2);
 
-  gReve->AddRenderElement(points);
-  gReve->Redraw3D();
+  gEve->AddElement(points, cont);
+  gEve->Redraw3D();
 
   return points;
 }