Assignment operator completed
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Aug 2011 11:05:21 +0000 (11:05 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 12 Aug 2011 11:05:21 +0000 (11:05 +0000)
Michael Weber <m.weber@cern.ch>

STEER/STEERBase/AliEMCALPIDResponse.cxx
STEER/STEERBase/AliEMCALPIDResponse.h

index 6fce1a7..eb684cf 100644 (file)
@@ -55,7 +55,8 @@
 ClassImp(AliEMCALPIDResponse)\r
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
 AliEMCALPIDResponse::AliEMCALPIDResponse():\r
-fNorm(0)\r
+  TObject(),\r
+  fNorm(NULL)\r
 {\r
   //\r
   //  The default constructor\r
@@ -83,7 +84,8 @@ fNorm(0)
 }\r
 \r
 AliEMCALPIDResponse::AliEMCALPIDResponse(const AliEMCALPIDResponse &other):\r
-    fNorm(other.fNorm)\r
+  TObject(other),\r
+  fNorm(other.fNorm)\r
 {\r
   //\r
   //  The copy constructor\r
@@ -111,8 +113,14 @@ AliEMCALPIDResponse & AliEMCALPIDResponse::operator=( const AliEMCALPIDResponse&
   //\r
   //  The assignment operator\r
   //\r
-    fNorm = other.fNorm;\r
-    for(Int_t i = 0; i < fNptBins; i++)\r
+\r
+  if(this == &other) return *this;\r
+  \r
+  // Make copy\r
+  TObject::operator=(other);\r
+  fNorm = other.fNorm;\r
+\r
+  for(Int_t i = 0; i < fNptBins; i++)\r
     {\r
        fPtCutMin[i] = 0.0;\r
        for(Int_t j = 0; j < 2*AliPID::kSPECIES; j++)\r
@@ -123,6 +131,12 @@ AliEMCALPIDResponse & AliEMCALPIDResponse::operator=( const AliEMCALPIDResponse&
            fProbHigh[j][i] = 0.0;\r
        }\r
     }\r
+  \r
+  fPtCutMin[fNptBins] = 0.0;\r
+  SetPtBoundary();\r
+  SetParametrizations();\r
+\r
+  return *this;\r
 }\r
 \r
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r
index e77128e..9c127fb 100644 (file)
@@ -17,7 +17,7 @@
 #include "AliPID.h"\r
 class TF1;\r
 \r
-class AliEMCALPIDResponse \r
+class AliEMCALPIDResponse: public TObject \r
 {\r
 public : \r
     AliEMCALPIDResponse();    //ctor\r