//
//////////////////////////////////////////////////////////////////////////////
+#include "Riostream.h"
#include "TF1.h"
#include "TFile.h"
#include "TObjString.h"
for (Int_t idet = 0; idet < kDet; idet++)
{
- for (Int_t ismn = 0; ismn < kMaxSMN; idet++)
+ for (Int_t ismn = 0; ismn < kMaxSMN; ismn++)
{
- for (Int_t irow = 0; irow < kMaxRow; idet++)
+ for (Int_t irow = 0; irow < kMaxRow; irow++)
{
- for (Int_t icol = 0; icol < kMaxCol; idet++)
+ 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",&idet,&ism,&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",&idet,&ism,&irow,&icol,
- &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();
}
// ------------------------------------------------------------------------ //