coverity
authordainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Dec 2011 10:15:30 +0000 (10:15 +0000)
committerdainese <dainese@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Dec 2011 10:15:30 +0000 (10:15 +0000)
PWG3/vertexingHF/AliAnalysisTaskSEDplus.cxx
PWG3/vertexingHF/AliAnalysisTaskSEDs.cxx

index 97bdf99..079dfde 100644 (file)
@@ -88,7 +88,7 @@ AliAnalysisTaskSE(),
   for(Int_t i=0; i<5; i++)fHistMassPtImpParTC[i]=0;
     
   
-  for(Int_t i=0;i<3*fNPtBins;i++){
+  for(Int_t i=0;i<3*kMaxPtBins;i++){
     if(fMassHist[i])fMassHist[i]=0;
     if(fCosPHist[i])fCosPHist[i]=0;
     if(fDLenHist[i])fDLenHist[i]=0;
@@ -107,16 +107,20 @@ AliAnalysisTaskSE(),
     if(fDLxyTC[i])fDLxyTC[i]=0;
     if(fCosxy[i])fCosxy[i]=0;
     if(fCosxyTC[i])fCosxyTC[i]=0;
-    if(fMassHistLS[i])fMassHistLS[i]=0;
     if(fCosPHistLS[i])fCosPHistLS[i]=0;
     if(fDLenHistLS[i])fDLenHistLS[i]=0;
     if(fSumd02HistLS[i])fSumd02HistLS[i]=0;
     if(fSigVertHistLS[i])fSigVertHistLS[i]=0;
     if(fPtMaxHistLS[i])fPtMaxHistLS[i]=0;
     if(fDCAHistLS[i])fDCAHistLS[i]=0;
+  }
+  for(Int_t i=0;i<5*kMaxPtBins;i++){
+    if(fMassHistLS[i])fMassHistLS[i]=0;
     if(fMassHistLSTC[i])fMassHistLSTC[i]=0;
   }
-
+  for(Int_t i=0;i<kMaxPtBins+1;i++){
+    fArrayBinLimits[i]=0;
+  }
 
 }
 
@@ -163,8 +167,7 @@ AliAnalysisTaskSEDplus::AliAnalysisTaskSEDplus(const char *name,AliRDHFCutsDplus
   
   for(Int_t i=0; i<5; i++)fHistMassPtImpParTC[i]=0;
     
-  
-  for(Int_t i=0;i<3*fNPtBins;i++){
+  for(Int_t i=0;i<3*kMaxPtBins;i++){
     if(fMassHist[i])fMassHist[i]=0;
     if(fCosPHist[i])fCosPHist[i]=0;
     if(fDLenHist[i])fDLenHist[i]=0;
@@ -183,16 +186,20 @@ AliAnalysisTaskSEDplus::AliAnalysisTaskSEDplus(const char *name,AliRDHFCutsDplus
     if(fDLxyTC[i])fDLxyTC[i]=0;
     if(fCosxy[i])fCosxy[i]=0;
     if(fCosxyTC[i])fCosxyTC[i]=0;
-    if(fMassHistLS[i])fMassHistLS[i]=0;
     if(fCosPHistLS[i])fCosPHistLS[i]=0;
     if(fDLenHistLS[i])fDLenHistLS[i]=0;
     if(fSumd02HistLS[i])fSumd02HistLS[i]=0;
     if(fSigVertHistLS[i])fSigVertHistLS[i]=0;
     if(fPtMaxHistLS[i])fPtMaxHistLS[i]=0;
     if(fDCAHistLS[i])fDCAHistLS[i]=0;
+  }
+  for(Int_t i=0;i<5*kMaxPtBins;i++){
+    if(fMassHistLS[i])fMassHistLS[i]=0;
     if(fMassHistLSTC[i])fMassHistLSTC[i]=0;
   }
-  
+  for(Int_t i=0;i<kMaxPtBins+1;i++){
+    fArrayBinLimits[i]=0;
+  }
   
   
   // Default constructor
index e74a52e..6acd1bd 100644 (file)
@@ -70,11 +70,9 @@ AliAnalysisTaskSEDs::AliAnalysisTaskSEDs():
 {
   // Default constructor
 
-  for(Int_t i=0;i<4*fNPtBins;i++){
+  for(Int_t i=0;i<4*kMaxPtBins;i++){
     
     if(fMassHist[i]) fMassHist[i]=0;
-    if(fMassHistPhi[i]) fMassHistPhi[i]=0;
-    if(fMassHistK0st[i]) fMassHistK0st[i]=0;
     if(fCosPHist[i]) fCosPHist[i]=0;
     if(fDLenHist[i]) fDLenHist[i]=0;
     if(fSumd02Hist[i]) fSumd02Hist[i]=0;
@@ -89,6 +87,16 @@ AliAnalysisTaskSEDs::AliAnalysisTaskSEDs():
     if(fDalitzK0st[i]) fDalitzK0st[i]=0;
 
   }
+  for(Int_t i=0;i<3*kMaxPtBins;i++){
+    if(fMassHistPhi[i]) fMassHistPhi[i]=0;
+    if(fMassHistK0st[i]) fMassHistK0st[i]=0;
+   
+  }
+
+  for(Int_t i=0;i<kMaxPtBins+1;i++){
+    fPtLimits[i]=0;
+  }
+
 }
 
 //________________________________________________________________________
@@ -114,15 +122,10 @@ AliAnalysisTaskSEDs::AliAnalysisTaskSEDs(const char *name, AliRDHFCutsDstoKKpi*
 {
   // Default constructor
   // Output slot #1 writes into a TList container
-  Int_t nptbins=fAnalysisCuts->GetNPtBins();
-  Float_t *ptlim=fAnalysisCuts->GetPtBinLimits();
-  SetPtBins(nptbins,ptlim);
   
-  for(Int_t i=0;i<4*fNPtBins;i++){
+  for(Int_t i=0;i<4*kMaxPtBins;i++){
     
     if(fMassHist[i]) fMassHist[i]=0;
-    if(fMassHistPhi[i]) fMassHistPhi[i]=0;
-    if(fMassHistK0st[i]) fMassHistK0st[i]=0;
     if(fCosPHist[i]) fCosPHist[i]=0;
     if(fDLenHist[i]) fDLenHist[i]=0;
     if(fSumd02Hist[i]) fSumd02Hist[i]=0;
@@ -137,7 +140,20 @@ AliAnalysisTaskSEDs::AliAnalysisTaskSEDs(const char *name, AliRDHFCutsDstoKKpi*
     if(fDalitzK0st[i]) fDalitzK0st[i]=0;
 
   }
+  for(Int_t i=0;i<3*kMaxPtBins;i++){
+    if(fMassHistPhi[i]) fMassHistPhi[i]=0;
+    if(fMassHistK0st[i]) fMassHistK0st[i]=0;
+   
+  }
+
+  for(Int_t i=0;i<kMaxPtBins+1;i++){
+    fPtLimits[i]=0;
+  }
   
+  Int_t nptbins=fAnalysisCuts->GetNPtBins();
+  Float_t *ptlim=fAnalysisCuts->GetPtBinLimits();
+  SetPtBins(nptbins,ptlim);
+
   DefineOutput(1,TList::Class());  //My private output
 
   DefineOutput(2,TList::Class());