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