]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/acorde_hits.C
Remove EVE/Reve/ sub-module.
[u/mrichter/AliRoot.git] / EVE / alice-macros / acorde_hits.C
1 // $Id$
2
3 TEvePointSet*
4 acorde_hits(const char *varexp    = "ACORDE.fX:ACORDE.fY:ACORDE.fZ",
5          const char *selection = "",
6          TEveElement* cont = 0)
7 {
8   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
9   rl->LoadHits("ACORDE");
10
11   TTree* ht = rl->GetTreeH("ACORDE", 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.)
16   //PH  TEvePointSet* points = new TEvePointSet(Form("ACORDE Hits '%s'", selection));
17   char form[1000];
18   sprintf(form,"ACORDE Hits '%s'", selection);
19   TEvePointSet* points = new TEvePointSet(form);
20
21   TEvePointSelector ps(ht, points, varexp, selection);
22   ps.Select();
23
24   if(points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE)
25   {
26     Warning("acorde_hits", Form("No hits match '%s'", selection));
27     delete points;
28     return 0;
29   }
30
31   //PH  points->SetTitle(Form("N=%d", points->Size()));
32   sprintf(form,"N=%d", points->Size());
33   points->SetTitle(form);
34   points->SetMarkerSize(.5);
35   points->SetMarkerColor((Color_t)2);
36
37   gEve->AddElement(points, cont);
38   gEve->Redraw3D();
39
40   return points;
41 }