Logo Coherent WaveBurst  
Reference Guide
Logo
 All Namespaces Files Functions Variables Macros Pages
CreateChunkFiles.C
Go to the documentation of this file.
1 #define MACRO_READ_CHUNK "/home/waveburst/O1/MACROS/ReadChunkList.C"
2 
3 #define CHUNK_MAX_SIZE 100
4 
5 #define EXECUTE
6 
7 {
8 
9  CWB::Toolbox::checkFile(MACRO_READ_CHUNK);
10 
11  // load macro
12  gROOT->LoadMacro(gSystem->ExpandPathName(MACRO_READ_CHUNK));
13 
17 
18  int nChunks = ReadChunkList(chunk,start,stop);
19 
20  char ofile[1024];
21  for(int k=0;k<nChunks;k++) {
22 // cout << "\t" << chunk[k] << "\t" << (int)start[k] << "\t" << (int)stop[k] << endl;
23 
24  sprintf(ofile,"/home/waveburst/O1/CHUNKS/O1_chunk%02d.lst",chunk[k]);
25 
26 #ifdef EXECUTE
27  ofstream out;
28  out.open(ofile,ios::out);
29  out.precision(16);
30  out << start[k] << "\t" << stop[k] << endl;
31  out.close();
32 #endif
33 
34  cout << "output file list : " << ofile << endl;
35  }
36 
37  exit(0);
38 
39 }
#define MACRO_READ_CHUNK
exit(0)
int nChunks
int ReadChunkList(TString ifile, int *chunk=NULL, double *start=NULL, double *stop=NULL)
Definition: ReadChunkList.C:4
double stop[CHUNK_MAX_SIZE]
int chunk[CHUNK_MAX_SIZE]
double start[CHUNK_MAX_SIZE]
#define CHUNK_MAX_SIZE
char ofile[1024]