]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGDQ/dielectron/AliDielectron.cxx
coverity fixes
[u/mrichter/AliRoot.git] / PWGDQ / dielectron / AliDielectron.cxx
index b0b1afbefbd964dd63d107fb0ed2d6a6ea057bd1..e0a24f5ad5fcfb0f470862687f1aed035ab760d1 100644 (file)
@@ -1454,11 +1454,9 @@ void AliDielectron::SetCentroidCorrFunction(TF1 *fun, UInt_t varx, UInt_t vary,
   // clone temporare histogram, otherwise it will not be streamed to file!
   TString key = Form("cntrd%d%d%d",varx,vary,varz);
   fPostPIDCntrdCorr = (TH1*)fun->GetHistogram()->Clone(key.Data());
-  printf("itregal   %f \n", fPostPIDCntrdCorr->Integral());
-  // check if we use a TF* for correction or the histogram
-       fPostPIDCntrdCorr->GetListOfFunctions()->AddAt(fun,0);
-  // check for corrections and add their variables to the fill map
   if(fPostPIDCntrdCorr)  {
+    fPostPIDCntrdCorr->GetListOfFunctions()->AddAt(fun,0);
+    // check for corrections and add their variables to the fill map
     printf("POST TPC PID CORRECTION added for centroids:  ");
     switch(fPostPIDCntrdCorr->GetDimension()) {
     case 3: printf(" %s, ",fPostPIDCntrdCorr->GetZaxis()->GetName());
@@ -1481,7 +1479,6 @@ void AliDielectron::SetCentroidCorrFunction(TH1 *fun, UInt_t varx, UInt_t vary,
   // clone temporare histogram, otherwise it will not be streamed to file!
   TString key = Form("cntrd%d%d%d",varx,vary,varz);
   fPostPIDCntrdCorr = (TH1*)fun->Clone(key.Data());
-
   // check for corrections and add their variables to the fill map
   if(fPostPIDCntrdCorr)  {
     printf("POST TPC PID CORRECTION added for centroids:  ");
@@ -1506,9 +1503,9 @@ void AliDielectron::SetWidthCorrFunction(TF1 *fun, UInt_t varx, UInt_t vary, UIn
   // clone temporare histogram, otherwise it will not be streamed to file!
   TString key = Form("wdth%d%d%d",varx,vary,varz);
   fPostPIDWdthCorr = (TH1*)fun->GetHistogram()->Clone(key.Data());
-  fPostPIDWdthCorr->GetListOfFunctions()->AddAt(fun,0);
-  // check for corrections and add their variables to the fill map
   if(fPostPIDWdthCorr)  {
+    fPostPIDWdthCorr->GetListOfFunctions()->AddAt(fun,0);
+    // check for corrections and add their variables to the fill map
     printf("POST TPC PID CORRECTION added for widths:  ");
     switch(fPostPIDWdthCorr->GetDimension()) {
     case 3: printf(" %s, ",fPostPIDWdthCorr->GetZaxis()->GetName());