]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALLoader.cxx
Adding picture to ilusstrate energy correction precission
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALLoader.cxx
index d3f3e94ccdee9329799a6ddbb89f89c0bd572d63..f96c9fbf4be1fcd9c0b8af44eba0d6243f070f79 100644 (file)
@@ -95,15 +95,21 @@ AliEMCALLoader::AliEMCALLoader(const Char_t *detname,const Char_t *eventfolderna
 }
 
 //____________________________________________________________________________
-AliEMCALLoader::AliEMCALLoader(const AliEMCALLoader & obj)
-  : AliLoader(obj),
-    fDebug(obj.fDebug),
-    fHits(obj.fHits),
-    fDigits(obj.fDigits),
-    fSDigits(obj.fSDigits),
-    fRecPoints(obj.fRecPoints)
+AliEMCALLoader::AliEMCALLoader(const Char_t *name, TFolder *topfolder)
+  : AliLoader(name,topfolder),
+    fDebug(0),
+    fHits(0),
+    fDigits(0),
+    fSDigits(0),
+    fRecPoints(0)
 {
-  //copy ctor
+  //Specific constructor for EMCAL Loader class
+
+  fDebug=0;
+  fHits = new TClonesArray("AliEMCALHit");
+  fDigits = new TClonesArray("AliEMCALDigit");
+  fSDigits = new TClonesArray("AliEMCALDigit");
+  fRecPoints = new TObjArray();
 }
 
 //____________________________________________________________________________ 
@@ -147,6 +153,7 @@ AliEMCALCalibData* AliEMCALLoader::CalibData()
   
 }
 
+
 //____________________________________________________________________________ 
 Int_t AliEMCALLoader::CalibrateRaw(Double_t energy, Int_t module, 
                                   Int_t column, Int_t row)
@@ -218,9 +225,7 @@ Int_t AliEMCALLoader::GetEvent()
      TBranch * branchS = treeS->GetBranch(fDetectorName);
      branchS->ResetAddress();
      if (fSDigits) {
-       fSDigits->Delete();
-       delete fSDigits;
-       fSDigits = 0x0;
+       fSDigits->Clear();
      }
      branchS->SetAddress(&fSDigits);
      treeS->GetEvent(0);
@@ -232,9 +237,7 @@ Int_t AliEMCALLoader::GetEvent()
      TBranch * branchD = treeD->GetBranch(fDetectorName);
      branchD->ResetAddress();
      if (fDigits) {
-       fDigits->Delete();
-       delete fDigits;
-       fDigits = 0x0;
+       fDigits->Clear();
      }
      branchD->SetAddress(&fDigits);
      treeD->GetEvent(0);
@@ -246,9 +249,7 @@ Int_t AliEMCALLoader::GetEvent()
      TBranch * branchR = treeR->GetBranch(fgkECARecPointsBranchName);
      branchR->ResetAddress();
      if (fRecPoints) {
-       fRecPoints->Delete();
-       delete fRecPoints;
-       fRecPoints = 0x0;
+       fRecPoints->Clear();
      }
      branchR->SetAddress(&fRecPoints);
      treeR->GetEvent(0);