]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HBTAN/AliHBTFunction.cxx
memory leaks removed; new base class for CFs introduced
[u/mrichter/AliRoot.git] / HBTAN / AliHBTFunction.cxx
index 369ef975c4271def63f04a7bbb8feba5465d6653..841abcb92eb406cb902c55d3048bd2c7aeda9e1b 100644 (file)
@@ -210,6 +210,28 @@ void AliHBTFunction::InitFunction()
   GetDenominator()->SetDirectory(0x0);
   Info("InitFunction","Done");
 }
+/******************************************************************/
+/******************************************************************/
+/******************************************************************/
+ClassImp(AliHBTCorrelFunction)
+//____________________________________________
+//////////////////////////////////////////////
+//
+// class AliHBTCorrelFunction
+// 
+// Base class for correlation fuctions, that is which returns ratio.
+// Stores pointer the created ratio histogram and deletes it when function is deleted
+// created in order to evoid memory leak 
+//
+////////////////////////////////////////////////////////
+AliHBTCorrelFunction& AliHBTCorrelFunction::operator=(const AliHBTCorrelFunction& in)
+{
+ //assigment operator
+  if (&in == this) return *this;
+  delete fRatio;
+  fRatio=(in.fRatio)?(TH1*)in.fRatio->Clone():0x0;
+  return *this;
+}
 
 /******************************************************************/
 /******************************************************************/