updated armory codes
This commit is contained in:
parent
d7c5817fe1
commit
df5ad3947a
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,6 +3,7 @@
|
|||
*.evt.to
|
||||
*.ev2
|
||||
*.log
|
||||
*.pdf
|
||||
|
||||
xia2root
|
||||
xia2ev2*
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
#include <TColor.h>
|
||||
#include <TSpectrum.h>
|
||||
#include <TMath.h>
|
||||
#include <TRandom.h>
|
||||
#include <TLatex.h>
|
||||
#include <TH1.h>
|
||||
#include <TMarker.h>
|
||||
#include <vector>
|
||||
|
||||
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],
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user