#include "AliPMDddldata.h"
#include "AliPMDCalibGain.h"
+using std::ifstream;
ClassImp(AliPMDCalibGain)
AliPMDCalibGain::AliPMDCalibGain():
{
for (Int_t icol = 0; icol < kMaxCol; icol++)
{
- fHotFlag[idet][kMaxSMN][kMaxRow][kMaxCol] = 0.;
+ fHotFlag[idet][ismn][irow][icol] = 0.;
}
}
}
{
// Read the variables from the file
- 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.;
{
for (Int_t ism = 0; ism < kMaxSMN; ism++)
{
- fscanf(fpw,"%d %d %f %f",&iddet,&issm,&smcount,&smiso);
+ intmpfile >> iddet >> issm >> smcount >> smiso;
fSMCount[idet][ism] = smcount;
fSMIso[idet][ism] = smiso;
}
{
for (Int_t icol = 0; icol < kMaxCol; icol++)
{
- fscanf(fpw,"%d %d %d %d %f %f",&iddet,&issm,&irrow,&iccol,
- &cellcount,&celliso);
+ intmpfile >> iddet >> issm >> irrow >> iccol
+ >> cellcount >> celliso;
fCellCount[idet][ism][irow][icol] = cellcount;
fCellIso[idet][ism][irow][icol] = celliso;
}
}
}
- fclose(fpw);
+
+ intmpfile.close();
}
// ------------------------------------------------------------------------ //