]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/hits_from_label.C
doxy: code cleanup: comments and clarifications
[u/mrichter/AliRoot.git] / EVE / alice-macros / hits_from_label.C
index 9f71b4bd4f9174e5d3f887da8d483cca3eab86dc..2dea7422e1deb860f440fb93c3a0c20aca3e44a7 100644 (file)
@@ -1,24 +1,54 @@
 // $Id$
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
 
-void hits_from_label(Int_t label=0)
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TEveUtil.h>
+#include <TEvePointSet.h>
+#include <TEveElement.h>
+#include <TEveManager.h>
+
+#include "its_hits.C"
+#include "tof_hits.C"
+#include "tpc_hits.C"
+#include "trd_hits.C"
+#endif
+
+void hits_from_label(Int_t label=0, TEveElement* cont=0)
 {
-  Reve::PointSet* h;
-  Reve::LoadMacro("its_hits.C");
+  TEveUtil::LoadMacro("its_hits.C");
+
+  TEvePointSet* h = 0;
   //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  h = its_hits("fX:fY:fZ", Form("ITS.fTrack==%d", label));
   char form[1000];
   sprintf(form,"ITS.fTrack==%d", label);
-  h = its_hits("fX:fY:fZ", form);
-  h->SetMarkerSize(1);
+  h = its_hits("fX:fY:fZ", form, cont);
+  if (h) h->SetMarkerSize(1);
 
-  Reve::LoadMacro("tpc_hits.C");
+  TEveUtil::LoadMacro("tpc_hits.C");
   sprintf(form,"TPC2.fArray.fTrackID==%d", label);
-  h = tpc_hits("TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",form);
+  h = tpc_hits("TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",form, cont);
   //PH  h = tpc_hits("TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",
   //PH        Form("TPC2.fArray.fTrackID==%d", label));
-  h->SetMarkerSize(1);
+  if (h) h->SetMarkerSize(1);
+
+  TEveUtil::LoadMacro("trd_hits.C");
+  sprintf(form,"TRD.fTrack==%d", label);
+  h = trd_hits("fX:fY:fZ", form, cont);
+  if (h) h->SetMarkerSize(1);
+
+  TEveUtil::LoadMacro("tof_hits.C");
+  sprintf(form,"TOF.fTrack==%d", label);
+  h = tof_hits("fX:fY:fZ", form, cont);
+  if (h) h->SetMarkerSize(1);
 
-  gReve->Redraw3D();
+  gEve->Redraw3D();
 }