Logo coherent WaveBurst  
Library Reference Guide
Logo
cwb_tune_slag.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 {
20  #include <vector>
21 
23  vector<slag> slagList;
24 
25  slagFile = new char[256];
26  sprintf(slagFile,"report/%s.slg",data_label);
27 
28  vector<waveSegment> cat1List=TB.readSegList(nDQF, DQF, CWB_CAT1);
29  int slagSegs=TB.getSlagJobList(cat1List, segLen).size();
30 
31  slagList=TB.getSlagList(nIFO, slagSize, slagSegs, slagOff, slagMin, slagMax, slagSite);
32  slagList=TB.dumpSlagList(slagList, slagFile);
33 
34  cout << endl;
35  printf("%14s ","SLAG");
36  for(int n=0; n<nIFO; n++) printf("%8sifo[%d]","",n);
37  printf("\n");
38  for(int i=0;i<slagList.size();i++) {
39  if(slagList[i].slagId[1]==1) {
40  printf("%14d", slagList[i].slagId[0]);
41  for (int n=0; n<nIFO; n++) printf("%14d",slagList[i].slagId[n+2]);
42  printf("\n");
43  }
44  }
45 
46  cout << endl;
47  cout << "Total number of slag jobs : " << slagList.size() << endl;
48  cout << endl;
49 
50  exit(0);
51 }
int slagSize
Definition: test_config1.C:65
size_t * slagSite
Definition: test_config1.C:69
int slagOff
Definition: test_config1.C:68
int n
Definition: cwb_net.C:28
int slagMax
Definition: test_config1.C:67
CWB::Toolbox TB
i drho i
nDQF
Definition: cwb_eced.C:109
#define nIFO
char data_label[512]
Definition: test_config1.C:160
vector< waveSegment > cat1List
Definition: cwb_tune_slag.C:28
dqfile DQF[12]
Definition: test_config1.C:171
static vector< waveSegment > getSlagJobList(vector< waveSegment > ilist, int seglen=600)
Definition: Toolbox.cc:1791
printf("total live time: non-zero lags = %10.1f \, liveTot)
segLen
Definition: cwb_eced.C:24
static vector< slag > getSlagList(size_t nIFO, size_t slagSize, int slagSegs, int slagOff, size_t slagMin, size_t slagMax, size_t *slagSite, char *slagFile=NULL)
Definition: Toolbox.cc:809
static void dumpSlagList(vector< slag > slagList, TString slagFile, bool slagOnly=false)
Definition: Toolbox.cc:1087
static vector< waveSegment > readSegList(dqfile DQF)
Definition: Toolbox.cc:409
int slagSegs
Definition: cwb_tune_slag.C:29
vector< slag > slagList
Definition: cwb_tune_slag.C:19
slagFile
Definition: cwb_tune_slag.C:25
sprintf(slagFile,"report/%s.slg", data_label)
int slagMin
Definition: test_config1.C:66
exit(0)