]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/tof_digits.C
Adding more information to the debug output
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_digits.C
CommitLineData
d810d0de 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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
16718cdc 9
455b87be 10
61d93123 11void tof_digits()
455b87be 12{
61d93123 13 TClonesArray *array = 0x0;
14
81515106 15 TGeoManager *localGeoManager = gEve->GetGeometry("./geometry.root");// gGeoManager = gEve->GetDefaultGeometry();
61d93123 16 if (!localGeoManager) {
17 printf("ERROR: no TGeo\n");
18 }
19
d810d0de 20 AliRunLoader* rl = AliEveEventManager::AssertRunLoader();
61d93123 21 rl->LoadDigits("TOF");
22 TTree* dt = rl->GetTreeD("TOF", false);
23
d810d0de 24 AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
61d93123 25 di->SetTree(dt);
26 di->LoadDigits();
27 di->Dump();
28
9537e66c 29 AliTOFGeometry* g = di->GetTOFgeometry();
455b87be 30
61d93123 31 gStyle->SetPalette(1, 0);
84aff7a4 32 gEve->DisableRedraw();
61d93123 33
84aff7a4 34 TEveElementList* ll = new TEveElementList("TOF");
61d93123 35 ll->SetTitle("TOF detector");
fbc350a3 36 ll->SetMainColor(2);
84aff7a4 37 gEve->AddElement(ll);
61d93123 38
39 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
455b87be 40
61d93123 41 array = di->GetDigits(iSector);
455b87be 42
d810d0de 43 AliEveTOFSector* m = new AliEveTOFSector(localGeoManager,iSector,array);
61d93123 44
84aff7a4 45 gEve->AddElement(m, ll);
61d93123 46
47 }
48
84aff7a4 49 gEve->EnableRedraw();
61d93123 50}