30 INTS4 l_size,l_histos=0;
31 INTS4 *pl_all,*pl_dir,*pl_l;
42 printf(
"node port|6009 base password \"histogram\" [-print|-dir|-rad]\n");
46 strcpy(c_server,argv[1]);
47 strcpy(c_access,argv[4]);
48 strcpy(c_base,argv[3]);
49 strcpy(c_histo,argv[5]);
53 if(strstr(argv[6],
"-d") != NULL)
55 printf(
"Get directory %s from server %s [%d] pass=*** base=%s\n",
56 c_histo,c_server,l_port,c_base);
62 printf(
"Histograms: %d, slot size: %d b, Total: %d b\n",
65 for(i_j=0;i_j<l_histos;i_j++)
68 printf(
"%-31s %s %8d %8d\n",
72 }
else printf(
"Error %d\n",l_status);
76 printf(
"Lookup histograms %s at server %s [%d] pass=*** base=%s\n",
77 c_histo,c_server,l_port,c_base);
83 printf(
"Error %d getting histograms %s\n",l_status,c_histo);
87 for(i_j=0;i_j<l_histos;i_j++)
97 printf(
"Error %d getting histogram %s\n",l_status,ps_his_head_dir->
c_name);
103 pr_l =(
REAL4 *)pl_all;
104 if(ps_his_head->
c_dtype ==
'i') l_int=1;
else l_int=0;
107 if(strstr(argv[6],
"-p") != NULL)
109 printf(
"Histogram %s\n",ps_his_head_dir->
c_name);
110 printf(
" channels: %10d, total: %10d [b], %s %8d %8d\n",
116 for (i_j = 0; i_j < (ps_his_head->
l_bins_1 - ps_his_head->
l_bins_1 % 6); i_j += 6)
118 if(l_int) printf(
"%7d:%9d %9d %9d %9d %9d %9d\n",
119 i_j + 1,*pl_l,*(pl_l+1),*(pl_l+2),*(pl_l+3),*(pl_l+4),*(pl_l+5));
120 else printf(
"%7d:%11.4g %11.4g %11.4g %11.4g %11.4g %11.4g\n",
121 i_j + 1,*pr_l,*(pr_l+1),*(pr_l+2),*(pr_l+3),*(pr_l+4),*(pr_l+5));
127 printf(
"%7d:",i_j + 1);
128 for (i_j = ps_his_head->
l_bins_1 - ps_his_head->
l_bins_1 % 6; i_j < ps_his_head->l_bins_1; i_j++)
130 if(l_int) printf(
"%9d ", *pl_l);
131 else printf(
"%11.4g ", *pr_l);
136 }}
else printf(
"2d Histograms %s not supported\n",ps_his_head_dir->
c_name);
139 if(strstr(argv[6],
"-r") != NULL)
141 if(argc == 8)strcpy(c_file,argv[7]);
142 else strcpy(c_file,
"rad_");
143 strcat(c_file,ps_his_head_dir->
c_name);
145 for(ii=0;ii<strlen(c_file);ii++)
147 if(*pc ==
'/')*pc=
'-';
148 if(*pc ==
'(')*pc=
'[';
149 if(*pc ==
')')*pc=
']';
150 if(*pc ==
' ')*pc=
'_';
153 strcat(c_file,
".spe");
163 if(l_status == 0)printf(
"Radware histogram %s written to file %s.\n",ps_his_head_dir->
c_name,c_file);
164 else printf(
"Radware histogram %s NOT written to file %s, ERROR!\n",ps_his_head_dir->
c_name,c_file);
165 if(l_int == 0)free(pr_l);
166 }
else printf(
"2d Histograms %s not supported\n",ps_his_head_dir->
c_name);
int f_radware_out1d(char *pc_file, char *pc_name, float *pr_data, int l_chan, int l_over)
INTS4 f_his_getdir(const char *, int, const char *, const char *, const char *, INTS4 **, INTS4 *)
INTS4 f_ut_wild(CHARS *pc_test, CHARS *pc_wild)
INTS4 f_his_gethis(const char *, int, const char *, const char *, const char *, s_his_head **, INTS4 **, INTS4 *)