3 // Functions to read rootified raw-data from TPC sector test.
5 // Use tpc_sector_raw_test("filename.root") for initialization,
6 // next_event() to advance along the data stream.
7 // When there is no more data ROOT will crash.
9 class AliRawReaderRoot;
17 using namespace Alieve;
23 AliRawReaderRoot* reader = 0;
26 void tpc_sector_raw_test(const char *file = "", Int_t ievent = 0)
28 // gROOT->Macro("alieve_loadlibs.C");
29 // Only sub-set of ALICE libraries is needed:
30 gSystem->Load("libESD");
31 gSystem->Load("libSTEER");
32 gSystem->Load("libRAWData");
33 gSystem->Load("libTPCbase");
34 gSystem->Load("libTPCrec");
35 gSystem->Load("libTPCsim");
36 // ALICE visualization
37 gSystem->Load("libAlieve");
39 gStyle->SetPalette(1, 0);
41 reader = new AliRawReaderRoot(file);
42 reader->RequireHeader(kFALSE);
44 for(Int_t i=0; i<ievent; ++i, ++event)
48 //x->SetLoadPedestal(5);
49 x->SetLoadThreshold(5);
50 x->SetAutoPedestal(kTRUE);
52 s = new TPCSector2D();
53 // s->SetSectorID(0); // 0 is default
54 // s->SetTrans(kTRUE); // place on proper 3D coordinates
57 gReve->AddRenderElement(s);
58 gReve->DrawRenderElement(s);
60 t = new TPCSector3D();
62 // t->SetTrans(kTRUE);
65 t->SetDriftVel(2.273);
66 gReve->AddRenderElement(t);
67 gReve->DrawRenderElement(t);
77 printf("Now loading event %d\n", event);
78 AliTPCRawStreamOld input(reader);
79 reader->SelectEquipment(-1);
80 x->LoadRaw(input, kTRUE, kTRUE);
82 printf("Updating scene\n");
88 void tpc_raw_pad_dump(Int_t s, Int_t r, Int_t p)
93 if(r >= TPCSectorData::GetInnSeg().GetNRows()) {
94 r -= TPCSectorData::GetInnSeg().GetNRows();
98 // AliTPCRawStream input(reader);
99 AliTPCRawStreamOld input(reader);
100 reader->SelectEquipment(-1);
102 Int_t sector = input.GetSector();
103 Int_t row = input.GetRow();
105 while (input.Next()) {
106 if (input.IsNewRow()) {
107 sector = input.GetSector();
108 row = input.GetRow();
110 if(sector != s || row != r) continue;
112 Int_t signal = input.GetSignal();
113 Int_t pad = input.GetPad();
114 Int_t time = input.GetTime();
117 printf("%d %d\n", time, signal);