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