Protection in copy constructor
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Mar 2012 22:28:56 +0000 (22:28 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Mar 2012 22:28:56 +0000 (22:28 +0000)
PWGHF/vertexingHF/AliAODPidHF.cxx

index 41f086f..ae28ef3 100644 (file)
@@ -126,7 +126,7 @@ AliAODPidHF::AliAODPidHF(const AliAODPidHF& pid) :
   fPtThresholdTPC(pid.fPtThresholdTPC),
   fPidResponse(pid.fPidResponse),
   fPidCombined(pid.fPidCombined),
-  fTPCResponse(pid.fTPCResponse)
+  fTPCResponse(0x0)
 {
   
   fnSigma = new Double_t[fnNSigma];
@@ -142,7 +142,7 @@ AliAODPidHF::AliAODPidHF(const AliAODPidHF& pid) :
     fPLimit[i]=pid.fPLimit[i];
   }
 
-    
+  if(pid.fTPCResponse) fTPCResponse = new AliTPCPIDResponse(*(pid.fTPCResponse));
   //fPidResponse = new AliPIDResponse(*(pid.fPidResponse));
   //fPidCombined = new AliPIDCombined(*(pid.fPidCombined));