ROOT logo
// $Id$
// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007

/**************************************************************************
 * 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 <TTree.h>
#include <TStyle.h>
#include <TGeoManager.h>
#include <TEveManager.h>
#include <TEveElement.h>

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

void tof_digits_sector(Int_t sector=0)
{
  
  TGeoManager *localGeoManager = AliEveEventManager::AssertGeometry(); //gEve->GetGeometry("./geometry.root");
  if (!localGeoManager) {
    printf("ERROR: no TGeo\n");
  }

  AliRunLoader* rl =  AliEveEventManager::AssertRunLoader();
  rl->LoadDigits("TOF");
  TTree* dt = rl->GetTreeD("TOF", false);

  AliEveTOFDigitsInfo* di = new AliEveTOFDigitsInfo();

  di->SetTree(dt);

  //AliTOFGeometry* g = di->GetTOFgeometry();

  gStyle->SetPalette(1, 0);
  gEve->DisableRedraw();

  //Char_t sectorName[100];
  //Char_t sectorTitle[200];

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

  AliEveTOFSector* m = new AliEveTOFSector(localGeoManager, sector, dt);
  m->SetName("Sector");
  m->SetAutoTrans(kFALSE);
  m->SetTrans();
  gEve->AddElement(m, ll);

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