1 #define CHUNK_FILE_LIST "Chunk_List.txt"
2 #define MACRO_READ_CHUNK "ReadChunkList.C"
3 #define CHUNK_MAX_SIZE 100
5 #define MACRO_MERGE_SEG "MergeSegments.C"
11 if(run!=
"O1" && run!=
"O2") {
12 cout <<
"CreateMergedHVETO : Error - run type not available !!!" << endl;
15 if(ifo!=
"L1" && ifo!=
"H1" && ifo!=
"V1") {
16 cout <<
"CreateMergedHVETO : Error - ifo type not available !!!" << endl;
21 char cwb_config_env[1024] =
"";
22 if(gSystem->Getenv(
"CWB_CONFIG")!=NULL) {
23 strcpy(cwb_config_env,TString(gSystem->Getenv(
"CWB_CONFIG")).Data());
26 char chunk_file_list[1024];
28 cout << chunk_file_list << endl;
31 char macro_read_chunk_path[1024];
33 CWB::Toolbox::checkFile(macro_read_chunk_path);
34 gROOT->LoadMacro(gSystem->ExpandPathName(macro_read_chunk_path));
43 char macro_merge_seg_path[1024];
45 CWB::Toolbox::checkFile(macro_merge_seg_path);
46 gROOT->LoadMacro(gSystem->ExpandPathName(macro_merge_seg_path));
48 char vetoes_dir[1024];
49 sprintf(vetoes_dir,
"%s/%s/DATA/%s/HVETO",cwb_config_env,run.Data(),calibVer.Data());
50 char vetoes_dir_tmp[1024];
51 sprintf(vetoes_dir_tmp,
"%s/%s/DATA/%s/HVETO/tmp",cwb_config_env,run.Data(),calibVer.Data());
54 cout << vetoes_dir_tmp << endl << endl;
56 CWB::Toolbox::mkDir(vetoes_dir_tmp,
true,
true);
60 char ihveto_file[1024];
61 char ohveto_file[1024];
63 sprintf(ihveto_file,
"%s/%s/HVETO_%s_ANALYSIS%d_SEGMENTS.txt",vetoes_dir,ifo.Data(),ifo.Data(),chunk[k]);
64 sprintf(ohveto_file,
"%s/HVETO_%s_ANALYSIS%d_SEGMENTS_MERGED.txt",vetoes_dir_tmp,ifo.Data(),chunk[k]);
65 cout <<
"ihveto_file : " << ihveto_file << endl;
66 cout <<
"ohveto_file : " << ohveto_file << endl;
75 sprintf(cmd,
"rm %s/%s/HVETO_%s_ANALYSIS_SEGMENTS_MERGED.txt",vetoes_dir,ifo.Data(),ifo.Data());
82 sprintf(cmd,
"cat %s/HVETO_%s_ANALYSIS%d_SEGMENTS_MERGED.txt > %s/%s/HVETO_%s_ANALYSIS_SEGMENTS_MERGED.txt",
83 vetoes_dir_tmp,ifo.Data(),chunk[k],vetoes_dir,ifo.Data(),ifo.Data());
85 sprintf(cmd,
"cat %s/HVETO_%s_ANALYSIS%d_SEGMENTS_MERGED.txt >> %s/%s/HVETO_%s_ANALYSIS_SEGMENTS_MERGED.txt",
86 vetoes_dir_tmp,ifo.Data(),chunk[k],vetoes_dir,ifo.Data(),ifo.Data());
95 cout << vetoes_dir_tmp << endl << endl;
97 CWB::Toolbox::rmDir(vetoes_dir_tmp,
false);
double start[CHUNK_MAX_SIZE]
int ReadChunkList(TString ifile, int *chunk=NULL, double *start=NULL, double *stop=NULL)
int chunk[CHUNK_MAX_SIZE]
sprintf(tag,"wave_%s", data_label)
void MergeSegments(TString ifile, TString ofile, bool bexit=true)
double stop[CHUNK_MAX_SIZE]
void CreateMergedHVETO(TString run, TString ifo, TString calibVer)