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