... and Coverity stuff ...
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Oct 2010 13:27:43 +0000 (13:27 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Oct 2010 13:27:43 +0000 (13:27 +0000)
TRD/AliTRDQADataMakerRec.cxx
TRD/AliTRDTriggerL0.cxx
TRD/AliTRDTriggerL1.cxx
TRD/AliTRDalignment.cxx
TRD/AliTRDclusterizer.cxx
TRD/AliTRDpropagationLayer.cxx
TRD/AliTRDqaBlackEvents.cxx
TRD/AliTRDqaRecPoints.cxx
TRD/AliTRDrawData.cxx
TRD/AliTRDrawStream.cxx
TRD/AliTRDtestBeam.cxx

index 364d84f..c9b345d 100644 (file)
@@ -728,7 +728,6 @@ void AliTRDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
 
   const Int_t baseline = 10;
 
-
   // configure the reader
   rawReader->Reset();
   rawReader->SelectEquipment(0, 1024, 1041);
@@ -808,12 +807,10 @@ void AliTRDQADataMakerRec::MakeRaws(AliRawReader* rawReader)
     }    
   }
   
-  if (fErrorContainer){
-    delete [] fErrorContainer[0];
-    delete [] fErrorContainer[1];
-    delete [] fErrorContainer;
-    fErrorContainer = NULL;
-  }
+  delete [] fErrorContainer[0];
+  delete [] fErrorContainer[1];
+  delete [] fErrorContainer;
+  fErrorContainer = NULL;
   
   delete digitsManager;  
   delete data;
index c0976d6..73224b5 100644 (file)
@@ -70,6 +70,9 @@ void AliTRDTriggerL0::Trigger()
 
   Int_t* simulationResult;
   simulationResult = ptrgCBB->Simulate();
+  if (!simulationResult) {
+    return;
+  }
   for (Int_t iResult = 1; iResult <= simulationResult[0]; iResult++) {
     AliDebug(5, Form("Result[%d]=0x%x\n",iResult,simulationResult[iResult]));
   }
@@ -89,8 +92,7 @@ void AliTRDTriggerL0::Trigger()
   }
 
   delete ptrgCBB;
-  if (simulationResult != 0x0)
-    delete[] simulationResult;
+  delete[] simulationResult;
   simulationResult = 0x0;
 
   AliDebug(5, Form("memory state: %d", param->CheckVariables()));
index 5990002..e813a32 100644 (file)
@@ -108,6 +108,8 @@ void AliTRDTriggerL1::Trigger()
     // jet trigger
     Int_t nTracks1[90]; // tracks above lower pt threshold
     Int_t nTracks2[90]; // tracks above higher pt threshold
+    memset(nTracks1,0,sizeof(Int_t)*90);
+    memset(nTracks2,0,sizeof(Int_t)*90);
     for (Int_t iTrack = 0; iTrack < trackTree->GetEntriesFast(); iTrack++) {
       trackTree->GetEntry(iTrack);
       if (TMath::Abs(trk->GetPt()) > ptThreshold1)
index d54442b..b2bc442 100644 (file)
@@ -146,6 +146,11 @@ AliTRDalignment::AliTRDalignment()
     fSurveyZ0[j][k][l] = z[k];
   }
 
+  for (int i=0; i<1000; i++) {
+    fIbuffer[i] = 0;
+    fDbuffer[i] = 0.0;
+  }
+
 }
 
 //_____________________________________________________________________________
index 1f962a9..5c4a8b5 100644 (file)
@@ -97,11 +97,6 @@ AliTRDclusterizer::AliTRDclusterizer(const AliTRDReconstructor *const rec)
   SetBit(kLabels, kTRUE);
   SetBit(knewDM, kFALSE);
 
-  AliTRDcalibDB *trd = 0x0;
-  if (!(trd = AliTRDcalibDB::Instance())) {
-    AliFatal("Could not get calibration object");
-  }
-
   fRawVersion = AliTRDfeeParam::Instance()->GetRAWversion();
 
   // Initialize debug stream
index b8df200..13f65d7 100644 (file)
@@ -62,6 +62,13 @@ AliTRDpropagationLayer::AliTRDpropagationLayer()
   // Default constructor
   //
 
+  for (Int_t iZones = 0; iZones < (Int_t)kZones; iZones++) {
+    fZc[iZones]            = 0.0;
+    fZmax[iZones]          = 0.0;
+    fZmaxSensitive[iZones] = 0.0;
+    fIsHole[iZones]        = kFALSE;   
+  }
+
 }
 
 //_____________________________________________________________________________
index 8ba75f8..cdabcf6 100644 (file)
@@ -84,7 +84,7 @@ AliTRDqaBlackEvents::AliTRDqaBlackEvents()
   // to create the histograms call Init()
   //
 
-  strcpy(fRefFileName, "");
+  strncpy(fRefFileName,"",256);
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
index 30b2cc1..a7f42b6 100644 (file)
@@ -59,6 +59,10 @@ AliTRDqaRecPoints::AliTRDqaRecPoints() :
   // Default constructor
   //
 
+  for (Int_t i = 0; i < 540; i++) {
+    fRefHist[i] = 0x0;
+  }
+
 }
 
 //____________________________________________________________________________ 
index 37e4150..f0cfbde 100644 (file)
@@ -192,7 +192,7 @@ Bool_t AliTRDrawData::Digits2Raw(AliTRDdigitsManager *digitsManager)
   for (Int_t sect = 0; sect < fGeo->Nsector(); sect++) { 
 
     char name[1024];
-    sprintf(name,"TRD_%d.ddl",sect + AliTRDrawStreamBase::kDDLOffset);
+    snprintf(name,1024,"TRD_%d.ddl",sect + AliTRDrawStreamBase::kDDLOffset);
 
     AliFstream* of = new AliFstream(name);
 
index 079b2e1..6b0d26d 100644 (file)
@@ -201,6 +201,10 @@ AliTRDrawStream::AliTRDrawStream(AliRawReader *rawReader) :
   fErrors->SetDirectory(0x0);
   fErrors->Branch("error", &fLastError);
   fErrors->SetCircular(1000);
+  for (Int_t i = 0; i < 100; i++) {
+    fErrorBuffer[i] = 0;
+  }
+
 }
 
 AliTRDrawStream::~AliTRDrawStream()
index a4949d7..92b7ca2 100644 (file)
@@ -78,6 +78,20 @@ AliTRDtestBeam::AliTRDtestBeam() :
   // Standard construction
   //
 
+  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;
+  }
+
 }
 //____________________________________________________________________________ 
 AliTRDtestBeam::AliTRDtestBeam(const char *filename) :