2 //**************************************************************************
3 //* This file is property of and copyright by the ALICE HLT Project *
4 //* ALICE Experiment at CERN, All rights reserved. *
6 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 //* for The ALICE HLT Project. *
9 //* Permission to use, copy, modify and distribute this software and its *
10 //* documentation strictly for non-commercial purposes is hereby granted *
11 //* without fee, provided that the above copyright notice appears in all *
12 //* copies and that both the copyright notice and this permission notice *
13 //* appear in the supporting documentation. The authors make no claims *
14 //* about the suitability of this software for any purpose. It is *
15 //* provided "as is" without express or implied warranty. *
16 //**************************************************************************
19 * Display HLT TPC clusters in AliEVE.
20 * The cluster data must be stored in an HLTOUT collection originating
21 * either from an HLT simulation or real run with a chain adding
22 * HLT TPC cluster structures of type AliHLTTPCDefinitions::fgkClustersDataType
25 * The HLTOUT data is read either from the RawReader which AliEve has been
26 * initialized or the HLT.Digits.root if the RawReader is not available.
27 * Please note: As of Nov 2008, AliEve can handle raw data noy through
28 * AliRawReaderFile. It can only open a RawReader on a single file, by default
29 * raw.root. If the file is not existing, the RawReader is not initialized.
33 * alieve $ALICE_ROOT/EVE/alice-macros/event_next.C \
34 * $ALICE_ROOT/EVE/macros/alieve_init.C \
35 * $ALICE_ROOT/EVE/alice-macros/geom_simple.C \
36 * $ALICE_ROOT/HLT/TPCLib/EVE/macros/hlt_tpc_clusters.C
38 * Display is changed to next event by executing event_next()
39 * from the root prompt.
41 * event_next(); hlt_tpc_clusters();
45 * @author Matthias.Richter@ift.uib.no
48 TEvePointSet* hlt_tpc_clusters(const char* digitfile=NULL, TEveElement* cont=0, Float_t maxR=270)
50 if (!TClass::GetClass("AliEveEventManager")) {
51 Error("hlt_tpc_clusters.C", "EVE library not loaded, please start alieve correctly");
55 AliEveEventManager* eveManager=AliEveEventManager::GetMaster();
57 Error("hlt_tpc_clusters.C", "EVE manager not initialized");
61 eveManager->AssertGeometry();
65 gSystem->Load("libAliHLTUtil");
66 gSystem->Load("libAliHLTRCU");
68 pCl=TClass::GetClass("AliHLTTPDefinitions");
69 } while (!pCl && (iLibResult=gSystem->Load("libAliHLTTPC"))==0);
71 pCl=TClass::GetClass("AliHLTTPCEVE");
72 } while (!pCl && (iLibResult=gSystem->Load("libAliHLTTPCEVE"))==0);
74 AliHLTTPCEVE hlttpceve;
75 TEvePointSet* clusters = NULL;
77 AliESDEvent* pESD=eveManager->AssertESD();
78 // extract from RawReader if available and no digit file has been specified
79 if (digitfile==NULL && eveManager->HasRawReader()) {
80 AliRawReader* pRawReader=eveManager->AssertRawReader();
82 Info("hlt_tpc_clusters.C", "extracting HLT TPC clusters from RawReader");
83 clusters=hlttpceve.MakePointSetFromHLTOUT(pRawReader, cont, maxR);
86 Info("hlt_tpc_clusters.C", Form("extracting HLT TPC clusters from digit file %s", digitfile!=NULL?digitfile:""));
87 clusters=hlttpceve.MakePointSetFromHLTDigits(digitfile, eveManager->GetEventId(), cont, maxR);
89 if (!clusters) return NULL;
91 if (clusters->Size() == 0) {
92 Info("hlt_tpc_clusters.C", "No TPC clusters");
95 //clusters->ApplyVizTag(clusters->GetName());
97 gEve->AddElement(clusters, cont);