]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/trd_hits.C
Missing initialization; fiddle with the track marker-style a bit more.
[u/mrichter/AliRoot.git] / EVE / alice-macros / trd_hits.C
index 97460e101f61c313102c013630fd64d0ff2a797c..dd206649daf93060be1e3a35fbc3d98c39f4a67f 100644 (file)
@@ -2,7 +2,8 @@
 
 Reve::PointSet*
 trd_hits(const char *varexp    = "fX:fY:fZ",
-        const char *selection = "")
+        const char *selection = "",
+        RenderElement* cont = 0)
 {
   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
   rl->LoadHits("TRD");
@@ -20,8 +21,8 @@ trd_hits(const char *varexp    = "fX:fY:fZ",
   TPointSelector ps(ht, points, varexp, selection);
   ps.Select();
 
-  if (points->Size() == 0) {
-    Warning("trd_hits", Form("No hits match %s %s", varexp, selection));
+  if (points->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) {
+    Warning("trd_hits", Form("No hits match '%s'", selection));
     delete points;
     return 0;
   }
@@ -32,7 +33,11 @@ trd_hits(const char *varexp    = "fX:fY:fZ",
   points->SetMarkerSize(.5);
   points->SetMarkerColor((Color_t)7);
 
-  gReve->AddRenderElement(points);
+  if(cont)
+    gReve->AddRenderElement(cont, points);
+  else 
+    gReve->AddRenderElement(points);
+
   gReve->Redraw3D();
 
   return points;