Added support to display the HLT ESD Tree. See the comment in visscan_local.C for How
[u/mrichter/AliRoot.git] / EVE / alice-macros / fmd_hits2.C
CommitLineData
20dae051 1// $Id$
a284ebe7 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
ba978640 10#if !defined(__CINT__) || defined(__MAKECINT__)
11#include <TStyle.h>
12#include <TTree.h>
13#include <TEveManager.h>
14#include <TEvePointSet.h>
15#include <TEveTreeTools.h>
16#include <TEvePointSet.h>
17
6c49a8e1 18#include <AliRunLoader.h>
19#include <AliEveEventManager.h>
20#include <AliEveFMDLoader.h>
ba978640 21#endif
22
a284ebe7 23TEvePointSet*
24fmd_hits2(const char *varexp = "fX:fY:fZ",
25 const char *selection = "")
274799f3 26{
a284ebe7 27 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
28 rl->LoadHits("FMD");
29
30 TTree* ht = rl->GetTreeH("FMD", false);
31
32 //PH The line below is replaced waiting for a fix in Root
33 //PH which permits to use variable siza arguments in CINT
34 //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
35 //PH TEvePointSet* points = new TEvePointSet(Form("FMD Hits '%s'", selection));
36 char form[1000];
37 sprintf(form,"FMD Hits '%s'", selection);
38 TEvePointSet* points = new TEvePointSet(form);
39
40 TEvePointSelector ps(ht, points, varexp, selection);
41 ps.Select();
42
43 //PH points->SetTitle(Form("N=%d", points->Size()));
44 sprintf(form,"N=%d", points->Size());
45 points->SetTitle(form);
46 points->SetMarkerSize(.5);
47 points->SetMarkerColor(2);
48
49 gEve->AddElement(points);
274799f3 50 gEve->Redraw3D();
a284ebe7 51
52 return points;
274799f3 53}