]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/test-macros/tpc_gui.C
New files, 3DS import demo from Bertrand.
[u/mrichter/AliRoot.git] / EVE / test-macros / tpc_gui.C
1 // $Header$
2
3 // Function to spawn a gui for reading rootified raw-data from TPC sector test.
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
11
12 #ifdef __CINT__
13
14 class AliRawReaderRoot;
15
16 namespace Alieve {
17 class TPCData;
18 class TPCSector2D;
19 class 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
39 using namespace Alieve;
40
41 TPCLoader* tpc_loader = 0;
42
43 void tpc_gui(const char *file=0, Int_t ievent=0)
44 {
45   gStyle->SetPalette(1, 0);
46
47   TPCLoader* l = tpc_loader = new TPCLoader;
48   TPCData*   d = new TPCData;
49   // d->SetLoadPedestal(5);
50   d->SetLoadThreshold(5);
51   d->SetAutoPedestal(kTRUE);
52   l->SetData(d);
53   l->SetDoubleSR(kTRUE);
54   // l->SetInitParams(40, 980, 10); // min-time, max-time, threshold
55   // l->SetTPCEquipementMap("EquipmentIdMap.data");
56
57   gReve->AddRenderElement(l);
58   gReve->NotifyBrowser(l);
59   gReve->DrawRenderElement(l);
60
61   if(file != 0) {
62     l->SetFile(file);
63     l->OpenFile();
64     l->GotoEvent(ievent);
65   }
66 }