Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 322 → Rev 321

/cvi/apps/RedPitaya/soccli/install.bat
File deleted
\ No newline at end of file
/cvi/apps/RedPitaya/soccli/soccli.cds
File deleted
/cvi/apps/RedPitaya/soccli/redpitaya_gui.h
14,96 → 14,84
/* Panels and Controls: */
 
#define PANEL 1
#define PANEL_HRESET 2 /* control type: command, callback function: ResetCB */
#define PANEL_EXIT 3 /* control type: command, callback function: ExitCB */
#define PANEL_TIMER 4 /* control type: timer, callback function: (none) */
#define PANEL_DAQEFF 5 /* control type: numeric, callback function: (none) */
#define PANEL_CTIME 6 /* control type: numeric, callback function: (none) */
#define PANEL_CDAQTIME 7 /* control type: numeric, callback function: (none) */
#define PANEL_CEVE 8 /* control type: numeric, callback function: (none) */
#define PANEL_OUTWAVE 9 /* control type: radioButton, callback function: (none) */
#define PANEL_GRAPH 10 /* control type: graph, callback function: (none) */
#define PANEL_MAXX_6 11 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_6 12 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_5 13 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_5 14 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_CONNECT 15 /* control type: textButton, callback function: StartCB */
#define PANEL_START 16 /* control type: textButton, callback function: StartCB */
#define PANEL_ADCTYPE 17 /* control type: binary, callback function: (none) */
#define PANEL_AUTOY 18 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_AUTOX 19 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_TAB 20 /* control type: tab, callback function: (none) */
#define PANEL_DECORATION 21 /* control type: deco, callback function: (none) */
#define PANEL_DECORATION_2 22 /* control type: deco, callback function: (none) */
#define PANEL_EXPORT_4 2 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_2 3 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_1 4 /* control type: command, callback function: ExportCB */
#define PANEL_EXPORT_3 5 /* control type: command, callback function: ExportCB */
#define PANEL_HRESET 6 /* control type: command, callback function: ResetCB */
#define PANEL_EXIT 7 /* control type: command, callback function: ExitCB */
#define PANEL_IP 8 /* control type: string, callback function: (none) */
#define PANEL_FILENAME 9 /* control type: string, callback function: (none) */
#define PANEL_TIMER 10 /* control type: timer, callback function: (none) */
#define PANEL_TWIN1 11 /* control type: numeric, callback function: (none) */
#define PANEL_TWIN0 12 /* control type: numeric, callback function: (none) */
#define PANEL_ITRGLEVEL 13 /* control type: numeric, callback function: (none) */
#define PANEL_TRGLEVEL 14 /* control type: numeric, callback function: (none) */
#define PANEL_EXPORTNAME 15 /* control type: string, callback function: (none) */
#define PANEL_FILETYPE 16 /* control type: ring, callback function: (none) */
#define PANEL_PFREQ 17 /* control type: numeric, callback function: (none) */
#define PANEL_NBEFORE 18 /* control type: numeric, callback function: (none) */
#define PANEL_SAMPLES 19 /* control type: numeric, callback function: (none) */
#define PANEL_NTOTAL 20 /* control type: numeric, callback function: (none) */
#define PANEL_NEVE 21 /* control type: numeric, callback function: (none) */
#define PANEL_CTIME 22 /* control type: numeric, callback function: (none) */
#define PANEL_CDAQTIME 23 /* control type: numeric, callback function: (none) */
#define PANEL_CEVE 24 /* control type: numeric, callback function: (none) */
#define PANEL_ADC2 25 /* control type: graph, callback function: (none) */
#define PANEL_TDC2 26 /* control type: graph, callback function: (none) */
#define PANEL_ADC1 27 /* control type: graph, callback function: (none) */
#define PANEL_TDC1 28 /* control type: graph, callback function: (none) */
#define PANEL_DECIMATION 29 /* control type: ring, callback function: (none) */
#define PANEL_TRIGGER 30 /* control type: ring, callback function: (none) */
#define PANEL_OUTWAVE 31 /* control type: radioButton, callback function: (none) */
#define PANEL_ENABLEDOUTPUT 32 /* control type: radioButton, callback function: (none) */
#define PANEL_DEBUG 33 /* control type: radioButton, callback function: (none) */
#define PANEL_CH1 34 /* control type: radioButton, callback function: (none) */
#define PANEL_GRAPH 35 /* control type: graph, callback function: (none) */
#define PANEL_CH0 36 /* control type: radioButton, callback function: (none) */
#define PANEL_TEXTMSG 37 /* control type: textMsg, callback function: (none) */
#define PANEL_STDIO 38 /* control type: textBox, callback function: (none) */
#define PANEL_MAXX_3 39 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_3 40 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_3 41 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_4 42 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_4 43 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_4 44 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_2 45 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_2 46 /* control type: numeric, callback function: (none) */
#define PANEL_NCH_2 47 /* control type: numeric, callback function: (none) */
#define PANEL_MAXX_6 48 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_6 49 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_10 50 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_10 51 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_9 52 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_9 53 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_8 54 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_8 55 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_7 56 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_7 57 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_5 58 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_MINX_5 59 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define PANEL_AUTOY_5 60 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_MAXX_1 61 /* control type: numeric, callback function: (none) */
#define PANEL_MINX_1 62 /* control type: numeric, callback function: (none) */
#define PANEL_AUTOY_4 63 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_NCH_1 64 /* control type: numeric, callback function: (none) */
#define PANEL_CONNECT 65 /* control type: textButton, callback function: StartCB */
#define PANEL_AUTOY_3 66 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_AUTOY_2 67 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_START 68 /* control type: textButton, callback function: StartCB */
#define PANEL_ADCTYPE 69 /* control type: binary, callback function: (none) */
#define PANEL_AUTOY 70 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define PANEL_LOGY_4 71 /* control type: radioButton, callback function: SetGraphLogYCB */
#define PANEL_LOGY_3 72 /* control type: radioButton, callback function: SetGraphLogYCB */
#define PANEL_LOGY_2 73 /* control type: radioButton, callback function: SetGraphLogYCB */
#define PANEL_EXCLUDE_2 74 /* control type: radioButton, callback function: (none) */
#define PANEL_EXCLUDE_1 75 /* control type: radioButton, callback function: (none) */
#define PANEL_LOGY_1 76 /* control type: radioButton, callback function: SetGraphLogYCB */
#define PANEL_AUTOX 77 /* control type: radioButton, callback function: SetGraphPropertiesCB */
 
/* tab page panel controls */
#define CH0_EXPORT_1 2 /* control type: command, callback function: ExportCB */
#define CH0_EXPORT_3 3 /* control type: command, callback function: ExportCB */
#define CH0_ADC1 4 /* control type: graph, callback function: (none) */
#define CH0_TDC1 5 /* control type: graph, callback function: (none) */
#define CH0_MAXX_3 6 /* control type: numeric, callback function: (none) */
#define CH0_MINX_3 7 /* control type: numeric, callback function: (none) */
#define CH0_NCH_3 8 /* control type: numeric, callback function: (none) */
#define CH0_MAXX_8 9 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH0_MINX_8 10 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH0_MAXX_7 11 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH0_MINX_7 12 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH0_MAXX_1 13 /* control type: numeric, callback function: (none) */
#define CH0_MINX_1 14 /* control type: numeric, callback function: (none) */
#define CH0_NCH_1 15 /* control type: numeric, callback function: (none) */
#define CH0_AUTOY_3 16 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define CH0_AUTOY_2 17 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define CH0_LOGY_2 18 /* control type: radioButton, callback function: SetGraphLogYCB */
#define CH0_EXCLUDE_1 19 /* control type: radioButton, callback function: (none) */
#define CH0_LOGY_1 20 /* control type: radioButton, callback function: SetGraphLogYCB */
 
/* tab page panel controls */
#define CH1_EXPORT_4 2 /* control type: command, callback function: ExportCB */
#define CH1_ADC2 3 /* control type: graph, callback function: (none) */
#define CH1_EXPORT_2 4 /* control type: command, callback function: ExportCB */
#define CH1_MAXX_2 5 /* control type: numeric, callback function: (none) */
#define CH1_MINX_2 6 /* control type: numeric, callback function: (none) */
#define CH1_NCH_2 7 /* control type: numeric, callback function: (none) */
#define CH1_MAXX_10 8 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH1_MINX_10 9 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH1_AUTOY_5 10 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define CH1_LOGY_4 11 /* control type: radioButton, callback function: SetGraphLogYCB */
#define CH1_TDC2 12 /* control type: graph, callback function: (none) */
#define CH1_MAXX_4 13 /* control type: numeric, callback function: (none) */
#define CH1_MINX_4 14 /* control type: numeric, callback function: (none) */
#define CH1_NCH_4 15 /* control type: numeric, callback function: (none) */
#define CH1_MAXX_9 16 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH1_MINX_9 17 /* control type: numeric, callback function: SetGraphPropertiesCB */
#define CH1_AUTOY_4 18 /* control type: radioButton, callback function: SetGraphPropertiesCB */
#define CH1_LOGY_3 19 /* control type: radioButton, callback function: SetGraphLogYCB */
#define CH1_EXCLUDE_2 20 /* control type: radioButton, callback function: (none) */
 
/* tab page panel controls */
#define OUTPUT_STDIO 2 /* control type: textBox, callback function: (none) */
 
/* tab page panel controls */
#define SETTINGS_PFREQ 2 /* control type: numeric, callback function: (none) */
#define SETTINGS_TWIN1 3 /* control type: numeric, callback function: (none) */
#define SETTINGS_IP 4 /* control type: string, callback function: (none) */
#define SETTINGS_NEVE 5 /* control type: numeric, callback function: (none) */
#define SETTINGS_NTOTAL 6 /* control type: numeric, callback function: (none) */
#define SETTINGS_FILETYPE 7 /* control type: ring, callback function: (none) */
#define SETTINGS_EXPORTNAME 8 /* control type: string, callback function: (none) */
#define SETTINGS_CH1 9 /* control type: radioButton, callback function: (none) */
#define SETTINGS_NBEFORE 10 /* control type: numeric, callback function: (none) */
#define SETTINGS_CH0 11 /* control type: radioButton, callback function: (none) */
#define SETTINGS_TEXTMSG 12 /* control type: textMsg, callback function: (none) */
#define SETTINGS_FILENAME 13 /* control type: string, callback function: (none) */
#define SETTINGS_TWIN0 14 /* control type: numeric, callback function: (none) */
#define SETTINGS_SAMPLES 15 /* control type: numeric, callback function: (none) */
#define SETTINGS_DECIMATION 16 /* control type: ring, callback function: (none) */
#define SETTINGS_ITRGLEVEL 17 /* control type: numeric, callback function: (none) */
#define SETTINGS_TRIGGER 18 /* control type: ring, callback function: (none) */
#define SETTINGS_TRGLEVEL 19 /* control type: numeric, callback function: (none) */
#define SETTINGS_DEBUG 20 /* control type: radioButton, callback function: (none) */
#define SETTINGS_ENABLEDOUTPUT 21 /* control type: radioButton, callback function: (none) */
 
 
/* Control Arrays: */
 
/* (no control arrays in the resource file) */
/cvi/apps/RedPitaya/soccli/redpitaya_gui.uir
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/cvi/apps/RedPitaya/soccli/soccli.c
16,11 → 16,6
 
static int panelHandle;
 
static int outputHandle;
static int settingsHandle;
static int ch0Handle;
static int ch1Handle;
 
static unsigned int chandle = 0;
//static int tfID;
int pfreq;
53,40 → 48,31
 
char filename[0xFF],rootcmd[0xFF];
char fname[0xFF];
char path[0xFF];
char datestr[0xFF];
int type=0;
 
GetCtrlVal(settingsHandle,SETTINGS_EXPORTNAME,fname);
GetCtrlVal(settingsHandle,SETTINGS_FILETYPE,&type);
sprintf(path, "%s\\Desktop\\data", getenv("USERPROFILE"));
MakeDir (path);
GetCtrlVal(panelHandle,PANEL_EXPORTNAME,fname);
GetCtrlVal(panelHandle,PANEL_FILETYPE,&type);
 
FILE *fp;
int hour, min, month, day,year;
double sec;
double mtime;
GetCurrentDateTime (&mtime);
GetDateTimeElements (mtime, &hour, &min, &sec, &month, &day, &year);
sprintf(datestr,"%02d_%02d_%02d", hour, min, (int) sec );
 
switch (type) {
case 0:
case 1:
sprintf(filename,"%s\\%s_%d_%s.dat",path, fname, hid, datestr);
sprintf(filename,"%s_%d.root",fname, hid);
fp =fopen(filename,"wb");
if (fp) {
H1D_Write2File(hid,fp);
fclose(fp);
if (type) {
sprintf(rootcmd ,"thisroot.bat && root.exe C:/home/cvi/apps/RedPitaya/soccli/H1Dload.cxx(\\\"%s_%d_%s.dat\\\")", fname, hid, datestr);
sprintf(rootcmd ,"thisroot.bat && root.exe H1Dload.cxx(\\\"%s\\\")", filename);
LaunchExecutable(rootcmd);
 
}
printf("Histogram %d exported to %s \n%s\n", hid, filename, rootcmd);
printf("Histogram %d exported to %s\n", hid, filename);
}
break;
case 2:
sprintf(filename,"%s\\%s_%d_%s.txt",path, fname, hid, datestr);
sprintf(filename,"%s_%d.txt",fname, hid);
fp=fopen(filename,"w");
if (fp) {
for (int i=0; i<H1D_GetNbinsX(hid); i++) fprintf(fp,"%g\t%g\n", H1D_GetXBinCenter(hid,i), H1D_GetBinContent(hid,i) );
108,11 → 94,8
return -1; /* out of memory */
if ((panelHandle = LoadPanel (0, "redpitaya_gui.uir", PANEL)) < 0)
return -1;
GetPanelHandleFromTabPage (panelHandle, PANEL_TAB, 0, &settingsHandle);
GetPanelHandleFromTabPage (panelHandle, PANEL_TAB, 1, &outputHandle);
GetPanelHandleFromTabPage (panelHandle, PANEL_TAB, 2, &ch0Handle);
GetPanelHandleFromTabPage (panelHandle, PANEL_TAB, 3, &ch1Handle);
 
 
SetStdioPort (CVI_STDIO_WINDOW);
SetSleepPolicy(VAL_SLEEP_MORE);
CmtNewThreadPool (MAX_THREADS, &poolHandle);
139,7 → 122,7
va_start(aptr, format);
ret = vsprintf(strbuf, format, aptr);
va_end(aptr);
SetCtrlVal(outputHandle,OUTPUT_STDIO,strbuf);
SetCtrlVal(panelHandle,PANEL_STDIO,strbuf);
 
if (gLog) {
flog = fopen ("stdio.log", "a");
158,28 → 141,20
switch (event) {
case EVENT_COMMIT:
GetCtrlVal(panel,control, &logy);
if (panel== ch0Handle){
switch (control) {
case CH0_LOGY_1:
cid = CH0_TDC1;
break;
case CH0_LOGY_2:
cid = CH0_ADC1;
break;
 
}
switch (control) {
case PANEL_LOGY_1:
cid = PANEL_TDC1;
break;
case PANEL_LOGY_2:
cid = PANEL_ADC1;
break;
case PANEL_LOGY_3:
cid = PANEL_TDC2;
break;
case PANEL_LOGY_4:
cid = PANEL_ADC2;
break;
}
if (panel == ch1Handle){
switch (control) {
 
case CH1_LOGY_3:
cid = CH1_TDC2;
break;
case CH1_LOGY_4:
cid = CH1_ADC2;
break;
}
}
if (logy) SetCtrlAttribute (panel, cid, ATTR_YMAP_MODE, VAL_LOG);
else SetCtrlAttribute (panel, cid, ATTR_YMAP_MODE, VAL_LINEAR);
break;
192,7 → 167,6
 
float min, max;
int autoscale;
switch (event) {
case EVENT_COMMIT:
GetCtrlVal(panelHandle,PANEL_MINX_5, &min);
212,37 → 186,37
SetAxisScalingMode (panelHandle, PANEL_GRAPH, VAL_BOTTOM_XAXIS, VAL_MANUAL, min, max);
 
 
GetCtrlVal(ch0Handle,CH0_MINX_7, &min);
GetCtrlVal(ch0Handle,CH0_MAXX_7, &max);
GetCtrlVal(ch0Handle,CH0_AUTOY_2, &autoscale);
GetCtrlVal(panelHandle,PANEL_MINX_7, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_7, &max);
GetCtrlVal(panelHandle,PANEL_AUTOY_2, &autoscale);
if (autoscale)
SetAxisScalingMode (ch0Handle, CH0_TDC1, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
SetAxisScalingMode (panelHandle, PANEL_TDC1, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
else
SetAxisScalingMode (ch0Handle, CH0_TDC1, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
SetAxisScalingMode (panelHandle, PANEL_TDC1, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
 
GetCtrlVal(ch0Handle,CH0_MINX_8, &min);
GetCtrlVal(ch0Handle,CH0_MAXX_8, &max);
GetCtrlVal(ch0Handle,CH0_AUTOY_3, &autoscale);
GetCtrlVal(panelHandle,PANEL_MINX_8, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_8, &max);
GetCtrlVal(panelHandle,PANEL_AUTOY_3, &autoscale);
if (autoscale)
SetAxisScalingMode (ch0Handle, CH0_ADC1, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
SetAxisScalingMode (panelHandle, PANEL_ADC1, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
else
SetAxisScalingMode (ch0Handle, CH0_ADC1, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
SetAxisScalingMode (panelHandle, PANEL_ADC1, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
 
GetCtrlVal(ch1Handle,CH1_MINX_9, &min);
GetCtrlVal(ch1Handle,CH1_MAXX_9, &max);
GetCtrlVal(ch1Handle,CH1_AUTOY_4, &autoscale);
GetCtrlVal(panelHandle,PANEL_MINX_9, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_9, &max);
GetCtrlVal(panelHandle,PANEL_AUTOY_4, &autoscale);
if (autoscale)
SetAxisScalingMode (ch1Handle, CH1_TDC2, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
SetAxisScalingMode (panelHandle, PANEL_TDC2, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
else
SetAxisScalingMode (ch1Handle, CH1_TDC2, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
SetAxisScalingMode (panelHandle, PANEL_TDC2, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
 
GetCtrlVal(ch1Handle,CH1_MINX_10, &min);
GetCtrlVal(ch1Handle,CH1_MAXX_10, &max);
GetCtrlVal(ch1Handle,CH1_AUTOY_5, &autoscale);
GetCtrlVal(panelHandle,PANEL_MINX_10, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_10, &max);
GetCtrlVal(panelHandle,PANEL_AUTOY_5, &autoscale);
if (autoscale)
SetAxisScalingMode (ch1Handle, CH1_ADC2, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
SetAxisScalingMode (panelHandle, PANEL_ADC2, VAL_LEFT_YAXIS, VAL_AUTOSCALE, min, max);
else
SetAxisScalingMode (ch1Handle, CH1_ADC2, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
SetAxisScalingMode (panelHandle, PANEL_ADC2, VAL_LEFT_YAXIS, VAL_MANUAL, min, max);
 
 
 
256,51 → 230,51
int nch;
float min,max;
 
GetCtrlVal(ch0Handle,CH0_NCH_1, &nch);
GetCtrlVal(ch0Handle,CH0_MINX_1, &min);
GetCtrlVal(ch0Handle,CH0_MAXX_1, &max);
GetCtrlVal(panelHandle,PANEL_NCH_1, &nch);
GetCtrlVal(panelHandle,PANEL_MINX_1, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_1, &max);
 
H1D_Init(1, "ADC ch 1","Pulse height", nch, min, max );
H1D_SetTitleX(1,"ADC (V)");
H1D_SetTitleY(1,"N");
 
GetCtrlVal(ch1Handle,CH1_NCH_2, &nch);
GetCtrlVal(ch1Handle,CH1_MINX_2, &min);
GetCtrlVal(ch1Handle,CH1_MAXX_2, &max);
GetCtrlVal(panelHandle,PANEL_NCH_2, &nch);
GetCtrlVal(panelHandle,PANEL_MINX_2, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_2, &max);
 
H1D_Init(2, "ADC ch 2","Pulse height", nch, min, max );
H1D_SetTitleX(2,"ADC (V)");
H1D_SetTitleY(2,"N");
 
GetCtrlVal(ch0Handle,CH0_NCH_3, &nch);
GetCtrlVal(ch0Handle,CH0_MINX_3, &min);
GetCtrlVal(ch0Handle,CH0_MAXX_3, &max);
GetCtrlVal(panelHandle,PANEL_NCH_3, &nch);
GetCtrlVal(panelHandle,PANEL_MINX_3, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_3, &max);
 
H1D_Init(3, "TDC ch 1","TDC", nch, min, max );
H1D_SetTitleX(3,"TDC (us)");
H1D_SetTitleY(3,"N");
 
GetCtrlVal(ch1Handle,CH1_NCH_4, &nch);
GetCtrlVal(ch1Handle,CH1_MINX_4, &min);
GetCtrlVal(ch1Handle,CH1_MAXX_4, &max);
GetCtrlVal(panelHandle,PANEL_NCH_4, &nch);
GetCtrlVal(panelHandle,PANEL_MINX_4, &min);
GetCtrlVal(panelHandle,PANEL_MAXX_4, &max);
 
H1D_Init(4, "TDC ch 2","TDC", nch, min, max );
H1D_SetTitleX(4,"TDC (us)");
H1D_SetTitleY(4,"N");
 
SetCtrlAttribute (ch0Handle, CH0_ADC1, ATTR_XNAME, H1D_GetTitleX(1) );
SetCtrlAttribute (ch0Handle, CH0_ADC1, ATTR_YNAME, H1D_GetTitleY(1) );
SetCtrlAttribute (ch1Handle, CH1_ADC2, ATTR_XNAME, H1D_GetTitleX(2) );
SetCtrlAttribute (ch1Handle, CH1_ADC2, ATTR_YNAME, H1D_GetTitleY(2) );
SetCtrlAttribute (panelHandle, PANEL_ADC1, ATTR_XNAME, H1D_GetTitleX(1) );
SetCtrlAttribute (panelHandle, PANEL_ADC1, ATTR_YNAME, H1D_GetTitleY(1) );
SetCtrlAttribute (panelHandle, PANEL_ADC2, ATTR_XNAME, H1D_GetTitleX(2) );
SetCtrlAttribute (panelHandle, PANEL_ADC2, ATTR_YNAME, H1D_GetTitleY(2) );
 
SetCtrlAttribute (ch0Handle, CH0_TDC1, ATTR_XNAME, H1D_GetTitleX(3) );
SetCtrlAttribute (ch0Handle, CH0_TDC1, ATTR_YNAME, H1D_GetTitleY(3) );
SetCtrlAttribute (ch1Handle, CH1_TDC2, ATTR_XNAME, H1D_GetTitleX(4) );
SetCtrlAttribute (ch1Handle, CH1_TDC2, ATTR_YNAME, H1D_GetTitleY(4) );
SetGraphLogYCB( ch0Handle, CH0_LOGY_1, EVENT_COMMIT,NULL,0,0);
SetGraphLogYCB( ch0Handle, CH0_LOGY_2, EVENT_COMMIT,NULL,0,0);
SetGraphLogYCB( ch1Handle, CH1_LOGY_3, EVENT_COMMIT,NULL,0,0);
SetGraphLogYCB( ch1Handle, CH1_LOGY_4, EVENT_COMMIT,NULL,0,0);
SetCtrlAttribute (panelHandle, PANEL_TDC1, ATTR_XNAME, H1D_GetTitleX(3) );
SetCtrlAttribute (panelHandle, PANEL_TDC1, ATTR_YNAME, H1D_GetTitleY(3) );
SetCtrlAttribute (panelHandle, PANEL_TDC2, ATTR_XNAME, H1D_GetTitleX(4) );
SetCtrlAttribute (panelHandle, PANEL_TDC2, ATTR_YNAME, H1D_GetTitleY(4) );
SetGraphLogYCB( panelHandle, PANEL_LOGY_1, EVENT_COMMIT,NULL,0,0);
SetGraphLogYCB( panelHandle, PANEL_LOGY_2, EVENT_COMMIT,NULL,0,0);
SetGraphLogYCB( panelHandle, PANEL_LOGY_3, EVENT_COMMIT,NULL,0,0);
SetGraphLogYCB( panelHandle, PANEL_LOGY_4, EVENT_COMMIT,NULL,0,0);
 
SetGraphPropertiesCB( panelHandle, PANEL, EVENT_COMMIT,NULL,0,0);
 
308,10 → 282,10
SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_XNAME, "t(us)" );
SetCtrlAttribute (panelHandle, PANEL_GRAPH, ATTR_YNAME, "U(V)" );
 
GetCtrlVal(settingsHandle,SETTINGS_TWIN0, &twin0);
GetCtrlVal(settingsHandle,SETTINGS_TWIN1, &twin1);
GetCtrlVal(panelHandle,PANEL_TWIN0, &twin0);
GetCtrlVal(panelHandle,PANEL_TWIN1, &twin1);
GetCtrlVal(panelHandle,PANEL_ADCTYPE, &adctype);
GetCtrlVal(settingsHandle,SETTINGS_ITRGLEVEL , &athreshold);
GetCtrlVal(panelHandle,PANEL_ITRGLEVEL , &athreshold);
return 0;
}
 
330,10 → 304,8
daqtime += fbuf[2];
 
SetCtrlVal(panelHandle, PANEL_CDAQTIME,daqtime);
float ctime = Timer() -starttime;
SetCtrlVal(panelHandle, PANEL_CTIME, ctime);
if (ctime>0)SetCtrlVal(panelHandle, PANEL_DAQEFF, daqtime/ctime);
//daqtime =0;
SetCtrlVal(panelHandle, PANEL_CTIME, Timer() -starttime);
daqtime =0;
while (nr<nb) {
 
int recid = *data++;
363,10 → 335,10
 
plothandle[id] = PlotXY (panelHandle, PANEL_GRAPH, timebins, fdata, nsamples, VAL_FLOAT, VAL_FLOAT, VAL_FAT_LINE, VAL_NO_POINT, VAL_SOLID, 1, col[id]);
 
H1D_Draw(1, ch0Handle,CH0_ADC1,&adcplothandle[0]);
H1D_Draw(2, ch1Handle,CH1_ADC2,&adcplothandle[1]);
H1D_Draw(3, ch0Handle,CH0_TDC1,&tdcplothandle[0]);
H1D_Draw(4, ch1Handle,CH1_TDC2,&tdcplothandle[1]);
H1D_Draw(1,panelHandle,PANEL_ADC1,&adcplothandle[0]);
H1D_Draw(2,panelHandle,PANEL_ADC2,&adcplothandle[1]);
H1D_Draw(3,panelHandle,PANEL_TDC1,&tdcplothandle[0]);
H1D_Draw(4,panelHandle,PANEL_TDC2,&tdcplothandle[1]);
 
if (debug) for (int k=0; k<10; k++) printf("%d %d (%f , %d)\n", id,k, timebins[k],data[k]);
}
461,7 → 433,7
case 1:// read
 
GetCtrlVal(panelHandle,PANEL_CEVE , &event);
GetCtrlVal(settingsHandle,SETTINGS_NTOTAL , &ncalls);
GetCtrlVal(panelHandle,PANEL_NTOTAL , &ncalls);
 
event += analyse(nb,data, evinfo, &ninfo);
if (foutput) {
512,10 → 484,8
int CVICALLBACK StartCB (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2) {
char ip[0xFF];
char path[0xFF];
int hdr[0xFF];
char filename[0xFF];
char filepath[0xFF];
unsigned short *sbuff = (unsigned short *)&hdr[5] ;
unsigned char *cbuff = (unsigned char *)&sbuff[3] ;
int imask[2];
528,23 → 498,21
unsigned short neve;
int output;
switch (event) {
case EVENT_COMMIT: {
GetCtrlVal(settingsHandle,SETTINGS_IP, ip);
GetCtrlVal(settingsHandle,SETTINGS_TRIGGER, &trigger);
GetCtrlVal(settingsHandle,SETTINGS_SAMPLES, &nsamples);
GetCtrlVal(settingsHandle,SETTINGS_DECIMATION,&decimation);
GetCtrlVal(settingsHandle,SETTINGS_NEVE , &neve);
GetCtrlVal(settingsHandle,SETTINGS_CH0 , &imask[0] );
GetCtrlVal(settingsHandle,SETTINGS_CH1 , &imask[1] );
GetCtrlVal(settingsHandle,SETTINGS_PFREQ , &pfreq);
GetCtrlVal(settingsHandle,SETTINGS_DEBUG , &debug);
GetCtrlVal(settingsHandle,SETTINGS_NBEFORE , &nbefore);
GetCtrlVal(settingsHandle,SETTINGS_ENABLEDOUTPUT, &output);
case EVENT_COMMIT: {
GetCtrlVal(panel,PANEL_IP, ip);
GetCtrlVal(panel,PANEL_TRIGGER, &trigger);
GetCtrlVal(panel,PANEL_SAMPLES, &nsamples);
GetCtrlVal(panel,PANEL_DECIMATION,&decimation);
GetCtrlVal(panel,PANEL_NEVE , &neve);
GetCtrlVal(panel,PANEL_CH0 , &imask[0] );
GetCtrlVal(panel,PANEL_CH1 , &imask[1] );
GetCtrlVal(panel,PANEL_PFREQ , &pfreq);
GetCtrlVal(panel,PANEL_DEBUG , &debug);
GetCtrlVal(panel,PANEL_NBEFORE , &nbefore);
GetCtrlVal(panel,PANEL_ENABLEDOUTPUT, &output);
GetCtrlVal(panel,PANEL_OUTWAVE, &outwaveforms);
GetCtrlVal(settingsHandle,SETTINGS_FILENAME, filename);
sprintf(path, "%s\\Desktop\\data", getenv("USERPROFILE"));
MakeDir (path);
sprintf(filepath,"%s\\%s", path, filename);
GetCtrlVal(panel,PANEL_FILENAME, filename);
 
delay= MINTRGDELAY + nsamples - nbefore + 1;
 
mask = 0;
553,7 → 521,7
}
 
double level =0;
GetCtrlVal(settingsHandle,SETTINGS_TRGLEVEL , &level);
GetCtrlVal(panel,PANEL_TRGLEVEL , &level);
 
 
switch (control) {
571,9 → 539,8
case PANEL_START: {
int state;
GetCtrlVal(panel,PANEL_START, &state);
GetCtrlVal(ch0Handle,CH0_EXCLUDE_1, &excludefirst[0]);
GetCtrlVal(ch1Handle,CH1_EXCLUDE_2, &excludefirst[1]);
GetCtrlVal(panel,PANEL_EXCLUDE_1, &excludefirst[0]);
GetCtrlVal(panel,PANEL_EXCLUDE_2, &excludefirst[1]);
if (state && eventData1==0) {
histoinit();
starttime=Timer();
580,7 → 547,7
daqtime =0;
/* decimation n (=1,8,64...) : frequency = 125/n MHz*/
for (int i=0; i<nsamples; i++) timebins[i]=(i-nbefore)* (float)decimation /125.;
if (output) foutput = fopen(filepath, "wb");
if (output) foutput = fopen(filename, "wb");
printf("decimation %d\n", decimation);
SetCtrlVal(panel,PANEL_CEVE , 0);
ctrl_c=0;
639,31 → 606,20
int hid=0;
switch (event) {
case EVENT_COMMIT:
if (panel== ch0Handle){
switch (control) {
case CH0_EXPORT_1:
hid=1;
break;
switch (control) {
case PANEL_EXPORT_1:
hid=1;
break;
case PANEL_EXPORT_2:
hid=2;
break;
case PANEL_EXPORT_3:
hid=3;
break;
case PANEL_EXPORT_4:
hid=4;
break;
 
case CH0_EXPORT_3:
hid=3;
break;
 
 
}
}
if (panel== ch1Handle){
switch (control) {
 
case CH1_EXPORT_2:
hid=2;
break;
 
case CH1_EXPORT_4:
hid=4;
break;
 
}
}
export_data(hid);
break;
/cvi/apps/RedPitaya/soccli/soccli.cws
16,10 → 16,10
Project 0002 Folder User Interface Files Collapsed = True
Project 0002 FolderId 0 Collapsed = True
Drag Bar Left = 202
Window Top = 100
Window Left = 1683
Window Bottom = 1118
Window Right = 3446
Window Top = 95
Window Left = 80
Window Bottom = 804
Window Right = 1535
Maximized = False
Maximized Children = True
Max32 Number Of Errors = 20
33,7 → 33,7
Hide Windows = False
Break At First Statement = False
Sort Type = "File Name"
Number of Opened Files = 7
Number of Opened Files = 3
Window Confinement Region Enabled = True
MainColumnWidth = 185
FileDateColumnWidth = 70
60,52 → 60,34
[File 0001]
Path = "/c/home/cvi/instr/HISTO/H1D.fp"
File Type = "Function Panel"
Disk Date = 3574746411
Disk Date = 3574750011
In Projects = "1,"
Window Top = 219
Window Left = 106
Window Height = 400
Window Width = 400
Window Z-Order = 4
 
[File 0002]
Path = "/c/home/cvi/apps/RedPitaya/soccli/soccli.c"
File Type = "CSource"
Disk Date = 3631014483
Disk Date = 3574773250
In Projects = "1,"
Window Top = 33
Window Left = 10
Window Z-Order = 2
Source Window State = "0,530,530,530,118,121,118,0,0,69,24,52,0,88,173,1,145,0,446,0,349,595,1,9601,"
Source Window State = "0,361,361,361,26,31,31,0,3,69,24,348,0,361,26,1,117,0,418,0,349,595,1,9601,"
 
[File 0003]
Path = "/c/home/cvi/apps/RedPitaya/soccli/redpitaya_gui.uir"
File Type = "User Interface Resource"
Disk Date = 3631008791
Disk Date = 3574773016
In Projects = "1,"
Window Top = 64
Window Left = 26
Window Height = 232
Window Width = 595
Window Z-Order = 5
Window Z-Order = 1
 
[File 0004]
Path = "/c/home/cvi/apps/RedPitaya/soccli/soccli.h"
File Type = "Include"
Disk Date = 3572533057
In Projects = "1,"
Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
 
[File 0005]
Path = "/c/home/cvi/apps/RedPitaya/soccli/H1Dload.cxx"
File Type = "Unknown"
Disk Date = 3574308555
In Projects = "1,"
 
[File 0006]
Path = "/c/home/cvi/apps/RedPitaya/RedPitaya_ui.uir"
File Type = "User Interface Resource"
Disk Date = 3574746415
Disk Date = 3574750015
In Projects = "2,"
Window Top = 64
Window Left = 26
112,81 → 94,44
Window Height = 323
Window Width = 683
 
[File 0007]
Path = "/c/home/cvi/apps/RedPitaya/RedPitaya_ui.h"
File Type = "Include"
Disk Date = 3574746415
In Projects = "2,"
Window Top = 157
Window Left = 74
Window Z-Order = 7
Source Window State = "1,0,0,0,0,0,0,0,0,80,0,0,0,0,0,25,0,0,0,0,349,683,1,0,"
 
[File 0008]
Path = "/c/home/cvi/apps/RedPitaya/plottdc.cxx"
File Type = "Unknown"
Disk Date = 3574746415
In Projects = "2,"
 
[File 0009]
[File 0005]
Path = "/c/home/cvi/apps/RedPitaya/RedPitaya.c"
File Type = "CSource"
Disk Date = 3574746415
Disk Date = 3574750015
In Projects = "2,"
Window Top = 126
Window Left = 58
Source Window State = "1,43,43,43,0,26,26,0,0,0,0,0,0,0,0,0,112,0,131,17,258,683,1,0,"
 
[File 0010]
Path = "/c/home/cvi/instr/HISTO/H1D.c"
File Type = "CSource"
Disk Date = 3631008229
In Projects = ""
Window Top = 95
Window Left = 42
Window Z-Order = 3
Source Window State = "1,68,68,68,2,22,22,0,0,80,0,0,0,0,0,25,30,0,56,17,349,683,1,0,"
 
[File 0011]
Path = "/c/home/cvi/apps/RedPitaya/soccli/redpitaya_gui.h"
[File 0006]
Path = "/c/home/cvi/apps/RedPitaya/soccli/soccli.h"
File Type = "Include"
Disk Date = 3631007699
Disk Date = 3572536657
In Projects = "1,"
Window Top = 188
Window Left = 90
Window Z-Order = 6
Source Window State = "1,33,33,33,13,78,13,0,0,80,0,0,0,0,0,25,12,0,33,60,349,683,1,0,"
Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
 
[File 0012]
Path = "/c/home/cvi/apps/RedPitaya/soccli/mH1D.h"
File Type = "Include"
Disk Date = 3631017512
In Projects = "1,"
Window Top = 126
Window Left = 58
Window Z-Order = 1
Source Window State = "1,0,0,0,0,0,0,0,0,190,0,0,0,0,0,60,0,0,27,42,349,683,1,0,"
 
[File 0013]
Path = "/c/home/cvi/apps/RedPitaya/soccli/install.bat"
[File 0007]
Path = "/c/home/cvi/apps/RedPitaya/soccli/H1Dload.cxx"
File Type = "Unknown"
Disk Date = 3631017395
Disk Date = 3574312155
In Projects = "1,"
 
[File 0014]
Path = "/c/home/cvi/apps/RedPitaya/soccli/thisroot.bat"
[File 0008]
Path = "/c/home/cvi/apps/RedPitaya/RedPitaya_ui.h"
File Type = "Include"
Disk Date = 3574750015
In Projects = "2,"
Source Window State = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"
 
[File 0009]
Path = "/c/home/cvi/apps/RedPitaya/plottdc.cxx"
File Type = "Unknown"
Disk Date = 3572708898
In Projects = "1,"
Disk Date = 3574750015
In Projects = "2,"
 
[Tab Order]
Tab 0001 = "/c/home/cvi/apps/RedPitaya/soccli/redpitaya_gui.uir"
Tab 0002 = "/c/home/cvi/apps/RedPitaya/soccli/soccli.c"
Tab 0003 = "/c/home/cvi/apps/RedPitaya/RedPitaya_ui.h"
Tab 0004 = "/c/home/cvi/apps/RedPitaya/soccli/redpitaya_gui.h"
Tab 0005 = "/c/home/cvi/apps/RedPitaya/soccli/mH1D.h"
Tab 0006 = "/c/home/cvi/instr/HISTO/H1D.fp"
Tab 0007 = "/c/home/cvi/instr/HISTO/H1D.c"
 
[Default Build Config 0001 Debug]
Generate Browse Info = False
364,8 → 309,3
Working Directory = ""
Environment Options = ""
 
[Distributions]
Active Index = 1
AbsCDSPath 0001 = "/c/home/cvi/apps/RedPitaya/soccli/soccli.cds"
RelCDSPath 0001 = "soccli.cds"
 
/cvi/apps/RedPitaya/soccli/soccli.prj
10,7 → 10,7
VXIplug&play Framework Dir = "/C/Program Files (x86)/IVI Foundation/VISA/winnt"
IVI Standard Root 64-bit Dir = "/C/Program Files/IVI Foundation/IVI"
VXIplug&play Framework 64-bit Dir = "/C/Program Files/IVI Foundation/VISA/win64"
Number of Files = 9
Number of Files = 5
Target Type = "Executable"
Flags = 2064
Copied From Locked InstrDrv Directory = False
43,46 → 43,10
Folder Id = 0
 
[File 0002]
File Type = "Unknown"
File Type = "Include"
Res Id = 2
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "install.bat"
Path = "/c/home/cvi/apps/RedPitaya/soccli/install.bat"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0003]
File Type = "Include"
Res Id = 3
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "mH1D.h"
Path = "/c/home/cvi/apps/RedPitaya/soccli/mH1D.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0004]
File Type = "Include"
Res Id = 4
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "redpitaya_gui.h"
Path = "/c/home/cvi/apps/RedPitaya/soccli/redpitaya_gui.h"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0005]
File Type = "Include"
Res Id = 5
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "soccli.h"
Path = "/c/home/cvi/apps/RedPitaya/soccli/soccli.h"
Exclude = False
90,21 → 54,9
Folder = "Include Files"
Folder Id = 1
 
[File 0006]
File Type = "Unknown"
Res Id = 6
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "thisroot.bat"
Path = "/c/home/cvi/apps/RedPitaya/soccli/thisroot.bat"
Exclude = False
Project Flags = 0
Folder = "Include Files"
Folder Id = 1
 
[File 0007]
[File 0003]
File Type = "User Interface Resource"
Res Id = 7
Res Id = 3
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "redpitaya_gui.uir"
114,9 → 66,9
Folder = "User Interface Files"
Folder Id = 2
 
[File 0008]
[File 0004]
File Type = "Function Panel"
Res Id = 8
Res Id = 4
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "../../../instr/HISTO/H1D.fp"
126,9 → 78,9
Folder = "Instrument Files"
Folder Id = 3
 
[File 0009]
[File 0005]
File Type = "Unknown"
Res Id = 9
Res Id = 5
Path Is Rel = True
Path Rel To = "Project"
Path Rel Path = "H1Dload.cxx"
205,7 → 157,7
File Version Ex = "%f1.%f2"
Internal Name = "soccli"
Internal Name Ex = "%basename"
Legal Copyright = "Copyright © 2019"
Legal Copyright = "Copyright © 2017"
Legal Copyright Ex = "Copyright © %company %Y"
Legal Trademarks = ""
Legal Trademarks Ex = ""
290,7 → 242,7
File Version Ex = "%f1.%f2"
Internal Name = "soccli"
Internal Name Ex = "%basename"
Legal Copyright = "Copyright © 2019"
Legal Copyright = "Copyright © 2017"
Legal Copyright Ex = "Copyright © %company %Y"
Legal Trademarks = ""
Legal Trademarks Ex = ""
483,7 → 435,7
File Version Ex = "%f1.%f2"
Internal Name = "soccli"
Internal Name Ex = "%basename"
Legal Copyright = "Copyright © 2019"
Legal Copyright = "Copyright © 2017"
Legal Copyright Ex = "Copyright © %company %Y"
Legal Trademarks = ""
Legal Trademarks Ex = ""
/cvi/apps/RedPitaya/soccli/H1Dload.cxx
2,7 → 2,6
#include <TStyle.h>
#include <TPad.h>
#include "mH1D.h"
#include <TSystem.h>
 
double H1DGetBinContent(H1D *h1d,int atx){
17,12 → 16,7
 
int H1Dload(char *fname){
 
TString dfile( gSystem->Getenv("USERPROFILE") );
dfile.ReplaceAll("\\","/");
dfile += TString("/Desktop/data/") + fname;
fprintf(stderr, "Filename %s\n",dfile.Data());
FILE *fp= fopen(dfile.Data() ,"rb");
 
FILE *fp= fopen(fname ,"rb");
if (!fp) return -1;
H1D *h = new H1D;
int size=sizeof(H1D);
55,21 → 49,15
// if (g>0) printf("i %d j %d v %g\n",ix+1,iy+1,g);
 
}
h1d->SetEntries(h->nentries);
gStyle->SetOptStat(1);
 
gStyle->SetOptStat(0);
gStyle->SetOptFit(1);
h1d->Draw("colz");
 
TString hname;
//sprintf(hname,"%s.pdf",dfile.Data());
hname = dfile + ".pdf";
char hname[100];
sprintf(hname,"%s.pdf",fname);
gPad->SaveAs(hname);
 
//sprintf(hname,"%s.root",dfile.Data());
hname = dfile + ".root";
//printf("%s\n",hname);
printf("%s\n",hname.Data());
gPad->SaveAs(hname);
h1d->FitPanel();
gPad->SaveAs(fname);
return 0;
}
/cvi/apps/RedPitaya/soccli/README.md
1,14 → 1,23
Client for the RedPitaya board
Start the server on the RedPitaya First, then start the client
 
Connect signals via 50 Ohm terminations to two fast input signals of RedPitaya
 
Start the server on the RedPitaya First, then start the client
rok@f9rok ~$ ssh root@rp-f04f77.local
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-xilinx armv7l)
 
rok@f9rok ~$ ssh root@rp-f04f77.local
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
##############################################################################
# Red Pitaya GNU/Linux Ecosystem
# Version: 0.97
# Build: 336
# Branch:
# Commit: 4506f6e20ad2d2c8a45184383302331b6bf4a501
# U-Boot: "redpitaya-v2016.4"
# Linux Kernel: "redpitaya-v2016.2"
# Pro Applications: 40d8c17c18aac3ea6416257603c4c8dcd208d109 Applications (v0.96-RC3-134-g40d8c17)
##############################################################################
Last login: Wed Mar 22 09:47:35 2017 from fe80::117e:99ca:51f3:7af2%eth0
root@rp-f04f77:~# cd sockserv/
root@rp-f04f77:~/sockserv# ./sockserv.sh
Start server via http://rp-f048e6.local/tcpsocket_manager/?type=run
Install client
install H1Dload.cxx and mH1D.h to C:/home/cvi/apps/RedPitaya/soccli
Start the client: soccli.exe