X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVE%2Falice-macros%2Ftof_hits.C;h=df431f3d50a631b972a678c62144efad8598dcc9;hb=3e2078360bfba2bbd836c4ef09dc556434188163;hp=0b049920550b759af3b20fe8825a171efe2a2624;hpb=32e219c20fb55c013ac4c3391a9874ee28f859fe;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVE/alice-macros/tof_hits.C b/EVE/alice-macros/tof_hits.C index 0b049920550..df431f3d50a 100644 --- a/EVE/alice-macros/tof_hits.C +++ b/EVE/alice-macros/tof_hits.C @@ -1,40 +1,47 @@ // $Id$ +// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 -Reve::PointSet* +/************************************************************************** + * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * + * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * + * full copyright notice. * + **************************************************************************/ + +TEvePointSet* tof_hits(const char *varexp = "fX:fY:fZ", const char *selection = "", - Reve::RenderElement* cont) + TEveElement* cont) { - AliRunLoader* rl = Alieve::Event::AssertRunLoader(); + AliRunLoader* rl = AliEveEventManager::AssertRunLoader(); rl->LoadHits("TOF"); TTree* ht = rl->GetTreeH("TOF", false); - //PH The line below is replaced waiting for a fix in Root - //PH which permits to use variable siza arguments in CINT - //PH on some platforms (alphalinuxgcc, solariscc5, etc.) - //PH Reve::PointSet* points = new Reve::PointSet(Form("TOF Hits '%s'", selection)); - char form[1000]; - sprintf(form,"TOF Hits '%s'", selection); - Reve::PointSet* points = new Reve::PointSet(form); - - TPointSelector ps(ht, points, varexp, selection); + TEvePointSet* points = new TEvePointSet(Form("TOF Hits '%s'", selection)); + + TEvePointSelector ps(ht, points, varexp, selection); ps.Select(); - if( points->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) { + if( points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) { Warning("tof_hits", Form("No hits match '%s'", selection)); delete points; return 0; } - //PH points->SetTitle(Form("N=%d", points->Size())); - sprintf(form,"N=%d", points->Size()); - points->SetTitle(form); + // PD - added tags + + points->SetName(Form("TOF Hits")); + const TString viz_tag("SIM Hits TOF"); + points->ApplyVizTag(viz_tag, "Hits"); + + // PD + + points->SetTitle(Form("N=%d", points->Size())); points->SetMarkerSize(.5); - points->SetMarkerColor((Color_t)2); + points->SetMarkerColor(2); - gReve->AddRenderElement(points, cont); - gReve->Redraw3D(); + gEve->AddElement(points, cont); + gEve->Redraw3D(); return points; }