fixed the tainted variables
authorbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Oct 2010 16:49:15 +0000 (16:49 +0000)
committerbasanta <basanta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Oct 2010 16:49:15 +0000 (16:49 +0000)
PMD/AliPMDCalibGain.cxx

index 2be6a38..c381177 100644 (file)
@@ -245,11 +245,9 @@ void AliPMDCalibGain::ReadTempFile(const Char_t *tempFile)
 {
   // Read the variables from the file
   
-  //  fpw = fopen(tempFile,"r");
+  fpw = fopen(tempFile,"r");
   
-  ifstream intmpfile;
-  intmpfile.open(tempFile);
-
+  Int_t iddet = 0, issm = 0, irrow = 0, iccol = 0;
   Float_t smcount = 0., smiso = 0.;
   Float_t cellcount = 0., celliso = 0.;
 
@@ -258,8 +256,7 @@ void AliPMDCalibGain::ReadTempFile(const Char_t *tempFile)
     {
       for (Int_t ism = 0; ism < kMaxSMN; ism++)
        {
-         //fscanf(fpw,"%d %d %f %f",&idet,&ism,&smcount,&smiso);
-         intmpfile >> idet >> ism >> smcount >> smiso;
+         fscanf(fpw,"%d %d %f %f",&iddet,&issm,&smcount,&smiso);
          fSMCount[idet][ism] = smcount;
          fSMIso[idet][ism]   = smiso;
        }
@@ -273,10 +270,8 @@ void AliPMDCalibGain::ReadTempFile(const Char_t *tempFile)
            {
              for (Int_t icol = 0; icol < kMaxCol; icol++)
                {
-                 //fscanf(fpw,"%d %d %d %d %f %f",&idet,&ism,&irow,&icol,
-                 //     &cellcount,&celliso);
-                 intmpfile >> idet >> ism >> irow >> icol 
-                           >> cellcount >> celliso;
+                 fscanf(fpw,"%d %d %d %d %f %f",&iddet,&issm,&irrow,&iccol,
+                        &cellcount,&celliso);
                  fCellCount[idet][ism][irow][icol] = cellcount;
                  fCellIso[idet][ism][irow][icol]   = celliso;
                }
@@ -284,8 +279,7 @@ void AliPMDCalibGain::ReadTempFile(const Char_t *tempFile)
        }
     }
   
-  //fclose(fpw);
-  intmpfile.close();
+  fclose(fpw);
 
 }
 // ------------------------------------------------------------------------ //