]>
Commit | Line | Data |
---|---|---|
d810d0de | 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 * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
cb4245bb | 9 | |
915dabe1 | 10 | class AliRawReaderFile; |
11 | ||
d810d0de | 12 | class AliEveTPCData; |
915dabe1 | 13 | |
cb4245bb | 14 | AliEveTPCData *x = 0; |
15 | AliRawReaderFile *reader = 0; | |
915dabe1 | 16 | |
17 | void tpc_raw_test() | |
18 | { | |
19 | gROOT->Macro("alieve_loadlibs.C"); | |
20 | gSystem->Load("libAlieve"); | |
21 | ||
22 | reader = new AliRawReaderFile("raw0"); | |
23 | reader->Reset(); | |
24 | reader->NextEvent(); | |
25 | AliTPCRawStream input(reader); | |
26 | ||
d810d0de | 27 | x = new AliEveTPCData; |
915dabe1 | 28 | //x->SetSectorBlockSize(8192); |
29 | //x->SetLoadThreshold(5); | |
30 | x->CreateAllSectors(); | |
31 | x->LoadRaw(input, kFALSE); | |
32 | ||
33 | gStyle->SetPalette(1, 0); | |
34 | ||
d810d0de | 35 | AliEveTPCSector2D* s = new AliEveTPCSector2D(); |
915dabe1 | 36 | s->SetDataSource(x); |
37 | s->SetMainColor(36); | |
84aff7a4 | 38 | gEve->AddElement(s); |
39 | gEve->DrawElement(s); | |
915dabe1 | 40 | |
41 | } | |
42 | ||
43 | void tpc_raw_pad_dump(Int_t s, Int_t r, Int_t p) | |
44 | { | |
45 | reader->Reset(); | |
46 | reader->NextEvent(); | |
47 | ||
d810d0de | 48 | if(r >= AliEveTPCSectorData::GetInnSeg().fNRows) { |
49 | r -= AliEveTPCSectorData::GetInnSeg().fNRows; | |
915dabe1 | 50 | s += 36; |
51 | } | |
52 | ||
53 | AliTPCRawStream input(reader); | |
54 | Int_t sector = input.GetSector(); | |
55 | Int_t row = input.GetRow(); | |
56 | ||
57 | while (input.Next()) { | |
58 | if (input.IsNewRow()) { | |
59 | sector = input.GetSector(); | |
60 | row = input.GetRow(); | |
61 | } | |
62 | if(sector != s || row != r) continue; | |
63 | ||
64 | Int_t signal = input.GetSignal(); | |
65 | Int_t pad = input.GetPad(); | |
66 | Int_t time = input.GetTime(); | |
67 | ||
68 | if(pad == p) | |
69 | printf("%d %d\n", time, signal); | |
70 | } | |
71 | } |