Added last decoder version (V2) in TOF raw data visualization
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_raw.C
CommitLineData
ebc2af25 1void tof_raw((Int_t newDecoder = 2)
455b87be 2{
81515106 3 AliRawReader *rawReader = AliEveEventManager::AssertRawReader();
455b87be 4
5 TClonesArray *array = 0x0;
6
81515106 7 TGeoManager *localGeoManager = gEve->GetDefaultGeometry();
455b87be 8 if (!localGeoManager) {
9 printf("ERROR: no TGeo\n");
10 }
11
455b87be 12 AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
81515106 13 di->ReadRaw(rawReader, newDecoder);
455b87be 14
15 AliTOFGeometry* g = new AliTOFGeometry();
16
17 gStyle->SetPalette(1, 0);
18 gEve->DisableRedraw();
19
20 TEveElementList* ll = new TEveElementList("TOF");
21 ll->SetTitle("TOF detector");
fbc350a3 22 ll->SetMainColor(2);
455b87be 23 gEve->AddElement(ll);
24
25 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
26
27 array = di->GetDigits(iSector);
28
29 AliEveTOFSector* m = new AliEveTOFSector(localGeoManager,iSector,array);
30
31 gEve->AddElement(m, ll);
32
33 }
34
d5b19a9b 35 delete di;
36 delete g;
37
455b87be 38 gEve->EnableRedraw();
455b87be 39}