From 1d7b3dd64ef1e53ab5b784e7e1606dc84907b3c3 Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 6 Dec 2002 18:13:04 +0000 Subject: [PATCH] Added the geometry object as a data member ! Warning: from now on you get the geometry from the file --- EMCAL/AliEMCAL.cxx | 8 ++++++-- EMCAL/AliEMCAL.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/EMCAL/AliEMCAL.cxx b/EMCAL/AliEMCAL.cxx index cb9dbef566d..aad20680a75 100644 --- a/EMCAL/AliEMCAL.cxx +++ b/EMCAL/AliEMCAL.cxx @@ -49,6 +49,7 @@ AliEMCAL::AliEMCAL():AliDetector() fName="EMCAL"; //fQATask = 0; fTreeQA = 0; + fGeom = 0 ; } //____________________________________________________________________________ @@ -56,6 +57,7 @@ AliEMCAL::AliEMCAL(const char* name, const char* title): AliDetector(name,title) { // ctor : title is used to identify the layout + fGeom = AliEMCALGeometry::GetInstance(GetTitle(),"") ; //fQATask = 0; fTreeQA = 0; } @@ -156,9 +158,11 @@ void AliEMCAL::CreateMaterials() AliEMCALGeometry * AliEMCAL::GetGeometry() const { // gets the pointer to the AliEMCALGeometry unique instance - - return AliEMCALGeometry::GetInstance(GetTitle(),"") ; + if (fGeom) + return fGeom ; + else + return AliEMCALGeometry::GetInstance(GetTitle(),"") ; } //____________________________________________________________________________ diff --git a/EMCAL/AliEMCAL.h b/EMCAL/AliEMCAL.h index 670c5f5ff72..00b8ca93f91 100644 --- a/EMCAL/AliEMCAL.h +++ b/EMCAL/AliEMCAL.h @@ -64,8 +64,9 @@ protected: //AliEMCALQAChecker * fQATask ; //! PHOS checkers container TTree * fTreeQA ; // the QA tree that contains the alarms + AliEMCALGeometry * fGeom ; // the geometry object - ClassDef(AliEMCAL,2) // Electromagnetic calorimeter (base class) + ClassDef(AliEMCAL,3) // Electromagnetic calorimeter (base class) } ; -- 2.43.0