]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/tpc_hits.C
Temporary replacement of Form by sprintf to avoid problems on some platforms (alpahli...
[u/mrichter/AliRoot.git] / EVE / alice-macros / tpc_hits.C
1 // $Id$
2
3 Reve::PointSet*
4 tpc_hits(const char *varexp    = "TPC2.fArray.fR:TPC2.fArray.fFi:TPC2.fArray.fZ",
5          const char *selection = "TPC2.fArray.fR>80")
6 {
7   // Extracts 'major' TPC hits (not the compressed ones).
8   // This gives ~2.5% of all hits.
9
10   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
11   rl->LoadHits("TPC");
12
13   TTree* ht = rl->GetTreeH("TPC", false);
14
15   //PH The line below is replaced waiting for a fix in Root
16   //PH which permits to use variable siza arguments in CINT
17   //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
18   //PH  Reve::PointSet* points = new Reve::PointSet(Form("TPC Hits '%s'", selection));
19   char form[1000];
20   sprintf(form,"TPC Hits '%s'", selection);
21   Reve::PointSet* points = new Reve::PointSet(form);
22   points->SetSourceCS(TPointSelectorConsumer::TVT_RPhiZ);
23
24   TPointSelector ps(ht, points, varexp, selection);
25   ps.Select();
26
27   //PH  points->SetTitle(Form("N=%d", points->Size()));
28   sprintf(form,"N=%d", points->Size());
29   points->SetTitle(form);
30   points->SetMarkerSize(.5);
31   points->SetMarkerColor((Color_t)3);
32
33   gReve->AddRenderElement(points);
34   gReve->Redraw3D();
35
36   return points;
37 }