coverity fixes
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jan 2013 12:56:49 +0000 (12:56 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jan 2013 12:56:49 +0000 (12:56 +0000)
PWGCF/Correlations/DPhi/AliLeadingV0Correlation.cxx
PWGCF/Correlations/DPhi/FourierDecomposition/AliDhcTask.cxx
PWGCF/EBYE/NetParticle/AliAnalysisNetParticleEffCont.cxx

index 4258c02..ae5e63d 100644 (file)
@@ -166,6 +166,10 @@ AliLeadingV0Correlation::AliLeadingV0Correlation()
        fHistLeadInfoMixMC(0)
 {
 
+  for(Int_t iBin = 0; iBin < 100; iBin++){
+    fZvtxBins[iBin] = 0.;
+    fCentBins[iBin] = 0.;
+  }
 
 }
 //---------------------------------------------------------------------------------------
@@ -290,7 +294,13 @@ AliLeadingV0Correlation::AliLeadingV0Correlation(const char *name)
        fHistLeadInfoMix(0),
        fHistLeadInfoMixMC(0)
 {      
-   DefineOutput(1, TList::Class());                                            
+
+  for(Int_t iBin = 0; iBin < 100; iBin++){
+    fZvtxBins[iBin] = 0.;
+    fCentBins[iBin] = 0.;
+  }
+  
+  DefineOutput(1, TList::Class());                                            
 }
 
 //---------------------------------------------------------------------------------------
index 8724145..b6a1423 100644 (file)
@@ -524,6 +524,12 @@ void AliDhcTask::GetESDTracks(MiniEvent* miniEvt)
 
   TList *list = InputEvent()->GetList();
   TClonesArray *tcaTracks = dynamic_cast<TClonesArray*>(list->FindObject(fTracksName));
+
+  if(!tcaTracks){
+    AliError("Ptr to tcaTracks zero");
+    return;
+  }
+
   const Int_t ntracks = tcaTracks->GetEntries();
   if (miniEvt)
     miniEvt->reserve(ntracks);
index 86b033f..a3c9aba 100644 (file)
@@ -344,7 +344,11 @@ void AliAnalysisNetParticleEffCont::FillMCLabels() {
       continue;
     
     // -- Check if accepted - AOD
-    if (fAOD && (dynamic_cast<AliAODTrack*>(track))){
+    if (fAOD){
+      if(!(dynamic_cast<AliAODTrack*>(track))){
+       AliError("Pointer to dynamic_cast<AliAODTrack*>(track) = ZERO");
+       continue;
+      }
       if(!((dynamic_cast<AliAODTrack*>(track))->TestFilterBit(fAODtrackCutBit))) 
        continue;
     }