21 #define CHUNK_FILE_LIST "Chunk_List.txt"
22 #define CHUNK_MAX_SIZE 100
29 char cwb_config_env[1024] =
"";
30 if(gSystem->Getenv(
"CWB_CONFIG")!=NULL) {
31 strcpy(cwb_config_env,TString(gSystem->Getenv(
"CWB_CONFIG")).Data());
34 char chunk_file_list[1024];
36 cout << chunk_file_list << endl;
42 int nChunks =
ReadChunkList(chunk_file_list, chunk, start, stop);
45 for(
int k=0;k<nChunks;k++) {
48 sprintf(ofile,
"%s/%s/CHUNKS/%s/K%02d.period",cwb_config_env,
run.Data(),
search.Data(),chunk[k]);
52 out.open(ofile,ios::out);
54 out << start[k] <<
"\t" << stop[k] << endl;
58 cout << start[k] <<
"\t" << stop[k] << endl;
61 cout <<
"output file list : " << ofile << endl;
65 sprintf(ofile,
"%s/%s/CHUNKS/%s/K%02d.period",cwb_config_env,
run.Data(),
search.Data(),99);
68 out.open(ofile,ios::out);
70 out << 0 <<
"\t" << 2147483647 << endl;
74 cout << 0 <<
"\t" << 2147483647 << endl;
76 cout <<
"output file list : " << ofile << endl;
void CreateChunkFiles(TString run, TString search="")
int ReadChunkList(TString ifile, int *chunk=NULL, double *start=NULL, double *stop=NULL)
sprintf(tag,"wave_%s", data_label)