]>
Commit | Line | Data |
---|---|---|
20dae051 | 1 | // $Id$ |
6226bf2b | 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 | ||
ba978640 | 10 | #if !defined(__CINT__) || defined(__MAKECINT__) |
11 | #include <TStyle.h> | |
12 | #include <TTree.h> | |
13 | #include <TEveManager.h> | |
14 | #include <TEveElement.h> | |
15 | #include <TEvePointSet.h> | |
16 | #include <TEveTreeTools.h> | |
17 | ||
6c49a8e1 | 18 | #include <AliRawReader.h> |
19 | #include <AliAltroRawStreamV3.h> | |
20 | #include <AliTPCRawStreamV3.h> | |
21 | #include <AliEveEventManager.h> | |
22 | #include <AliEveTPCData.h> | |
23 | #include <AliEveTPCSector2D.h> | |
24 | #include <AliEveTPCSector3D.h> | |
ba978640 | 25 | #endif |
26 | ||
6226bf2b | 27 | // Macro to visualise rootified raw-data from TPC. |
28 | // | |
29 | // Use tpc_raw(Int_t mode) in order to run it | |
30 | // Needs that alieve_init() is already called | |
31 | // mode = 1 - show only 2D sectors | |
32 | // mode = 2 - show only 3D sectors | |
33 | // mode = 3 - show both 2D and 3D sectors | |
34 | ||
6226bf2b | 35 | void tpc_raw(Int_t mode = 3) |
36 | { | |
37 | gStyle->SetPalette(1, 0); | |
38 | ||
6226bf2b | 39 | AliRawReader *reader = AliEveEventManager::AssertRawReader(); |
40 | reader->Reset(); | |
375fd576 | 41 | AliTPCRawStreamV3 input(reader); |
6226bf2b | 42 | reader->Select("TPC"); // ("TPC", firstRCU, lastRCU); |
43 | ||
4d62585e | 44 | AliEveTPCData *x = new AliEveTPCData; |
6226bf2b | 45 | // x->SetLoadPedestal(5); |
46 | x->SetLoadThreshold(5); | |
47 | x->SetAutoPedestal(kTRUE); | |
48 | ||
6226bf2b | 49 | x->LoadRaw(input, kTRUE, kTRUE); |
50 | ||
da94dab4 | 51 | gEve->DisableRedraw(); |
52 | ||
de33999e | 53 | TEveElementList* sec2d = new TEveElementList("TPC 2D"); |
54 | gEve->AddElement(sec2d); | |
55 | ||
56 | TEveElementList* sec3d = new TEveElementList("TPC 3D"); | |
57 | gEve->AddElement(sec3d); | |
58 | ||
ba978640 | 59 | AliEveTPCSector2D *s; |
60 | AliEveTPCSector3D *t; | |
61 | ||
6226bf2b | 62 | for (Int_t i=0; i<=35; ++i) { |
63 | if (mode & 1) { | |
de33999e | 64 | s = new AliEveTPCSector2D(Form("2D sector %d",i)); |
6226bf2b | 65 | s->SetSectorID(i); |
66 | s->SetAutoTrans(kTRUE); // place on proper 3D coordinates | |
67 | s->SetDataSource(x); | |
68 | s->SetFrameColor(36); | |
de33999e | 69 | sec2d->AddElement(s); |
6226bf2b | 70 | s->IncRTS(); |
71 | } | |
72 | if (mode & 2) { | |
de33999e | 73 | t = new AliEveTPCSector3D(Form("3D sector %d",i)); |
6226bf2b | 74 | t->SetSectorID(i); |
75 | t->SetAutoTrans(kTRUE); | |
76 | t->SetDataSource(x); | |
de33999e | 77 | sec3d->AddElement(t); |
6226bf2b | 78 | t->IncRTS(); |
79 | } | |
80 | } | |
81 | ||
82 | gEve->EnableRedraw(); | |
6226bf2b | 83 | } |