Logo coherent WaveBurst  
Library Reference Guide
Logo
cwb_dump_merge_dir.C
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Gabriele Vedovato
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 // dump the list of labels of the merged files in the merge dir
20 // used by the commands : cwb_setveto, cwb_setmulti, cwb_setcuts, cwb_report, cwb_merge
21 
22 {
24 
25  vector<TString> dirList = TB.getFileListFromDir(merge_dir, ".root","","wave_");
26 
27  cout << endl;
28  cout << " --------------------" << endl;
29  cout << " List of merge labels" << endl;
30  cout << " --------------------" << endl;
31  cout << endl;
32  for(int i=0;i<dirList.size();i++) {
33  if(dirList[i].Contains("wave")) {
34  dirList[i].ReplaceAll(data_label,"");
35  dirList[i].ReplaceAll(merge_dir,"");
36  dirList[i].ReplaceAll("/","");
37  dirList[i].ReplaceAll("wave_.","");
38  dirList[i].ReplaceAll(".root","");
39  cout << " - " << dirList[i].Data() << endl;
40  }
41  }
42  cout << endl;
43 
44  exit(0);
45 }
static vector< TString > getFileListFromDir(TString dir_name, TString endString="", TString beginString="", TString containString="", bool fast=false)
Definition: Toolbox.cc:5108
CWB::Toolbox TB
i drho i
char data_label[512]
Definition: test_config1.C:160
char merge_dir[512]
Definition: test_config1.C:147
exit(0)
vector< TString > dirList