]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EVE/test-macros/tpc_gui.C
New macro file demonstrating use of TPCLoader.
[u/mrichter/AliRoot.git] / EVE / test-macros / tpc_gui.C
... / ...
CommitLineData
1// $Header$
2
3// Function to spawn a gui for reading rootified raw-data from TPC sector test.
4
5#ifdef __CINT__
6
7class AliRawReaderRoot;
8
9namespace Alieve {
10class TPCData;
11class TPCSector2D;
12class TPCSector3D;
13}
14
15#else
16
17#include <Reve/Reve.h>
18#include <Reve/RGTopFrame.h>
19#include <Alieve/TPCData.h>
20#include <Alieve/TPCSector2D.h>
21#include <Alieve/TPCSector3D.h>
22
23#include <RAW/AliRawReaderRoot.h>
24#include <TPC/AliTPCRawStream.h>
25
26#include <TSystem.h>
27#include <TStyle.h>
28
29#endif
30
31
32using namespace Alieve;
33
34void tpc_gui(const char *file=0, Int_t ievent=0)
35{
36 gStyle->SetPalette(1, 0);
37
38 TPCLoader* l = new TPCLoader;
39 TPCData* d = new TPCData;
40 // d->SetLoadPedestal(5);
41 d->SetLoadThreshold(5);
42 d->SetAutoPedestal(kTRUE);
43 l->SetData(d);
44
45 TGListTreeItem* loader_item = gReve->AddRenderElement(l);
46
47 if(file != 0) {
48 l->SetFile(file);
49 l->OpenFile();
50 l->GotoEvent(ievent);
51 }
52}