Changeset 3247 in Sophya for trunk/SophyaLib/HiStats


Ignore:
Timestamp:
May 15, 2007, 11:49:12 AM (18 years ago)
Author:
cmv
Message:

correction erreur format dans sscanf cmv 15/05/2007

Location:
trunk/SophyaLib/HiStats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/hist2err.cc

    r3236 r3247  
    285285  for(long i=0;i<NBinX();i++) for(long j=0;j<NBinY();j++) {
    286286    // ligne = i*NY+j
    287     fprintf(file,"%d %d %.17e %.17e %.0f\n"
     287    fprintf(file,"%ld %ld %.17e %.17e %.0f\n"
    288288           ,i,j,(*this)(i,j),Error2(i,j),NEntBin(i,j));
    289289  }
     
    313313
    314314      r_8 xmin,xmax,wx, ymin,ymax,wy; long mnmean=1;
    315       sscanf(line,"%d %lf %lf %lf %d %lf %lf %lf %d"
     315      sscanf(line,"%ld %lf %lf %lf %ld %lf %lf %lf %ld"
    316316            ,&nbinx,&xmin,&xmax,&wx
    317317            ,&nbiny,&ymin,&ymax,&wy
     
    327327
    328328      long i,j; r_8 v,e2,nb;
    329       sscanf(line,"%d %d %lf %lf %lf",&i,&j,&v,&e2,&nb);
     329      sscanf(line,"%ld %ld %lf %lf %lf",&i,&j,&v,&e2,&nb);
    330330      SetBin(i,j,v);
    331331      SetErr2(i,j,e2);
  • trunk/SophyaLib/HiStats/histerr.cc

    r3236 r3247  
    292292  fprintf(file,"%ld %.17e %.17e %d\n",(long)NBins(),XMin(),XMax(),NMean());
    293293  for(long i=0;i<NBins();i++) {
    294       fprintf(file,"%d %.17e %.17e %.17e %.0f\n"
     294      fprintf(file,"%ld %.17e %.17e %.17e %.0f\n"
    295295             ,i,BinCenter(i),(*this)(i),Error2(i),NEntBin(i));
    296296  }
     
    320320
    321321      r_8 xmin,xmax; long mnmean=1;
    322       sscanf(line,"%d %lf %lf %d",&nbin,&xmin,&xmax,&mnmean);
     322      sscanf(line,"%ld %lf %lf %ld",&nbin,&xmin,&xmax,&mnmean);
    323323      if(nbin<=0) {
    324324        cout<<"HistoErr::ReadASCII_Error: nbin= "<<nbin<<endl;
     
    331331
    332332      long i; r_8 x,v,e2,nb;
    333       sscanf(line,"%d %lf %lf %lf %lf",&i,&x,&v,&e2,&nb);
     333      sscanf(line,"%ld %lf %lf %lf %lf",&i,&x,&v,&e2,&nb);
    334334      SetBin(i,v);
    335335      SetErr2(i,e2);
Note: See TracChangeset for help on using the changeset viewer.