ROOT logo
/**************************************************************************
 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
 * full copyright notice.                                                 *
 **************************************************************************/

#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TClonesArray.h>
#include <TStyle.h>
#include <TGeoManager.h>
#include <TEveManager.h>
#include <TEveElement.h>

#include <AliTOFGeometry.h>
#include <AliEveEventManager.h>
#include <AliEveTOFDigitsInfo.h>
#include <AliEveTOFSector.h>
#endif

void tof_raw(Int_t newDecoder = 2)
{
  AliRawReader *rawReader = AliEveEventManager::AssertRawReader();

  TClonesArray *array = 0x0;

  TGeoManager *localGeoManager = AliEveEventManager::AssertGeometry();
  if (!localGeoManager) {
    printf("ERROR: no TGeo\n");
  }

  AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();
  di->ReadRaw(rawReader, newDecoder);

  AliTOFGeometry* g = new AliTOFGeometry();
 
  gStyle->SetPalette(1, 0);
  gEve->DisableRedraw();

  TEveElementList* ll = new TEveElementList("TOF");
  ll->SetTitle("TOF detector");
  ll->SetMainColor(2);
  gEve->AddElement(ll);

  for(Int_t iSector=0; iSector<g->NSectors(); iSector++) {

    array = di->GetDigits(iSector);

    AliEveTOFSector* m = new AliEveTOFSector(localGeoManager,iSector,array);

    gEve->AddElement(m, ll);

  }

  delete di;
  delete g;

  gEve->EnableRedraw();
}
 tof_raw.C:1
 tof_raw.C:2
 tof_raw.C:3
 tof_raw.C:4
 tof_raw.C:5
 tof_raw.C:6
 tof_raw.C:7
 tof_raw.C:8
 tof_raw.C:9
 tof_raw.C:10
 tof_raw.C:11
 tof_raw.C:12
 tof_raw.C:13
 tof_raw.C:14
 tof_raw.C:15
 tof_raw.C:16
 tof_raw.C:17
 tof_raw.C:18
 tof_raw.C:19
 tof_raw.C:20
 tof_raw.C:21
 tof_raw.C:22
 tof_raw.C:23
 tof_raw.C:24
 tof_raw.C:25
 tof_raw.C:26
 tof_raw.C:27
 tof_raw.C:28
 tof_raw.C:29
 tof_raw.C:30
 tof_raw.C:31
 tof_raw.C:32
 tof_raw.C:33
 tof_raw.C:34
 tof_raw.C:35
 tof_raw.C:36
 tof_raw.C:37
 tof_raw.C:38
 tof_raw.C:39
 tof_raw.C:40
 tof_raw.C:41
 tof_raw.C:42
 tof_raw.C:43
 tof_raw.C:44
 tof_raw.C:45
 tof_raw.C:46
 tof_raw.C:47
 tof_raw.C:48
 tof_raw.C:49
 tof_raw.C:50
 tof_raw.C:51
 tof_raw.C:52
 tof_raw.C:53
 tof_raw.C:54
 tof_raw.C:55
 tof_raw.C:56
 tof_raw.C:57
 tof_raw.C:58
 tof_raw.C:59