#include "sopnamsp.h" #include "machdefs.h" #include #include #include #include #include #include #include "timing.h" #include "hisprof.h" void usage(void); void usage(void) { cout<<"cmvconchprof -n namehprof file1.ppf file2.ppf ..."< ppfname; // --- Decodage arguments char c; while((c = getopt(narg,arg,"hn:")) != -1) { switch (c) { case 'n' : nameh = optarg; break; case 'h' : default : usage(); return -1; } } if(nameh.size()<=0 || optind>=narg) {usage(); return -1;} for (int i=optind;iAddBin(i,hp(i)); sum+=hp(itest); sum2+=hp(itest)*hp(itest), nsum++; } hpconc->UpdateHisto(true); if(nsum>0) {sum/=nsum; sum2/=nsum; sum2-=sum*sum;} cout<<"Test bin "< variance_pkz\n"); for(int i=0;iNBins();i++) { double k = hpconc->BinCenter(i); fprintf(fdata,"%e %e %e\n",k,(*hpconc)(i),hpconc->Error2(i)); } fclose(fdata); } // --- ecriture ppf string tagobs = "cmvconchprof.ppf"; POutPersist posobs(tagobs); tagobs = "hpconc"; posobs.PutObject(*hpconc,tagobs); delete hpconc; return 0; } /* openppf cmvconchprof.ppf disp hpconc n/plot hpconc.val%log10(x) x>0 ! "connectpoints" n/plot hpconc.err%log10(x) x>0 ! "connectpoints same red" n/plot hpconc.err/val%log10(x) x>0&&val>0 ! "connectpoints" */