]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/tof_hits.C
Remove EVE/Reve/ sub-module.
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_hits.C
CommitLineData
28a2acb4 1// $Id$
2
84aff7a4 3TEvePointSet*
28a2acb4 4tof_hits(const char *varexp = "fX:fY:fZ",
2caed564 5 const char *selection = "",
84aff7a4 6 TEveElement* cont)
28a2acb4 7{
8 AliRunLoader* rl = Alieve::Event::AssertRunLoader();
9 rl->LoadHits("TOF");
10
11 TTree* ht = rl->GetTreeH("TOF", false);
12
13 //PH The line below is replaced waiting for a fix in Root
14 //PH which permits to use variable siza arguments in CINT
15 //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
84aff7a4 16 //PH TEvePointSet* points = new TEvePointSet(Form("TOF Hits '%s'", selection));
28a2acb4 17 char form[1000];
18 sprintf(form,"TOF Hits '%s'", selection);
84aff7a4 19 TEvePointSet* points = new TEvePointSet(form);
28a2acb4 20
84aff7a4 21 TEvePointSelector ps(ht, points, varexp, selection);
28a2acb4 22 ps.Select();
23
84aff7a4 24 if( points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
28a2acb4 25 Warning("tof_hits", Form("No hits match '%s'", selection));
26 delete points;
27 return 0;
28 }
29
30 //PH points->SetTitle(Form("N=%d", points->Size()));
31 sprintf(form,"N=%d", points->Size());
32 points->SetTitle(form);
33 points->SetMarkerSize(.5);
34 points->SetMarkerColor((Color_t)2);
35
84aff7a4 36 gEve->AddElement(points, cont);
37 gEve->Redraw3D();
28a2acb4 38
39 return points;
40}