Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cwb_dump_report_dir.C
Go to the documentation of this file.
1 // dump the list of labels of the report files in the report dir : used by the commands cwb_report
2 {
4 
5  vector<TString> repList = TB.getFileListFromDir(pp_dir, "M");
6 
8  www_rep.ReplaceAll(report_dir+TString("/"),"");
10  if(gSystem->Getenv("HOME")==NULL) {
11  cout << "Error : environment HOME is not defined!!!" << endl;exit(1);
12  } else {
13  home=TString(gSystem->Getenv("HOME"));
14  }
15  www_rep.ReplaceAll("~",home);
16  cout << endl;
17  cout << www_rep << endl;
18  vector<TString> wwwList = TB.getFileListFromDir(www_rep, "M");
19  cout << endl;
20  cout << " -----------------------------" << endl;
21  cout << " List of report directories" << endl;
22  cout << " -----------------------------" << endl;
23  cout << endl;
24 
25  for(int i=0;i<repList.size();i++) {
26  repList[i].ReplaceAll(pp_dir,"");
27  repList[i].ReplaceAll("/","");
28  bool published=false;
29  for(int j=0;j<wwwList.size();j++) {
30  wwwList[j].ReplaceAll(www_rep,"");
31  wwwList[j].ReplaceAll("/","");
32  if(wwwList[j].CompareTo(repList[i])==0) published=true;;
33  }
34  if(published) {
35  cout << " x : " << repList[i].Data() << endl;
36  } else {
37  cout << " - : " << repList[i].Data() << endl;
38  }
39  }
40  cout << endl;
41  cout << " -----------------------------" << endl;
42  cout << " x/- : published/not-published" << endl;
43  cout << endl;
44 
45  exit(0);
46 }
static vector< TString > getFileListFromDir(TString dir_name, TString endString="", TString beginString="", TString containString="", bool fast=false)
Definition: Toolbox.cc:4333
TString www_rep
TString home
TString("c")
char www_dir[512]
Definition: test_config1.C:157
cout<< endl;cout<< www_rep<< endl;vector< TString > wwwList
int j
Definition: cwb_net.C:10
char report_dir[512]
Definition: test_config1.C:149
i drho i
CWB::Toolbox TB
Definition: ComputeSNR.C:5
char data_label[512]
Definition: test_config1.C:160
vector< TString > repList
char pp_dir[512]
Definition: test_config1.C:155
exit(0)