1 #define LOUDEST_MAX_SIZE 1000
22 int ReadLoudestList(TString ifile, TString* run,
int*
chunk,
double* gps, TString* bbh_name,
double* ifar_sec,
double* ifar_year,
23 int* obs_time_sec,
double* obs_time_day,
double* expected,
int* observed,
double* cumul_FAP,
double* sigma) {
25 CWB::Toolbox::checkFile(ifile);
29 in.open(ifile.Data(),ios::in);
30 if (!in.good()) {cout <<
"Error Opening File : " << ifile << endl;
exit(1);}
37 if (!in.good())
break;
38 if(str[0] !=
'#') isize++;
41 in.clear(ios::goodbit);
42 in.seekg(0, ios::beg);
43 if(isize==0) {cout <<
"Error : File " << ifile <<
" is empty" << endl;
return 0;}
53 if (!in.good())
break;
54 if(str[0] ==
'#' || str[0]==
'\0')
continue;
55 in.seekg(fpos, ios::beg);
56 in >> srun >> chunk[k] >> gps[k] >> sbbh >> ifar_sec[k] >> ifar_year[k] >> obs_time_sec[k]
57 >> obs_time_day[k] >> expected[k] >> observed[k] >> cumul_FAP[k] >> sigma[k];
65 cout <<
"WARNING: loudest events exceed LOUDEST_MAX_SIZE = " <<
LOUDEST_MAX_SIZE << endl;
int chunk[CHUNK_MAX_SIZE]
int ReadLoudestList(TString ifile, TString *run, int *chunk, double *gps, TString *bbh_name, double *ifar_sec, double *ifar_year, int *obs_time_sec, double *obs_time_day, double *expected, int *observed, double *cumul_FAP, double *sigma)