]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDCalibGain.cxx
fixed the tainted variables
[u/mrichter/AliRoot.git] / PMD / AliPMDCalibGain.cxx
index 2be6a383c7ec886f67205325777214fd3612621f..c381177779d7f96fb946119ca0fe9a8e682f96ed 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);
 
 }
 // ------------------------------------------------------------------------ //