]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/trd_hits.C
CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / EVE / alice-macros / trd_hits.C
index 8ad853b9d862096d835c04e834cd84d5ac3785f4..9150ed8cc3657f0967c51f7dab16d2f9b1d0a92c 100644 (file)
@@ -6,6 +6,17 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TString.h>
+#include <TTree.h>
+#include <TEvePointSet.h>
+#include <TEveElement.h>
+#include <TEveManager.h>
+#include <TEveTreeTools.h>
+
+#include <AliRunLoader.h>
+#include <AliEveEventManager.h>
+#endif
 
 TEvePointSet*
 trd_hits(const char *varexp    = "fX:fY:fZ",
@@ -17,28 +28,24 @@ trd_hits(const char *varexp    = "fX:fY:fZ",
 
   TTree* ht = rl->GetTreeH("TRD", 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("TRD Hits '%s'", selection));
-  char form[1000];
-  sprintf(form,"TRD Hits '%s'", selection);
-  TEvePointSet* points = new TEvePointSet(form);
+  TEvePointSet* points = new TEvePointSet(Form("TRD Hits '%s'", selection));
 
   TEvePointSelector ps(ht, points, varexp, selection);
   ps.Select();
 
   if (points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
-    Warning("trd_hits", Form("No hits match '%s'", selection));
+    Warning("trd_hits", "No hits match '%s'", selection);
     delete points;
     return 0;
   }
 
-  //PH  points->SetTitle(Form("N=%d", points->Size()));
-  sprintf(form,"N=%d", points->Size());
-  points->SetTitle(form);
+  points->SetName(Form("TRD Hits"));
+  const TString viz_tag("SIM Hits TRD");
+  points->ApplyVizTag(viz_tag, "Hits");
+
+  points->SetTitle(Form("N=%d", points->Size()));
   points->SetMarkerSize(.5);
-  points->SetMarkerColor((Color_t)7);
+  points->SetMarkerColor(7);
 
   gEve->AddElement(points, cont);
   gEve->Redraw3D();