]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/pmd_hits.C
a295f440a9c2e381ea5ea2004f9b0fa24395b70a
[u/mrichter/AliRoot.git] / EVE / alice-macros / pmd_hits.C
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 TEvePointSet*
11 pmd_hits(const char *varexp    = "fX:fY:fZ",
12          const char *selection = "")
13 {
14   AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
15   rl->LoadHits("PMD");
16
17   TTree* ht = rl->GetTreeH("PMD", false);
18
19   //PH The line below is replaced waiting for a fix in Root
20   //PH which permits to use variable siza arguments in CINT
21   //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
22   //PH  TEvePointSet* points = new TEvePointSet(Form("PMD Hits '%s'", selection));
23   char form[1000];
24   sprintf(form,"PMD Hits '%s'", selection);
25   TEvePointSet* points = new TEvePointSet(form);
26
27   TEvePointSelector ps(ht, points, varexp, selection);
28   ps.Select();
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
36   gEve->AddElement(points);
37   gEve->Redraw3D();
38
39   return points;
40 }