diff --git a/.gitignore b/.gitignore index c5d6ad8..460482c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.evt.to *.ev2 *.log +*.pdf xia2root xia2ev2* diff --git a/armory/AutoFit.C b/armory/AutoFit.C index a84d95a..14b7731 100644 --- a/armory/AutoFit.C +++ b/armory/AutoFit.C @@ -15,6 +15,10 @@ #include #include #include +#include +#include +#include +#include #include void showFitMethod(){ @@ -206,7 +210,7 @@ void GoodnessofFit(TH1F * hist, TF1 * fit){ double x = hist->GetBinCenter(i); double ybar = fit->Eval(x); ysq += y*y; - mean + y; + mean += y; SSR += (y - ybar)*(y-ybar); chisq += (y - ybar)*(y-ybar)/e/e; @@ -1951,7 +1955,7 @@ void saveFitPara(TString fileName = "AutoFit_para.txt"){ fprintf(file_out, "# for n-Gauss fit, can use \"#\", or \"//\" to comment out whole line\n"); fprintf(file_out, "# peak low high fixed? sigma_Max fixed? hight\n"); - for( int i = 0 ; i < xPeakList.size() ; i++){ + for( int i = 0 ; i < (int) xPeakList.size() ; i++){ fprintf(file_out, "%.3f %.3f %.3f 0 %.3f 0 %.0f\n", xPeakList[i], xPeakList[i] - 5*sigma[i], diff --git a/armory/DataBlock.h b/armory/DataBlock.h index 8e2ac81..887ea2b 100644 --- a/armory/DataBlock.h +++ b/armory/DataBlock.h @@ -77,7 +77,7 @@ public: } - void Print(){ + void Print(bool printTrace = true){ printf("============== eventID : %llu\n", eventID); printf("Crate: %d, Slot: %d, Ch: %d \n", crate, slot, ch); printf("HeaderLength: %d, Event Length: %d, energy: %d, timeStamp: %llu\n", headerLength, eventLength, energy, time); @@ -92,7 +92,7 @@ public: printf(" QDCsum : \n"); for( int i = 0; i < 8; i++) printf(" %-10d\n", QDCsum[i]); } - if( eventLength > headerLength ){ + if( printTrace && eventLength > headerLength ){ printf(" trace:\n"); for( int i = 0 ; i < trace_length ; i++)printf("%3d| %-10d\n",i, trace[i]); } diff --git a/armory/pxi-fsu-time-order.cpp b/armory/pxi-fsu-time-order.cpp index b3f34eb..de5b12a 100644 --- a/armory/pxi-fsu-time-order.cpp +++ b/armory/pxi-fsu-time-order.cpp @@ -449,11 +449,11 @@ int main(int argc, char **argv) { }else{ if( FillFlag ){ - if ( count < debugCount) printf("----------------- filled \n"); + if ( count < debugCount) printf("----------------- filled %d\n", count); for( i = 0; i < nFill; i++) fwrite(fillevents[i].data, sizeof(unsigned int)*fillevents[i].length, 1, fpw); evts_tot_write += nFill; }else{ - if ( count < debugCount) printf("----------------- dropped \n"); + if ( count < debugCount) printf("----------------- dropped %d\n", count); evts_tot_drop += nFill; }