215 {
216 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
217 if(par==NULL) {
220 }
221 if(verbose>0) printf("%s()\n", __func__);
222 if(ift==NULL || ift->
keyNr<1) {
225 }
226
227
228 if(strcasecmp(ift->
item[0].
key,
"content") ||
229 strcasecmp(ift->
item[0].
value,
"parameters")
230 ) {
233 }
234
235 int ret, parNr, tacNr;
236
240 }
241 if(verbose>5) printf("parNr := %d\n", parNr);
242
244 if(tacNr<1) {
247 }
248 if(verbose>5) printf("tacNr := %d\n", tacNr);
249
250
254 statusSet(status, __func__, __FILE__, __LINE__, ret);
255 return ret;
256 }
258
259
261
263
264 if(ift->
item[i].
key==NULL || strlen(ift->
item[i].
key)<1)
continue;
265
266 if(strcasecmp(ift->
item[i].
key,
"parameter-set")==0)
break;
267
268 if(strcasecmp(ift->
item[i].
key,
"par_nr")==0)
continue;
269 if(strcasecmp(ift->
item[i].
key,
"format")==0)
continue;
270 if(strcasecmp(ift->
item[i].
key,
"tac_nr")==0)
continue;
271
273 }
275 statusSet(status, __func__, __FILE__, __LINE__, ret);
276 return ret;
277 }
278
279
280 int i, pi=0, ri=0; ret=0;
281 char tmp[128];
284 if(verbose>60)
285 printf("i=%d key='%s' value='%s'\n",
287
288 if(strcasecmp(ift->
item[i].
key,
"parameter-set")==0) {
289 ri++; pi=0; if(ri<par->tacNr) continue; else break;}
290
291 if(strcasecmp(ift->
item[i].
key,
"tac_name")==0) {
294 continue;
295 }
296 if(strcasecmp(ift->
item[i].
key,
"wss")==0) {
298 continue;
299 }
300 if(strcasecmp(ift->
item[i].
key,
"model")==0) {
302 continue;
303 }
304 if(strcasecmp(ift->
item[i].
key,
"data_nr")==0) {
306 continue;
307 }
308 if(strcasecmp(ift->
item[i].
key,
"fit_nr")==0) {
310 continue;
311 }
312 if(strcasecmp(ift->
item[i].
key,
"fit_start")==0) {
314 continue;
315 }
316 if(strcasecmp(ift->
item[i].
key,
"fit_end")==0) {
318 continue;
319 }
320
321 if(strcasecmp(ift->
item[i].
key,
"SD")==0) {
323 continue;
324 }
325 if(strcasecmp(ift->
item[i].
key,
"95%CL1")==0) {
327 continue;
328 }
329 if(strcasecmp(ift->
item[i].
key,
"95%CL2")==0) {
331 continue;
332 }
333
334 if(pi>=par->
parNr) {ret++;
break;}
338
342 }
343 pi++;
344 }
346 statusSet(status, __func__, __FILE__, __LINE__, ret);
347 return ret;
348 }
349
350
352
353
356}
int iftPut(IFT *ift, const char *key, const char *value, char comment, TPCSTATUS *status)
int iftFindNrOfKeys(IFT *ift, const char *key)
int iftFindKey(IFT *ift, const char *key, int start_index)
int iftGetUInt(IFT *ift, int index, unsigned int *v)
int iftGetDouble(IFT *ift, int index, double *v)
int iftGetInt(IFT *ift, int index, int *v)
int parAllocate(PAR *par, int parNr, int tacNr)
void statusSet(TPCSTATUS *s, const char *func, const char *srcfile, int srcline, tpcerror error)
int strTokenNr(const char *s1, const char *s2)
int strTokenNCpy(const char *s1, const char *s2, int i, char *s3, int count)
IFT h
Optional (but often useful) header information.
char name[MAX_PARNAME_LEN+1]
char name[MAX_TACNAME_LEN+1]
int verbose
Verbose level, used by statusPrint() etc.
#define MAX_TACNAME_LEN
Max length of TAC ID name (not including trailing zero).
#define MAX_PARNAME_LEN
Max string length for PAR name.
@ TPCERROR_FAIL
General error.
@ TPCERROR_UNSUPPORTED
Unsupported file type.
@ TPCERROR_NO_DATA
File contains no data.
int unitIdentify(const char *s)
@ PAR_FORMAT_IFT
Interfile-type data (supported for writing).