]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RALICE/AliInvmass.cxx
Deleted erroneously added simlinks
[u/mrichter/AliRoot.git] / RALICE / AliInvmass.cxx
index a54c867e316d2f97fc335fe0d2bd5303521ac8ec..80149b2acb8a348b53d8865a78f1726caf15ab07 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.2  1999/09/29 09:24:28  fca
-Introduction of the Copyright and cvs Log
-
-*/
+// $Id$
 
 ////////////////////////////////////////////////////////////////////////////////
 // Class AliInvmass
@@ -104,9 +99,11 @@ Introduction of the Copyright and cvs Log
 //        
 //
 //--- Author: Nick van Eijndhoven 12-apr-1999 UU-SAP Utrecht
+//- Modified: NvE $Date$ UU-SAP Utrecht
 ////////////////////////////////////////////////////////////////////////////////
 
 #include "AliInvmass.h"
+#include "Riostream.h"
  
 ClassImp(AliInvmass) // Class implementation to enable ROOT I/O
  
@@ -127,14 +124,12 @@ AliInvmass::~AliInvmass()
 // Destructor to delete dynamically allocated memory
  if (fMinv)
  {
-  fMinv->Delete();
   delete fMinv;
   fMinv=0;
  }
 
  if (fMbkg)
  {
-  fMbkg->Delete();
   delete fMbkg;
   fMbkg=0;
  }
@@ -163,19 +158,19 @@ void AliInvmass::SetPhiSwitch(Int_t i)
  if (i==0) fNewphi=0;
 }
 ////////////////////////////////////////////////////////////////////////////////
-Int_t AliInvmass::GetStorageMode()
+Int_t AliInvmass::GetStorageMode() const
 {
 // Provide mode of storage for the result arrays for inv. mass and comb. background
  return fMode;
 }
 ////////////////////////////////////////////////////////////////////////////////
-Int_t AliInvmass::GetThetaSwitch()
+Int_t AliInvmass::GetThetaSwitch() const
 {
 // Provide the theta switching flag
  return fNewtheta;
 }
 ////////////////////////////////////////////////////////////////////////////////
-Int_t AliInvmass::GetPhiSwitch()
+Int_t AliInvmass::GetPhiSwitch() const
 {
 // Provide the phi switching flag
  return fNewphi;
@@ -210,14 +205,12 @@ void AliInvmass::Combine(TObjArray* a1,TObjArray* a2)
  
  if ((!fBkg || fMode==1) && fMinv)
  {
-  fMinv->Delete();
   delete fMinv;
   fMinv=0;
  }
  
  if (fBkg && (fMode !=1) && fMbkg)
  {
-  fMbkg->Delete();
   delete fMbkg;
   fMbkg=0;
  }
@@ -302,12 +295,20 @@ void AliInvmass::Combine(TObjArray* a1,TObjArray* a2)
     t->SetCharge(q1+q2);
     if (!fBkg || fMode==1) 
     {
-     if (!fMinv) fMinv=new TObjArray();
+     if (!fMinv)
+     {
+      fMinv=new TObjArray();
+      fMinv->SetOwner();
+     }
      fMinv->Add(t);
     }
     else
     {
-     if (!fMbkg) fMbkg=new TObjArray();
+     if (!fMbkg)
+     {
+      fMbkg=new TObjArray();
+      fMbkg->SetOwner();
+     }
      fMbkg->Add(t);
     }
    }