Fixing coverity bugs
authorlramona <ramona.lea@cern.ch>
Mon, 17 Feb 2014 10:44:01 +0000 (11:44 +0100)
committerlramona <ramona.lea@cern.ch>
Mon, 17 Feb 2014 10:44:01 +0000 (11:44 +0100)
PWGLF/STRANGENESS/Hypernuclei/AliAODNuclExReplicator.cxx
PWGLF/STRANGENESS/Hypernuclei/AliAnalysisTaskESDNuclExFilter.cxx

index 0ff7cd5..7b093c3 100644 (file)
@@ -519,10 +519,9 @@ void AliAODNuclExReplicator::ReplicateAndFilter(const AliAODEvent& source)
     }
   }
   
-  Double_t xPrimaryVertex=0.,yPrimaryVertex=0.,zPrimaryVertex=0.;
+  Double_t xPrimaryVertex=0.,yPrimaryVertex=0.;
   xPrimaryVertex=vtx->GetX();
   yPrimaryVertex=vtx->GetY();
-  zPrimaryVertex=vtx->GetZ();  
   
   fBzkG=source.GetMagneticField();
   fVertexerTracks=new AliVertexerTracks(fBzkG);
@@ -750,7 +749,7 @@ void AliAODNuclExReplicator::ReplicateAndFilter(const AliAODEvent& source)
   if(fV1) { delete fV1; fV1=NULL; }
   //cout<<"Delete 5"<<  endl;
   if(fAODMap) { delete [] fAODMap; fAODMap=NULL; }
-  delete indices;
+  delete []indices;
   //cout<<"Delete 6"<<  endl;
   delete fVertexerTracks;
 
@@ -878,6 +877,12 @@ AliAODRecoDecayLF2Prong* AliAODNuclExReplicator::Make2Prong(TObjArray *twoTrackA
       
   Double_t d0z0[2],covd0z0[3];
 
+  d0z0[0] = -999.;
+  d0z0[1] = -999.;
+  covd0z0[0] = -999.;
+  covd0z0[1] = -999.;
+  covd0z0[2] = -999.;
+
   d0[0] = d0z0[0];
   d0err[0] = TMath::Sqrt(TMath::Abs(covd0z0[0]));
 
index 399fbf0..f307f4e 100644 (file)
@@ -135,6 +135,7 @@ AliAnalysisTaskESDNuclExFilter::AliAnalysisTaskESDNuclExFilter(Bool_t onlyMuon,
   fnSigmaTrk2(nsigmaTrk2),
   fpartType1(partType1),
   fpartType2(partType2),
+  murep(0x0),
   fPIDResponse(0)
 {
   // Default constructor
@@ -152,7 +153,7 @@ AliAnalysisTaskESDNuclExFilter::AliAnalysisTaskESDNuclExFilter(const char* name,
   fnSigmaTrk2(nsigmaTrk2),
   fpartType1(partType1),
   fpartType2(partType2),
-  murep(0),
+  murep(0x0),
   fPIDResponse(0)
 {
   // Constructor
@@ -330,14 +331,7 @@ void AliAnalysisTaskESDNuclExFilter::ConvertESDtoAOD()
   //cout<<"========================> CONVERT ESD TO AOD <============================="<<endl;
 
   
-  AliVEvent *event = InputEvent();
-  //cout<<"VEvent: "<<event<<endl;
   AliAODEvent *lAODevent=(AliAODEvent*)InputEvent();
-  //cout<<"AOD Event: "<<event<<endl;
-  AliAODHeader* header =lAODevent->GetHeader();
-  //cout<<"header :"<<header<<endl;
-  Int_t jTracks =  lAODevent->GetNumberOfTracks();
-  //cout<<"n jtracks :"<<jTracks<<endl;
 
   // Read primary vertex from AOD event 
   // AliAODVertex *primary = *(AODEvent()->GetPrimaryVertex());