]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coverity stuff once more ...
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Oct 2010 15:50:48 +0000 (15:50 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Oct 2010 15:50:48 +0000 (15:50 +0000)
TRD/AliTRDqaBlackEvents.cxx
TRD/AliTRDqaRecPoints.cxx
TRD/AliTRDtestBeam.cxx

index cdabcf61b67abd284c387d5ab3675b8355813c41..91d35eda781e01a7da00aa07d6859e56ac9be5e8 100644 (file)
@@ -27,7 +27,6 @@
 #include "TH1D.h"
 #include "TH2D.h"
 #include "TH2S.h"
-//#include "TH3F.h"
 #include "TF1.h"
 #include "TFile.h"
 #include "TCanvas.h"
@@ -77,14 +76,57 @@ AliTRDqaBlackEvents::AliTRDqaBlackEvents()
   ,fMinNoise(0.5)
   ,fMaxNoise(2)
   ,fFitType(0) 
-  //  ,fRefFileName("")
 {
   //
   // Constructor 
   // to create the histograms call Init()
   //
 
+  for (Int_t i = 0; i < kDET; i++) {
+    fPed[i]            = 0x0;
+    fNoise[i]          = 0x0;
+    fChPP[i]           = 0x0;
+    fNPointDist[i]     = 0x0;
+    fChPed[i]          = 0x0;
+    fChNoise[i]        = 0x0;
+    fNPoint[i]         = 0x0;
+    fData[i]           = 0x0;
+    fSignal[i]         = 0x0;
+    fnEntriesRM[i]     = 0x0;
+    fnEntriesRMDist[i] = 0x0;
+    fChPedRes[i]       = 0x0;
+    fChNoiseRes[i]     = 0x0;
+    fErrorLocHC[i]     = 0x0;
+    fErrorLocMCM[i]    = 0x0;
+    fErrorLocADC[i]    = 0x0;
+  }
+  for (Int_t i = 0; i < 3; i++) {
+    fGraphPP[i]        = 0x0;
+    fSMLink[i]         = 0x0;
+    fGrLink[i]         = 0x0;
+    fppThresh[i]       = 0;
+    fnPP[i]            = 0;
+    fnLink[i]          = 0;
+  }
+  for (Int_t i = 0; i < 2; i++) {
+    fnErrorHC[i]       = 0;
+    fnErrorMCM[i]      = 0;
+    fnErrorADC[i]      = 0;
+  }
+  for (Int_t i = 0; i < kSM; i++) {
+    fSmNoiseRms[i]     = 0x0;
+    fSmNoiseFit[i]     = 0x0;
+    fSmPP[i]           = 0x0;
+  }
+  for (Int_t i = 0; i < kSM+1; i++) {
+    fNumberADC[i]      = 0x0;
+    fnADCinSM[i]       = 0;
+  }
+  for (Int_t i = 0; i < 1000; i++) {
+    fEvNoDist[i]       = 0;
+  }
   strncpy(fRefFileName,"",256);
+
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -121,14 +163,57 @@ AliTRDqaBlackEvents::AliTRDqaBlackEvents(const AliTRDqaBlackEvents &qa)
   ,fMinNoise(0.5)
   ,fMaxNoise(2) 
   ,fFitType(0)
-   //,fRefFileName("")
 {
   //
   // Copy constructor 
   // to create the histograms call Init()
   //
   
-  strcpy(fRefFileName, "");
+  for (Int_t i = 0; i < kDET; i++) {
+    fPed[i]            = 0x0;
+    fNoise[i]          = 0x0;
+    fChPP[i]           = 0x0;
+    fNPointDist[i]     = 0x0;
+    fChPed[i]          = 0x0;
+    fChNoise[i]        = 0x0;
+    fNPoint[i]         = 0x0;
+    fData[i]           = 0x0;
+    fSignal[i]         = 0x0;
+    fnEntriesRM[i]     = 0x0;
+    fnEntriesRMDist[i] = 0x0;
+    fChPedRes[i]       = 0x0;
+    fChNoiseRes[i]     = 0x0;
+    fErrorLocHC[i]     = 0x0;
+    fErrorLocMCM[i]    = 0x0;
+    fErrorLocADC[i]    = 0x0;
+  }
+  for (Int_t i = 0; i < 3; i++) {
+    fGraphPP[i]        = 0x0;
+    fSMLink[i]         = 0x0;
+    fGrLink[i]         = 0x0;
+    fppThresh[i]       = 0;
+    fnPP[i]            = 0;
+    fnLink[i]          = 0;
+  }
+  for (Int_t i = 0; i < 2; i++) {
+    fnErrorHC[i]       = 0;
+    fnErrorMCM[i]      = 0;
+    fnErrorADC[i]      = 0;
+  }
+  for (Int_t i = 0; i < kSM; i++) {
+    fSmNoiseRms[i]     = 0x0;
+    fSmNoiseFit[i]     = 0x0;
+    fSmPP[i]           = 0x0;
+  }
+  for (Int_t i = 0; i < kSM+1; i++) {
+    fNumberADC[i]      = 0x0;
+    fnADCinSM[i]       = 0;
+  }
+  for (Int_t i = 0; i < 1000; i++) {
+    fEvNoDist[i]       = 0;
+  }
+  strncpy(fRefFileName,"",256);
+
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -284,7 +369,8 @@ void AliTRDqaBlackEvents::Reset()
 
 void AliTRDqaBlackEvents::SetRefFile(const char *filename) {
   
-  strcpy(fRefFileName, filename);
+  strncpy(fRefFileName,filename,256);
+
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -666,7 +752,7 @@ void AliTRDqaBlackEvents::Process(const char *filename)
   //
   
   char fn[256];
-  strcpy(fn, filename);
+  strncpy(fn,filename,256);
   
   //AliInfo(Form("FILENAME = %s (%s)\n", filename, fn));
 
index a7f42b65681665537220caff53c4ca4aa977fede..cd71df2007bc7556330f641987adde4335afc06f 100644 (file)
@@ -78,6 +78,10 @@ AliTRDqaRecPoints::AliTRDqaRecPoints(const AliTRDqaRecPoints &/*qa*/) :
   // Copy constructor
   //
 
+  for (Int_t i = 0; i < 540; i++) {
+    fRefHist[i] = 0x0;
+  }
+
 }
 
 //____________________________________________________________________________ 
index 92b7ca20cfe122fd4e7828b49e43646b1b594cad..bad14ab740da8573811ce30a7d98adff950a5740 100644 (file)
@@ -125,6 +125,20 @@ AliTRDtestBeam::AliTRDtestBeam(const char *filename) :
   fEventHeader = new Char_t[fgkEventHeadSize];
   fEventData = new Char_t[fLimit];
 
+  for (Int_t i = 0; i < 1270; i++) {
+    fSi1Address[i] = 0;
+    fSi2Address[i] = 0;
+    fSi1Charge[i]  = 0;
+    fSi2Charge[i]  = 0;
+  }
+
+  for (Int_t j = 0; j < 2; j++) {
+    fX[j]  = 0.0;
+    fY[j]  = 0.0;
+    fQx[j] = 0.0;
+    fQy[j] = 0.0;
+  }
+
 }
 
 //____________________________________________________________________________
@@ -151,6 +165,20 @@ AliTRDtestBeam::AliTRDtestBeam(const AliTRDtestBeam &tb)
   // Copy constructor
   //
 
+  for (Int_t i = 0; i < 1270; i++) {
+    fSi1Address[i] = 0;
+    fSi2Address[i] = 0;
+    fSi1Charge[i]  = 0;
+    fSi2Charge[i]  = 0;
+  }
+
+  for (Int_t j = 0; j < 2; j++) {
+    fX[j]  = 0.0;
+    fY[j]  = 0.0;
+    fQx[j] = 0.0;
+    fQy[j] = 0.0;
+  }
+
 }
 
 //____________________________________________________________________________