]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/alice-macros/tof_clusters.C
CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_clusters.C
index 0f665371ed2dad55f95508feeabba0e3753a568b..1df955847b2b182c798408ebc2147d3c8278c9a7 100644 (file)
@@ -5,20 +5,21 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
-#ifdef __CINT__
-
-class TEveElement;
-class TEvePointSet;
-
-#else
 
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TObjArray.h>
+#include <TMath.h>
+#include <TTree.h>
+#include <TString.h>
 #include <TEveManager.h>
 #include <TEvePointSet.h>
-#include <EveBase/AliEveEventManager.h>
 
-#include <AliRunLoader.h>
 #include <AliCluster.h>
-
+#include <AliRunLoader.h>
+#include <AliEveEventManager.h>
+#else
+class TEveElement;
+class TEvePointSet;
 #endif
 
 TEvePointSet* tof_clusters(TEveElement* cont=0, Float_t maxR=390)
@@ -41,11 +42,13 @@ TEvePointSet* tof_clusters(TEveElement* cont=0, Float_t maxR=390)
   Float_t maxRsqr = maxR*maxR;
 
   Int_t nentr=(Int_t)cTree->GetEntries();
-  for (Int_t i=0; i<nentr; i++) {
+  for (Int_t i=0; i<nentr; i++)
+  {
     if (!cTree->GetEvent(i)) continue;
 
     Int_t ncl=cl->GetEntriesFast();
-    while (ncl--) {
+    while (ncl--)
+    {
       AliCluster *c=(AliCluster*)cl->UncheckedAt(ncl);
       Float_t g[3]; //global coordinates
       c->GetGlobalXYZ(g);
@@ -55,29 +58,25 @@ TEvePointSet* tof_clusters(TEveElement* cont=0, Float_t maxR=390)
        AliCluster *atp = new AliCluster(*c);
        clusters->SetPointId(atp);
       }
-
     }
   }
 
-  if (clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
+  rl->UnloadRecPoints("TOF");
+
+  if (clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE)
+  {
     Warning("tof_clusters.C", "No TOF clusters");
     delete clusters;
     return 0;
   }
 
-  char form[1000];
-  sprintf(form,"TOF Clusters");
-  clusters->SetName(form);
-
-  char tip[1000];
-  sprintf(tip,"N=%d", clusters->Size());
-  clusters->SetTitle(tip);
+  clusters->SetName("TOF Clusters");
+  clusters->SetTitle(Form("N=%d", clusters->Size()));
 
-  const TString viz_tag("TOF Clusters");
+  const TString viz_tag("REC Clusters TOF");
   clusters->ApplyVizTag(viz_tag, "Clusters");
 
   gEve->AddElement(clusters, cont);
-
   gEve->Redraw3D();
 
   return clusters;
@@ -132,27 +131,21 @@ TEvePointSet* tof_clusters_sec(Int_t selectedSector,
     }
   }
 
+  rl->UnloadRecPoints("TOF");
+
   if (clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
     Warning("tof_clusters.C", "No TOF clusters");
     delete clusters;
     return 0;
   }
 
-  char form[1000];
-  sprintf(form,"TOF Clusters");
-  clusters->SetName(form);
-
-  char tip[1000];
-  sprintf(tip,"N=%d", clusters->Size());
-  clusters->SetTitle(tip);
-
-  const TString viz_tag("TOF Clusters");
-  // when going to new root call:
-  // clusters->ApplyVizTag(viz_tag, "Clusters");
-  clusters->ApplyVizTag(viz_tag);
+  clusters->SetName(Form("REC Clusters TOF"));
+  clusters->SetTitle(Form("N=%d", clusters->Size()));
 
+  const TString viz_tag("REC Clusters TOF");
+  clusters->ApplyVizTag(viz_tag, "Clusters");
+  
   gEve->AddElement(clusters, cont);
-
   gEve->Redraw3D();
 
   return clusters;