From 5a951426b06dc9a807cee794da370b434d85211e Mon Sep 17 00:00:00 2001 From: gconesab Date: Mon, 30 Jun 2014 18:07:23 +0200 Subject: [PATCH] fix coverity 20267, 23156, 23258, check null pointer and fix the size of the histogram array to real expected size --- PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx | 2 +- PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx b/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx index 87782773f0e..2f85892ac39 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx +++ b/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx @@ -3317,7 +3317,7 @@ void AliAnaParticleHadronCorrelation::MakeChargedMixCorrelation(AliAODPWG4Partic TObjArray* bgCalo = 0; // Check if the particle is isolated in the mixed event, it not, do not fill the histograms - if(OnlyIsolated() || fFillNeutralEventMixPool) + if((OnlyIsolated() || fFillNeutralEventMixPool) && poolCalo) { if(pool->GetSize()!=poolCalo->GetSize()) printf("AliAnaParticleHadronCorrelationNew::MakeChargedMixCorrelation() - Different size of calo and track pools\n"); diff --git a/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h b/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h index 770795b7f53..7cd6b8910eb 100755 --- a/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h +++ b/PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h @@ -253,7 +253,7 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass { TH2F * fhPhiLeading; //! phi distribution vs pT of leading particles TH2F * fhEtaLeading; //! eta distribution vs pT of leading particles - TH1F * fhPtLeadingMC[6]; //! pT distribution of leading particles, check the origin of the cluster : decay photon (pi0, eta, other), merged photon (pi0), hadron, rest of photons (prompt, FSR, ISR) + TH1F * fhPtLeadingMC[7]; //! pT distribution of leading particles, check the origin of the cluster : "Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron" TH2F * fhPtLeadingCentrality; //! pT distribution of leading particles vs centrality TH2F * fhPtLeadingEventPlane; //! pT distribution of leading particles vs centrality -- 2.43.0