coverity
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Jan 2012 14:52:55 +0000 (14:52 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 21 Jan 2012 14:52:55 +0000 (14:52 +0000)
PWG3/vertexingHF/AliRDHFCuts.cxx
PWG3/vertexingHF/AliRDHFCutsDStartoKpipi.cxx

index f6d2e90..43a1900 100644 (file)
@@ -177,7 +177,8 @@ AliRDHFCuts &AliRDHFCuts::operator=(const AliRDHFCuts &source)
   fnVarsForOpt=source.fnVarsForOpt;\r
   fUsePID=source.fUsePID;\r
   fUseAOD049=source.fUseAOD049;\r
-  SetPidHF(source.GetPidHF());\r
+  if(fPidHF) delete fPidHF;\r
+  fPidHF=new AliAODPidHF(*(source.GetPidHF()));\r
   fWhyRejection=source.fWhyRejection;\r
   fEvRejectionBits=source.fEvRejectionBits;\r
   fRemoveDaughtersFromPrimary=source.fRemoveDaughtersFromPrimary;\r
@@ -198,7 +199,7 @@ AliRDHFCuts &AliRDHFCuts::operator=(const AliRDHFCuts &source)
   fIsCandTrackSPDFirst=source.fIsCandTrackSPDFirst;\r
   fMaxPtCandTrackSPDFirst=source.fMaxPtCandTrackSPDFirst;\r
 \r
-  if(source.GetTrackCuts()) AddTrackCuts(source.GetTrackCuts());\r
+  if(source.GetTrackCuts()) {delete fTrackCuts; fTrackCuts=new AliESDtrackCuts(*(source.GetTrackCuts()));}\r
   if(source.fPtBinLimits) SetPtBins(source.fnPtBinLimits,source.fPtBinLimits);\r
   if(source.fVarNames) SetVarNames(source.fnVars,source.fVarNames,source.fIsUpperCut);\r
   if(source.fCutsRD) SetCuts(source.fGlobalIndex,source.fCutsRD);\r
index 7b18b71..e94b8e3 100644 (file)
@@ -129,7 +129,10 @@ AliRDHFCutsDStartoKpipi &AliRDHFCutsDStartoKpipi::operator=(const AliRDHFCutsDSt
   if(&source == this) return *this;
 
   AliRDHFCuts::operator=(source);
-  if(source.GetTrackCutsSoftPi()) AddTrackCutsSoftPi(source.GetTrackCutsSoftPi());
+  if(source.GetTrackCutsSoftPi()) {
+    delete fTrackCutsSoftPi;
+    fTrackCutsSoftPi = new AliESDtrackCuts(*(source.GetTrackCutsSoftPi()));
+  }
 
   return *this;
 }