Handle missing rec-point tree in a uniform way: return null pointer to TEvePointSet.
[u/mrichter/AliRoot.git] / EVE / test-macros / tpc_gui.C
CommitLineData
d810d0de 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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
1fcd01a0 9
10// Function to spawn a gui for reading rootified raw-data from TPC sector test.
45f4ec15 11//
12// To use:
d810d0de 13// a) select AliEveTPCLoader entry in the list-tree view;
45f4ec15 14// you'll get a dialog to steer the data-loading process in an adjacent window
15// b) to select a ROOT file containing the raw-data double-click on 'File:'
16// text entry to spawn a file-dialog or type in the name
17// c) click open to actually open the file and load an event
1fcd01a0 18
19#ifdef __CINT__
20
21class AliRawReaderRoot;
22
d810d0de 23class AliEveTPCData;
24class AliEveTPCSector2D;
25class AliEveTPCSector3D;
1fcd01a0 26
27#else
28
84aff7a4 29#include <TEve.h>
30#include <TEveManager.h>
cb4245bb 31#include <EveDet/AliEveTPCData.h>
32#include <EveDet/AliEveTPCSector2D.h>
33#include <EveDet/AliEveTPCSector3D.h>
1fcd01a0 34
35#include <RAW/AliRawReaderRoot.h>
36#include <TPC/AliTPCRawStream.h>
37
38#include <TSystem.h>
39#include <TStyle.h>
40
41#endif
42
43
d810d0de 44AliEveTPCLoader* tpc_loader = 0;
499585db 45
1fcd01a0 46void tpc_gui(const char *file=0, Int_t ievent=0)
47{
48 gStyle->SetPalette(1, 0);
49
d810d0de 50 AliEveTPCLoader* l = tpc_loader = new AliEveTPCLoader;
51 AliEveTPCData* d = new AliEveTPCData;
1fcd01a0 52 // d->SetLoadPedestal(5);
53 d->SetLoadThreshold(5);
54 d->SetAutoPedestal(kTRUE);
55 l->SetData(d);
b63e46cb 56 l->SetDoubleSR(kTRUE);
32e219c2 57 l->SetInitParams(40, 980, 10); // min-time, max-time, threshold
7ffb2ef3 58 // l->SetTPCEquipementMap("EquipmentIdMap.data");
1fcd01a0 59
84aff7a4 60 gEve->AddElement(l);
1fcd01a0 61
62 if(file != 0) {
63 l->SetFile(file);
64 l->OpenFile();
65 l->GotoEvent(ievent);
66 }
67}