19 #define CHUNK_MAX_SIZE 100
22 int ReadChunkList(TString ifile,
int* chunk=NULL,
double* start=NULL,
double* stop=NULL) {
24 CWB::Toolbox::checkFile(ifile);
28 in.open(ifile.Data(),ios::in);
29 if (!in.good()) {cout <<
"Error Opening File : " << ifile << endl;
exit(1);}
36 if (!in.good())
break;
37 if(str[0] !=
'#') isize++;
40 in.clear(ios::goodbit);
41 in.seekg(0, ios::beg);
42 if(isize==0) {cout <<
"Error : File " << ifile <<
" is empty" << endl;
exit(1);}
61 double LH_coincident_days = 0;
69 in >> note[k] >> chunk[k] >> start[k] >> stop[k] >> days[k] >> sdummy >> bmon[k] >> bday[k] >> sdummy >> sdummy >> emon[k] >> eday[k] >> sdummy;
71 if(note[k][0]==
'#')
continue;
72 cout <<
"\t" << chunk[k] <<
"\t" << start[k] <<
"\t" << stop[k] <<
"\t" << days[k] <<
"\t"
73 <<
" days\t" << bmon[k] <<
" " << bday[k] <<
" - " << emon[k] <<
" " << eday[k] <<
"\t\t" << note[k] << endl;
74 LH_coincident_days += days[k];
80 cout <<
"LH_coincident_days = " << LH_coincident_days << endl;
int ReadChunkList(TString ifile, int *chunk=NULL, double *start=NULL, double *stop=NULL)