Removing obsolete macros which used the AliTPCtracker
[u/mrichter/AliRoot.git] / EVE / alice-macros / tof_raw.C
CommitLineData
ba978640 1/**************************************************************************
2 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
3 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
4 * full copyright notice. *
5 **************************************************************************/
6
7#if !defined(__CINT__) || defined(__MAKECINT__)
8#include <TClonesArray.h>
9#include <TStyle.h>
10#include <TGeoManager.h>
11#include <TEveManager.h>
12#include <TEveElement.h>
13
6c49a8e1 14#include <AliTOFGeometry.h>
15#include <AliEveEventManager.h>
16#include <AliEveTOFDigitsInfo.h>
17#include <AliEveTOFSector.h>
ba978640 18#endif
19
c0089cfc 20void tof_raw(Int_t newDecoder = 2)
455b87be 21{
81515106 22 AliRawReader *rawReader = AliEveEventManager::AssertRawReader();
455b87be 23
24 TClonesArray *array = 0x0;
25
290113e6 26 TGeoManager *localGeoManager = AliEveEventManager::AssertGeometry();
455b87be 27 if (!localGeoManager) {
28 printf("ERROR: no TGeo\n");
29 }
30
455b87be 31 AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
81515106 32 di->ReadRaw(rawReader, newDecoder);
455b87be 33
34 AliTOFGeometry* g = new AliTOFGeometry();
35
36 gStyle->SetPalette(1, 0);
37 gEve->DisableRedraw();
38
39 TEveElementList* ll = new TEveElementList("TOF");
40 ll->SetTitle("TOF detector");
fbc350a3 41 ll->SetMainColor(2);
455b87be 42 gEve->AddElement(ll);
43
44 for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {
45
46 array = di->GetDigits(iSector);
47
48 AliEveTOFSector* m = new AliEveTOFSector(localGeoManager,iSector,array);
49
50 gEve->AddElement(m, ll);
51
52 }
53
d5b19a9b 54 delete di;
55 delete g;
56
455b87be 57 gEve->EnableRedraw();
455b87be 58}