* 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)
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);
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);
+ clusters->SetName("TOF Clusters");
+ clusters->SetTitle(Form("N=%d", clusters->Size()));
- char tip[1000];
- sprintf(tip,"N=%d", clusters->Size());
- clusters->SetTitle(tip);
-
- const TString viz_tag("TOF Clusters");
- if (gEve->FindVizDBEntry(viz_tag) == 0)
- {
- TEvePointSet* m = new TEvePointSet();
- m->SetMarkerColor(4);
- m->SetMarkerSize(0.2);
- m->SetMarkerStyle(2);
- gEve->InsertVizDBEntry(viz_tag, m);
- }
- clusters->ApplyVizTag(viz_tag);
+ const TString viz_tag("REC Clusters TOF");
+ clusters->ApplyVizTag(viz_tag, "Clusters");
gEve->AddElement(clusters, cont);
-
gEve->Redraw3D();
return clusters;
}
}
+ 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");
- if (gEve->FindVizDBEntry(viz_tag) == 0)
- {
- TEvePointSet* m = new TEvePointSet();
- m->SetMarkerColor(4);
- m->SetMarkerSize(0.2);
- m->SetMarkerStyle(2);
- gEve->InsertVizDBEntry(viz_tag, m);
- }
- // The above can be removed when going to new root - then 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;