]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/tof_digits.C
Replace AliEveEventManager token with Event where it was done by a runaway regexp...
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_digits.C
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  **************************************************************************/
9
10 void tof_digits()
11 {
12   TClonesArray *array = 0x0;
13
14   Int_t nDigitsInVolume[3] = {-1, -1, -1};
15   Int_t nStrips=19;
16   TGeoManager *localGeoManager = (TGeoManager*)gEve->GetGeometry("./geometry.root");//"$REVESYS/alice-data/alice_fullgeo.root");
17   if (!localGeoManager) {
18     printf("ERROR: no TGeo\n");
19   }
20
21   AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
22   rl->LoadDigits("TOF");
23   TTree* dt = rl->GetTreeD("TOF", false);
24
25   AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
26   di->SetTree(dt);
27   di->LoadDigits();
28   di->Dump();
29
30   AliTOFGeometry* g = di->fGeom;
31
32   gStyle->SetPalette(1, 0);
33   gEve->DisableRedraw();
34
35   TEveElementList* ll = new TEveElementList("TOF");
36   ll->SetTitle("TOF detector");
37   ll->SetMainColor((Color_t)2);
38   gEve->AddElement(ll);
39
40   for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
41
42     array = di->GetDigits(iSector);
43
44     AliEveTOFSector* m = new AliEveTOFSector(localGeoManager,iSector,array);
45
46     gEve->AddElement(m, ll);
47
48   }
49
50   gEve->EnableRedraw();
51 }