| 6,7 → 6,7 |
| #include "drsread.h" |
| |
| static int daq_on; |
| static int ph, plothandle[4]; |
| static int ph, plothandle; |
| static int tfID; |
| static int controlID; |
| |
| 131,8 → 131,9 |
| if (!daq_on) break; |
| time(&t); |
| if (t!=told ) { |
| printf("%d events in %2.2f min (%d s) %s",i+1, (double)(t-tstart)/60.,(t-tstart), ctime(&t)); |
| } |
| printf("%d events in %2.2f min (%d s) %s",i+1, (double)(t-tstart)/60.,(t-tstart), ctime(&t)); |
| |
| } |
| told=t; |
| // Save data |
| if (nb>0 && fp) fwrite(buffer, 1,nb ,fp); |
| 142,18 → 143,21 |
| float *t=DRSGetTime(k); |
| float *x=DRSGetWave(k); |
| |
| const int col[4]={VAL_BLACK,VAL_RED,VAL_GREEN,VAL_BLUE}; |
| if (plothandle[k]) DeleteGraphPlot (ph, PANEL_GRAPH, plothandle[k], VAL_DELAYED_DRAW); |
| plothandle[k] = PlotXY (ph, PANEL_GRAPH, t, x, 1024, VAL_FLOAT, VAL_FLOAT, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, col[k]); |
| |
| for (int i=0 ; i<1024 ; i++) { |
| if (!k){ |
| if (plothandle) DeleteGraphPlot (ph, PANEL_GRAPH, plothandle, VAL_DELAYED_DRAW); |
| plothandle = PlotXY (ph, PANEL_GRAPH, t, x, 1024, VAL_FLOAT, VAL_FLOAT, VAL_THIN_LINE, VAL_NO_POINT, VAL_SOLID, 1, VAL_BLUE); |
| } |
| |
| |
| for (int i=0 ; i<1024 ; i++) { |
| if (verbose) printf("[%d] %d. x= %3.2f y=%3.2f\n", k, i, t[i], x[i] ); |
| //h[k]->Fill( t[i], x[i]*1e-3); |
| } |
| } |
| } |
| time(&t); |
| printf("%d events in %2.2f min (%d s) %s",i+1, (double)(t-tstart)/60.,t-tstart, ctime(&t)); |
| } |
| |
| DRSEnd(); |
| } |
| |