Logo coherent WaveBurst  
Library Reference Guide
Logo
cwb_dump_sjob.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 // list the jobs used for slags (fixed length) : used by the cwb_dump command
20 
21 {
23 
24  TB.checkFile(gSystem->Getenv("CWB_ROOTLOGON_FILE"));
25  TB.checkFile(gSystem->Getenv("CWB_PARAMETERS_FILE"));
26  TB.checkFile(gSystem->Getenv("CWB_UPARAMETERS_FILE"));
27 
28  double xtime;
29  char jobListFile[256];
30  sprintf(jobListFile,"%s/%s.sjob",dump_dir,data_label);
31  char dq1ListFile[256];
32  sprintf(dq1ListFile,"%s/%s.cat1",dump_dir,data_label);
33 
34  cout<<endl<<"-------------------------------------------------------------------------------------"<< endl<<endl;
35 
37  vector<waveSegment> dq1List=TB.readSegList(nDQF, DQF, dqcat);
38  TB.dumpSegList(dq1List,dq1ListFile, false);
39  cout << "Dump file : " << dq1ListFile << endl;
40  xtime=TB.getTimeSegList(dq1List);
41  cout << "cat1 livetime : " << int(xtime) << " sec "
42  << xtime/3600. << " h " << xtime/86400. << " day" << endl;
43 
44  cout<<endl<<"-------------------------------------------------------------------------------------"<< endl<<endl;
45 
46  vector<waveSegment> jobList=TB.getSlagJobList(dq1List, segLen); // get slag job list
47  TB.dumpSegList(jobList, jobListFile); // dump slag job list to file (ONLY FOR DEBUG !!!)
48  cout << "Dump file : " << jobListFile << endl;
49  //cout << "nJob = " << jobList.size() << endl;
50  xtime=TB.getTimeSegList(jobList);
51  //cout << "job livetime : " << int(xtime) << " sec "
52  // << xtime/3600. << " h " << xtime/86400. << " day" << endl;
53  cout << endl;
54 
55  exit(0);
56 }
sprintf(jobListFile,"%s/%s.sjob", dump_dir, data_label)
CWB_CAT dqcat
CWB::Toolbox TB
CWB_CAT
Definition: Toolbox.hh:72
cout<< "Dump file : "<< dq1ListFile<< endl;xtime=TB.getTimeSegList(dq1List);cout<< "cat1 livetime : "<< int(xtime)<< " sec "<< xtime/3600.<< " h "<< xtime/86400.<< " day"<< endl;cout<< endl<<"-------------------------------------------------------------------------------------"<< endl<< endl;vector< waveSegment > jobList
Definition: cwb_dump_sjob.C:46
static double getTimeSegList(vector< waveSegment > list)
Definition: Toolbox.cc:611
static bool checkFile(TString fName, bool question=false, TString message="")
Definition: Toolbox.cc:4670
nDQF
Definition: cwb_eced.C:109
char dq1ListFile[256]
Definition: cwb_dump_sjob.C:31
char data_label[512]
Definition: test_config1.C:160
i() int(T_cor *100))
dqfile DQF[12]
Definition: test_config1.C:171
cout<< endl<<"-------------------------------------------------------------------------------------"<< endl<< endl;CWB_CAT dqcat=CWB_CAT1;vector< waveSegment > dq1List
Definition: cwb_dump_sjob.C:37
static int dumpSegList(vector< waveSegment > list, TString fName, bool c4=false)
Definition: Toolbox.cc:571
static vector< waveSegment > getSlagJobList(vector< waveSegment > ilist, int seglen=600)
Definition: Toolbox.cc:1791
segLen
Definition: cwb_eced.C:24
static vector< waveSegment > readSegList(dqfile DQF)
Definition: Toolbox.cc:409
double xtime
Definition: cwb_dump_sjob.C:28
char dump_dir[512]
Definition: test_config1.C:156
char jobListFile[256]
Definition: cwb_dump_sjob.C:29
exit(0)