AliRoot Core  edcc906 (edcc906)
TestEMCALGeometry.C
Go to the documentation of this file.
1 
11 
12 #if !defined(__CINT__)
13 #include <Riostream.h>
14 #include <TGeoManager.h>
15 
16 #include "AliRun.h"
17 #include "AliEMCALLoader.h"
18 #include "AliEMCALGeometry.h"
19 #endif
20 
25 {
26  // Getting EMCAL Detector and Geometry.
28 
29  if (rl == 0x0)
30  cout<<"Can not instatiate the Run Loader"<<endl;
31 
32  rl->LoadgAlice();//Needed to get geometry
33 
34  AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>
35  (rl->GetDetectorLoader("EMCAL"));
36 
37  //AliEMCALGeometry * geom = AliEMCALGeometry::GetInstance();
38  //AliEMCALGeometry *geom = dynamic_cast<AliEMCAL*>(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry();
39  TGeoManager::Import("geometry.root");
40 
41  gGeoManager->CheckOverlaps();
42  gGeoManager->PrintOverlaps();
43 
44  /*
45  AliRun * alirun = rl->GetAliRun(); // Needed to get Geometry
46  AliEMCAL * emcal = (AliEMCAL*)alirun->GetDetector("EMCAL");
47  AliEMCALGeometry * geom = emcal->GetGeometry();
48 
49  if (geom==0)
50  cout<<"Did not get geometry from EMCALLoader"<<endl;
51 
52  geom->PrintGeometry();
53  */
54 
55 }
56 
void TestEMCALGeometry()
Int_t LoadgAlice()
static const TString & GetDefaultEventFolderName()
Definition: AliConfig.h:58
AliLoader * GetDetectorLoader(const char *detname)
Give access to hits, digits, recpoints arrays and OCDB.
static AliRunLoader * Open(const char *filename="galice.root", const char *eventfoldername=AliConfig::GetDefaultEventFolderName(), Option_t *option="READ")
TGeoManager * gGeoManager