// $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. *
+ **************************************************************************/
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <TString.h>
+#include <TTree.h>
+#include <TEvePointSet.h>
+#include <TEveElement.h>
+#include <TEveManager.h>
+#include <TEveTreeTools.h>
+
+#include <AliRunLoader.h>
+#include <AliEveEventManager.h>
+#endif
+
+TEvePointSet*
trd_hits(const char *varexp = "fX:fY:fZ",
const char *selection = "",
- Reve::RenderElement* cont = 0)
+ TEveElement* cont = 0)
{
- AliRunLoader* rl = Alieve::Event::AssertRunLoader();
+ AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
rl->LoadHits("TRD");
TTree* ht = rl->GetTreeH("TRD", 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("TRD Hits '%s'", selection));
- char form[1000];
- sprintf(form,"TRD Hits '%s'", selection);
- Reve::PointSet* points = new Reve::PointSet(form);
-
- TPointSelector ps(ht, points, varexp, selection);
+
+ TEvePointSet* points = new TEvePointSet(Form("TRD Hits '%s'", selection));
+
+ TEvePointSelector ps(ht, points, varexp, selection);
ps.Select();
- if (points->Size() == 0 && gReve->GetKeepEmptyCont() == kFALSE) {
- Warning("trd_hits", Form("No hits match '%s'", selection));
+ if (points->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE) {
+ Warning("trd_hits", "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);
+ points->SetName(Form("TRD Hits"));
+ const TString viz_tag("SIM Hits TRD");
+ points->ApplyVizTag(viz_tag, "Hits");
+
+ points->SetTitle(Form("N=%d", points->Size()));
points->SetMarkerSize(.5);
- points->SetMarkerColor((Color_t)7);
+ points->SetMarkerColor(7);
- gReve->AddRenderElement(points, cont);
- gReve->Redraw3D();
+ gEve->AddElement(points, cont);
+ gEve->Redraw3D();
return points;
}