From Cvetan: new macro to load ITS clusters.
[u/mrichter/AliRoot.git] / EVE / test-macros / tpc_gui.C
CommitLineData
1fcd01a0 1// $Header$
2
3// Function to spawn a gui for reading rootified raw-data from TPC sector test.
45f4ec15 4//
5// To use:
6// a) select TPCLoader entry in the list-tree view;
7// you'll get a dialog to steer the data-loading process in an adjacent window
8// b) to select a ROOT file containing the raw-data double-click on 'File:'
9// text entry to spawn a file-dialog or type in the name
10// c) click open to actually open the file and load an event
1fcd01a0 11
12#ifdef __CINT__
13
14class AliRawReaderRoot;
15
16namespace Alieve {
17class TPCData;
18class TPCSector2D;
19class TPCSector3D;
20}
21
22#else
23
24#include <Reve/Reve.h>
25#include <Reve/RGTopFrame.h>
26#include <Alieve/TPCData.h>
27#include <Alieve/TPCSector2D.h>
28#include <Alieve/TPCSector3D.h>
29
30#include <RAW/AliRawReaderRoot.h>
31#include <TPC/AliTPCRawStream.h>
32
33#include <TSystem.h>
34#include <TStyle.h>
35
36#endif
37
38
39using namespace Alieve;
40
499585db 41TPCLoader* tpc_loader = 0;
42
1fcd01a0 43void tpc_gui(const char *file=0, Int_t ievent=0)
44{
45 gStyle->SetPalette(1, 0);
46
499585db 47 TPCLoader* l = tpc_loader = new TPCLoader;
1fcd01a0 48 TPCData* d = new TPCData;
49 // d->SetLoadPedestal(5);
50 d->SetLoadThreshold(5);
51 d->SetAutoPedestal(kTRUE);
52 l->SetData(d);
b63e46cb 53 l->SetDoubleSR(kTRUE);
7ffb2ef3 54 // l->SetInitParams(40, 980, 10); // min-time, max-time, threshold
55 // l->SetTPCEquipementMap("EquipmentIdMap.data");
1fcd01a0 56
5b96ea20 57 gReve->AddRenderElement(l);
58 gReve->NotifyBrowser(l);
59 gReve->DrawRenderElement(l);
1fcd01a0 60
61 if(file != 0) {
62 l->SetFile(file);
63 l->OpenFile();
64 l->GotoEvent(ievent);
65 }
66}