]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Id$ |
2 | ||
3 | Reve::PointSet* | |
4 | its_hits(const char *varexp = "fX:fY:fZ", | |
2caed564 | 5 | const char *selection = "", |
6 | Reve::RenderElement* cont = 0) | |
5a5a1232 | 7 | { |
8 | AliRunLoader* rl = Alieve::Event::AssertRunLoader(); | |
9 | rl->LoadHits("ITS"); | |
10 | ||
11 | TTree* ht = rl->GetTreeH("ITS", false); | |
5a5a1232 | 12 | |
7be1e8cd | 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 Reve::PointSet* points = new Reve::PointSet(Form("ITS Hits '%s'", selection)); | |
17 | char form[1000]; | |
18 | sprintf(form,"ITS Hits '%s'", selection); | |
19 | Reve::PointSet* points = new Reve::PointSet(form); | |
f37061fc | 20 | |
21 | TPointSelector ps(ht, points, varexp, selection); | |
22 | ps.Select(); | |
23 | ||
2caed564 | 24 | if(points->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) { |
bcb585f3 | 25 | Warning("its_hits", Form("No hits match '%s'", selection)); |
52465a1b | 26 | delete points; |
27 | return 0; | |
28 | } | |
29 | ||
7be1e8cd | 30 | //PH points->SetTitle(Form("N=%d", points->Size())); |
31 | sprintf(form,"N=%d", points->Size()); | |
32 | points->SetTitle(form); | |
8a68912d | 33 | points->SetMarkerSize(.5); |
5a5a1232 | 34 | points->SetMarkerColor((Color_t)2); |
35 | ||
2caed564 | 36 | if(cont) |
37 | gReve->AddRenderElement(cont, points); | |
38 | else | |
39 | gReve->AddRenderElement(points); | |
5b96ea20 | 40 | gReve->Redraw3D(); |
5a5a1232 | 41 | |
42 | return points; | |
43 | } |