Logo coherent WaveBurst  
Library Reference Guide
Logo
cwb_dump_dq.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 data quality duty times : 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  char dq1ListFile[256];
29  cout << endl;
30  sprintf(dq1ListFile,"%s/%s.dq1",dump_dir,data_label);
31  vector<waveSegment> dq1List=TB.readSegList(nDQF, DQF, CWB_CAT1);
32  TB.dumpSegList(dq1List,dq1ListFile, false);
33  double ctime_dq1=TB.getTimeSegList(dq1List);
34  cout << "dq cat 1 ctime : " << int(ctime_dq1) << " sec " << ctime_dq1/3600. << " h " << ctime_dq1/86400. << " day" << endl;
35 
36  char dq2ListFile[256];
37  cout << endl;
38  sprintf(dq2ListFile,"%s/%s.dq2",dump_dir,data_label);
39  vector<waveSegment> dq2List=TB.readSegList(nDQF, DQF, CWB_CAT2);
40  TB.dumpSegList(dq2List,dq2ListFile, false);
41  double ctime_dq2=TB.getTimeSegList(dq2List);
42  cout << "dq cat 2 ctime : " << int(ctime_dq2) << " sec " << ctime_dq2/3600. << " h " << ctime_dq2/86400. << " day" << endl;
43  cout << endl;
44 
45  exit(0);
46 }
char dq1ListFile[256]
Definition: cwb_dump_dq.C:28
double ctime_dq2
Definition: cwb_dump_dq.C:41
CWB::Toolbox TB
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
cout<< endl;sprintf(dq1ListFile,"%s/%s.dq1", dump_dir, data_label);vector< waveSegment > dq1List
Definition: cwb_dump_dq.C:31
char data_label[512]
Definition: test_config1.C:160
cout<< "dq cat 1 ctime : "<< int(ctime_dq1)<< " sec "<< ctime_dq1/3600.<< " h "<< ctime_dq1/86400.<< " day"<< endl;char dq2ListFile[256];cout<< endl;sprintf(dq2ListFile,"%s/%s.dq2", dump_dir, data_label);vector< waveSegment > dq2List
Definition: cwb_dump_dq.C:39
i() int(T_cor *100))
dqfile DQF[12]
Definition: test_config1.C:171
static int dumpSegList(vector< waveSegment > list, TString fName, bool c4=false)
Definition: Toolbox.cc:571
double ctime_dq1
Definition: cwb_dump_dq.C:33
static vector< waveSegment > readSegList(dqfile DQF)
Definition: Toolbox.cc:409
char dump_dir[512]
Definition: test_config1.C:156
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
exit(0)