]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/test-macros/tpc_gui.C
Remove trailing whitespace.
[u/mrichter/AliRoot.git] / EVE / test-macros / tpc_gui.C
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          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 // Function to spawn a gui for reading rootified raw-data from TPC sector test.
11 //
12 // To use:
13 // a) select AliEveTPCLoader entry in the list-tree view;
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
18
19 #ifdef __CINT__
20
21 class AliRawReaderRoot;
22
23 namespace Alieve {
24 class AliEveTPCData;
25 class AliEveTPCSector2D;
26 class AliEveTPCSector3D;
27 }
28
29 #else
30
31 #include <TEve.h>
32 #include <TEveManager.h>
33 #include <Alieve/AliEveTPCData.h>
34 #include <Alieve/AliEveTPCSector2D.h>
35 #include <Alieve/AliEveTPCSector3D.h>
36
37 #include <RAW/AliRawReaderRoot.h>
38 #include <TPC/AliTPCRawStream.h>
39
40 #include <TSystem.h>
41 #include <TStyle.h>
42
43 #endif
44
45
46 AliEveTPCLoader* tpc_loader = 0;
47
48 void tpc_gui(const char *file=0, Int_t ievent=0)
49 {
50   gStyle->SetPalette(1, 0);
51
52   AliEveTPCLoader* l = tpc_loader = new AliEveTPCLoader;
53   AliEveTPCData*   d = new AliEveTPCData;
54   // d->SetLoadPedestal(5);
55   d->SetLoadThreshold(5);
56   d->SetAutoPedestal(kTRUE);
57   l->SetData(d);
58   l->SetDoubleSR(kTRUE);
59   l->SetInitParams(40, 980, 10); // min-time, max-time, threshold
60   // l->SetTPCEquipementMap("EquipmentIdMap.data");
61
62   gEve->AddElement(l);
63
64   if(file != 0) {
65     l->SetFile(file);
66     l->OpenFile();
67     l->GotoEvent(ievent);
68   }
69 }