19 #define LOUDEST_MAX_SIZE 1000
40 int ReadLoudestList(TString ifile, TString*
run,
int* chunk,
double* gps, TString* bbh_name,
double* ifar_sec,
double* ifar_year,
41 double* obs_time_sec,
double* obs_time_day,
double* expected,
int* observed,
double* cumul_FAP,
double* sigma) {
43 CWB::Toolbox::checkFile(ifile);
47 in.open(ifile.Data(),ios::in);
48 if (!in.good()) {cout <<
"Error Opening File : " << ifile << endl;
exit(1);}
55 if (!in.good())
break;
56 if(str[0] !=
'#') isize++;
59 in.clear(ios::goodbit);
60 in.seekg(0, ios::beg);
61 if(isize==0) {cout <<
"Error : File " << ifile <<
" is empty" << endl;
return 0;}
71 if (!in.good())
break;
72 if(str[0] ==
'#' || str[0]==
'\0')
continue;
73 in.seekg(fpos, ios::beg);
74 in >> srun >> chunk[k] >> gps[k] >> sbbh >> ifar_sec[k] >> ifar_year[k] >> obs_time_sec[k]
75 >> obs_time_day[k] >> expected[k] >> observed[k] >> cumul_FAP[k] >> sigma[k];
83 cout <<
"WARNING: loudest events exceed LOUDEST_MAX_SIZE = " <<
LOUDEST_MAX_SIZE << endl;
int ReadLoudestList(TString ifile, TString *run, int *chunk, double *gps, TString *bbh_name, double *ifar_sec, double *ifar_year, double *obs_time_sec, double *obs_time_day, double *expected, int *observed, double *cumul_FAP, double *sigma)