]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSQASDDChecker.cxx
Memory leak correction (savannah #84632) Melinda
[u/mrichter/AliRoot.git] / ITS / AliITSQASDDChecker.cxx
index e50955bbaf42a4405d3cd63819ed210b474ffcd0..6296f4c3e6d63fef5e8a09301aeb3e9e89a11108 100644 (file)
 
 
 ClassImp(AliITSQASDDChecker)
+
+
+
+//_____________________________________________________________________
+
+AliITSQASDDChecker::AliITSQASDDChecker():
+fSubDetOffset(0),
+  fStepBitSDD(NULL),
+  fLowSDDValue(NULL),
+  fHighSDDValue(NULL),
+  fCalibration(NULL),
+  fThresholdForRelativeOccupancy(0.01),
+  fThresholdForRecToRawRatio(0.04),
+  fImage(NULL),
+  fESforCheck(0)
+{
+// Default constructor
+       fStepBitSDD=new Double_t[AliQAv1::kNBIT];
+       fLowSDDValue=new Float_t[AliQAv1::kNBIT];
+       fHighSDDValue=new Float_t[AliQAv1::kNBIT];
+       for(Int_t ibit=0;ibit<AliQAv1::kNBIT;ibit++)
+         {
+           fStepBitSDD[ibit]=0.;
+           fLowSDDValue[ibit]=0.;
+           fHighSDDValue[ibit]=0.;
+         }
+
+}          // ctor
+
+
 //__________________________________________________________________
 AliITSQASDDChecker& AliITSQASDDChecker::operator = (const AliITSQASDDChecker& qac ) 
 {
@@ -1201,7 +1231,8 @@ void AliITSQASDDChecker::SetTaskOffset(Int_t taskoffset)
 void AliITSQASDDChecker::SetStepBit(const Double_t *steprange)
 {
   //set the values of the step bit for each QA bit range calculated in the AliITSQAChecker class
-  fStepBitSDD = new Double_t[AliQAv1::kNBIT];
+  //if(fStepBitSDD){/*delete fStepBitSDD;*/ fStepBitSDD=NULL;}
+  //fStepBitSDD = new Double_t[AliQAv1::kNBIT];
   for(Int_t bit=0;bit<AliQAv1::kNBIT;bit++)
     {
       fStepBitSDD[bit]=steprange[bit];
@@ -1212,8 +1243,8 @@ void AliITSQASDDChecker::SetStepBit(const Double_t *steprange)
 void  AliITSQASDDChecker::SetSDDLimits(const Float_t *lowvalue, const Float_t * highvalue)
 {
   //set the low and high values in for each QA bit range calculated in the AliITSQAChecker class
-  fLowSDDValue = new Float_t[AliQAv1::kNBIT];
-  fHighSDDValue= new Float_t[AliQAv1::kNBIT];
+  //  fLowSDDValue = new Float_t[AliQAv1::kNBIT];
+  //  fHighSDDValue= new Float_t[AliQAv1::kNBIT];
 
   for(Int_t bit=0;bit<AliQAv1::kNBIT;bit++)
     {