1 #define CHUNK_MAX_SIZE 100
13 CWB::Toolbox::checkFile(ifile);
17 in.open(ifile.Data(),ios::in);
18 if (!in.good()) {cout <<
"Error Opening File : " << ifile << endl;
exit(1);}
25 if (!in.good())
break;
26 if(str[0] !=
'#') isize++;
28 in.clear(ios::goodbit);
29 in.seekg(0, ios::beg);
30 if(isize==0) {cout <<
"Error : File " << ifile <<
" is empty" << endl;
exit(1);}
40 TString ofile = ifile;
41 ofile.ReplaceAll(
".lst",
".txt");
44 out.open(ofile.Data());
45 if (!out.good()) {cout <<
"Error Opening File : " << ofile << endl;
exit(1);}
50 in >>
run[k] >> chunk[k] >> start[k] >> stop[k];
52 if(
run[k][0]==
'#')
continue;
54 double days = (stop[k]-start[k])/(24.*3600.);
55 wat::Time sdate(start[k]);
56 wat::Time edate(stop[k]);
58 TString month[12] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"};
62 sprintf(sout,
"%s %d %d %d %.2f days %s %02d %02d:%02d - %s %02d %02d:%02d",
run[k],chunk[k],
int(start[k]),
int(stop[k]),days,
63 month[sdate.GetMonth()-1].Data(),sdate.GetDay(),sdate.GetHour(),sdate.GetMinute(),
64 month[edate.GetMonth()-1].Data(),edate.GetDay(),edate.GetHour(),edate.GetMinute());
int ConvertChunkList(TString ifile)
sprintf(tag,"wave_%s", data_label)