]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/tof_digits.C
Remove EVE/Reve/ sub-module.
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_digits.C
1 void tof_digits()
2 {  
3   TClonesArray *array = 0x0;
4
5   Int_t nDigitsInVolume[3] = {-1, -1, -1};
6   Int_t nStrips=19;
7   TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
8   if (!localGeoManager) {
9     printf("ERROR: no TGeo\n");
10   }
11
12   AliRunLoader* rl =  Alieve::Event::AssertRunLoader();
13   rl->LoadDigits("TOF");
14   TTree* dt = rl->GetTreeD("TOF", false);
15
16   Alieve::TOFDigitsInfo* di = new Alieve::TOFDigitsInfo();
17   di->SetTree(dt);
18   di->LoadDigits();
19   di->Dump();
20
21   AliTOFGeometry* g = di->fGeom;
22  
23   gStyle->SetPalette(1, 0);
24   gEve->DisableRedraw();
25
26   TEveElementList* ll = new TEveElementList("TOF");
27   ll->SetTitle("TOF detector");
28   ll->SetMainColor((Color_t)2);
29   gEve->AddElement(ll);
30
31   for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
32     
33     array = di->GetDigits(iSector);
34    
35     Alieve::TOFSector* m = new Alieve::TOFSector(localGeoManager,iSector,array);
36
37     gEve->AddElement(m, ll);
38
39   }
40
41   gEve->EnableRedraw();
42 }