]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALLoader.cxx
Use of (dummy) reconstructors for all detectors (T.Kuhr)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALLoader.cxx
index 83854a853b745d0a972e22f4c49e28d9b8f23d0d..e51568ffe10e2bd88b92228ba99bdab1286e84ae 100644 (file)
@@ -49,6 +49,7 @@
 #include "AliEMCALLoader.h"
 #include "AliEMCAL.h"
 #include "AliEMCALHit.h"
+#include "AliEMCALGetter.h"
 
 ClassImp(AliEMCALLoader)
   
@@ -89,6 +90,11 @@ AliEMCALLoader::~AliEMCALLoader()
   Clean(fgkECARecPointsName);
   Clean(fgkTracksName);
   Clean(fgkRecParticlesName);
+  CleanFolders() ; 
+ // set to 0x0 the objgetter in AliGetter ... weird isn it !
+  AliEMCALGetter * gime = AliEMCALGetter::Instance() ; 
+  if (gime) 
+    gime->Reset() ;
 }
 
 //____________________________________________________________________________ 
@@ -306,6 +312,7 @@ Int_t AliEMCALLoader::LoadRecParticles(Option_t* opt)
 //____________________________________________________________________________ 
 Int_t AliEMCALLoader::PostHits()
 {
+  // Post Hits
   Int_t reval = AliLoader::PostHits();
   if (reval)
     {
@@ -434,6 +441,7 @@ Int_t AliEMCALLoader::ReadHits()
              index++ ; 
            }
        }
+      tempo->Delete() ; 
       delete tempo;
     }
   else 
@@ -707,7 +715,8 @@ AliEMCALLoader* AliEMCALLoader::GetEMCALLoader(const  char* eventfoldername)
 
 //____________________________________________________________________________ 
 Bool_t AliEMCALLoader::BranchExists(const TString& recName)
-{
+{ 
+  // Check is branch exists
   if (fBranchTitle.IsNull()) return kFALSE;
   TString dataname, zername ;
   TTree* tree;
@@ -776,10 +785,12 @@ void AliEMCALLoader::SetBranchTitle(const TString& btitle)
 //____________________________________________________________________________ 
 void AliEMCALLoader::CleanHits()
 {
+  // Clean hits        
   AliLoader::CleanHits();
   //Clear an array 
   TClonesArray* hits = Hits();
-  if (hits) hits->Clear();
+  if (hits) 
+    hits->Clear();
 }
 
 //____________________________________________________________________________ 
@@ -893,6 +904,7 @@ void AliEMCALLoader::MakeDigitsArray()
 //____________________________________________________________________________ 
 void AliEMCALLoader::MakeRecPointsArray()
 {
+  // Make recpoints array
   if ( ECARecPoints() == 0x0) {
     if (GetDebug()>9) 
       printf("MakeRecPointsArray: Making array for ECA");