coverity fixes (Saehanseul Oh <saehanseul.oh@cern.ch>)
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2013 10:23:21 +0000 (10:23 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2013 10:23:21 +0000 (10:23 +0000)
PWGCF/Correlations/DPhi/FourierDecomposition/AliMuonEffMC.cxx
PWGCF/Correlations/DPhi/FourierDecomposition/AliMuonEffMC.h

index 30ee9077eeb0b4de16a3ee13cf9a0b133e8f0161..af664180f06ec7084e9e2390ffaab16d6af783c5 100644 (file)
@@ -42,10 +42,23 @@ AliMuonEffMC::AliMuonEffMC() :
   fHMuonParGen(0x0), fHMuonDetGen(0x0), fHMuonDetRec(0x0), fHEtcDetRec(0x0), fHFXu(0), fHFXantiu(0), fHFXd(0), fHFXantid(0), fHFXg(0), fHFXetc(0), fHFXmuonP(0), fHFXmuonM(0)
 {
   // Constructor
-  //DefineInput(0, TChain::Class());
-  //DefineOutput(1, TList::Class());
-
-
+   for(Int_t i=0; i<4; i++)
+  {
+    fHMuMotherGenPt[i] = NULL;
+    fHMuMotherRecPt[i] = NULL;
+    fHMuMotherGenPhi[i] = NULL;
+    fHMuMotherRecPhi[i] = NULL;
+    fHMuMotherGenEta[i] = NULL;
+    fHMuMotherRecEta[i] = NULL;
+    fHMuDCA[i] = 0x0;
+    for(Int_t j=0; j<3; j++)
+    {
+      fHMuMohterPhiDifGen[i][j] = NULL;
+      fHMuMohterPhiDifRec[i][j] = NULL;
+      fHMuMohterEtaDifGen[i][j] = NULL;
+      fHMuMohterEtaDifRec[i][j] = NULL;
+    }
+  }
 }
 
 //________________________________________________________________________
@@ -56,6 +69,23 @@ AliMuonEffMC::AliMuonEffMC(const char *name) :
   fHMuonParGen(0x0), fHMuonDetGen(0x0), fHMuonDetRec(0x0), fHEtcDetRec(0x0), fHFXu(0), fHFXantiu(0), fHFXd(0), fHFXantid(0), fHFXg(0), fHFXetc(0), fHFXmuonP(0), fHFXmuonM(0)
 {
   // Constructor
+   for(Int_t i=0; i<4; i++)
+  {
+    fHMuMotherGenPt[i] = NULL;
+    fHMuMotherRecPt[i] = NULL;
+    fHMuMotherGenPhi[i] = NULL;
+    fHMuMotherRecPhi[i] = NULL;
+    fHMuMotherGenEta[i] = NULL;
+    fHMuMotherRecEta[i] = NULL;
+    fHMuDCA[i] = 0x0;
+    for(Int_t j=0; j<3; j++)
+    {
+      fHMuMohterPhiDifGen[i][j] = NULL;
+      fHMuMohterPhiDifRec[i][j] = NULL;
+      fHMuMohterEtaDifGen[i][j] = NULL;
+      fHMuMohterEtaDifRec[i][j] = NULL;
+    }
+  }
   DefineInput(0, TChain::Class());
   DefineOutput(1, TList::Class());
 
@@ -76,24 +106,6 @@ void AliMuonEffMC::UserCreateOutputObjects()
 
   fOutputList = new TList();
   fOutputList->SetOwner(1);
-  for(Int_t i=0; i<4; i++)
-  {
-    fHMuMotherGenPt[i] = 0x0;
-    fHMuMotherRecPt[i] = 0x0;
-    fHMuMotherGenPhi[i] = 0x0;
-    fHMuMotherRecPhi[i] = 0x0;
-    fHMuMotherGenEta[i] = 0x0;
-    fHMuMotherRecEta[i] = 0x0;
-    fHMuDCA[i] = 0x0;
-    for(Int_t j=0; j<3; j++)
-    {
-      fHMuMohterPhiDifGen[i][j] = 0x0;
-      fHMuMohterPhiDifRec[i][j] = 0x0;
-      fHMuMohterEtaDifGen[i][j] = 0x0;
-      fHMuMohterEtaDifRec[i][j] = 0x0;
-    }
-  }
 
   fHEventStat = new TH1D("fHEventStat","Event statistics for analysis",18,0,18);
   fHEventStat->GetXaxis()->SetBinLabel(1,"Event");
index 6ad5a09dec4644bcf916809fc1a8467643ad6630..9d2c9f47341e19a0e2697f89ef4a7e3ebd93ea80 100644 (file)
@@ -102,7 +102,7 @@ class AliMuonEffMC : public AliAnalysisTaskSE {
   AliMuonEffMC(const AliMuonEffMC&);            // not implemented
   AliMuonEffMC &operator=(const AliMuonEffMC&); // not implemented
 
-  ClassDef(AliMuonEffMC, 5);
+  ClassDef(AliMuonEffMC, 6);
 };
 
 #endif