Logo coherent WaveBurst  
Config Reference Guide
Logo
CWB_PluginConfig.C
Go to the documentation of this file.
1 // THIS IS THE NEW VERSION OF CONFIG PLUGIN !!!
2 // THE NEW VERSION IS REQUIRED BY ROOT6
3 // IN ROOT5 IS STILL POSSIBLE TO USE OLD & NEW VERSION
4 
5 #include "CWB_Plugin.h"
6 
8 
9  // Config Plugin to generate injected 'on the fly' NR signals
10 
11  cout << "Execute CWB_PluginConfig.C ..." << endl;
12 
13  network** net;
14  CWB_PLUGIN_IMPORT(network**,net);
15 
16  int* gIFACTOR;
17  CWB_PLUGIN_IMPORT(int*,gIFACTOR);
18 
19  CWB::mdc* MDC;
20  CWB_PLUGIN_IMPORT(CWB::mdc*,MDC);
21 
22  CWB::config** cfg;
23  CWB_PLUGIN_IMPORT(CWB::config**,cfg);
24 
25 
26 //All numbers, files etc. related to the the MonteCarlo....
27  int SEGS[9][3] =
28 {
29  {1, 1126051217, 1127271617},
30  {2, 1127271617, 1128299417},
31  {3, 1128299417, 1129383017},
32  {4, 1129383017, 1130754617},
33  {5, 1130754617, 1132104617},
34  {6, 1132104617, 1133173817},
35  {7, 1133173817, 1134450017},
36  {8, 1134450017, 1135652417},
37  {9, 1135652417, 1137258496}
38 };
39 
40  int* xstart;
41  int* xstop;
42 
43  bool check = false;
44  CWB_PLUGIN_CHECK(int*,xstop,check);
45 
46  if(check==true) {
47  CWB_PLUGIN_IMPORT(int*,xstart);
48  CWB_PLUGIN_IMPORT(int*,xstop);
49  } else {
50  xstart = new int;
51  xstop = new int;
52  *xstart = SEGS[0][1];
53  *xstop = SEGS[1][2];
54  }
55 // int* xstart;
56  // int* xstop;
57  // CWB_PLUGIN_IMPORT(int*,xstart);
58  // CWB_PLUGIN_IMPORT(int*,xstop);
59  // int xstart[1];
60  // int xstop[1];
61  // xstart[0] = 1126052217;
62  // cout << "Start: " << xstart[0] << endl;
63  // xstop[0] = 1126053217;
64  //cout << "Stop: " << xstop[0] << endl;
65 
66  int k = 0;
67  // bool included = 0;
68  while((*xstart>SEGS[k][1]) && (k<9)) {
69  //cout << "k=" << k << endl;
70  if(*xstop<SEGS[k][2]){cout << "Segment is fully included in chunk " << SEGS[k][0] << " " << SEGS[k][1] << " " << SEGS[k][2] << endl; break;}
71  else {
72  if (*xstart<SEGS[k][2]){cout << "Segment is not fully included in chunk " << SEGS[k][0] << " " << SEGS[k][1] << " " << SEGS[k][2] << endl;}
73  else{k++;}
74  }
75  //cout << "k=" << k << endl;
76  }
77 
78  char st[1024];
79  //sprintf(st,"-}, %s/O2/SEARCHES/OFFLINE/BBH/LH/SIM/BBH_BROAD_ISOTROPIC/XML/bbh_broad_isotropic},", cwb_config_env);
80  TString IDIR = "/work/salemi/git/lvc-rates-and-pop/share/O2/injection_files";
81  sprintf(st,"--xml %s/O1_%d/bbh_broad_isotropic-%d-%d.xml", IDIR.Data(), SEGS[k][0], SEGS[k][1], SEGS[k][2]);
82  //sprintf(st,"--xml bbh_broad_isotropic-%d-%d.xml", SEGS[k][1], SEGS[k][2]);
83  cout << "Opening XML file: " << st << endl;
84  TString inspOptions="";
85  inspOptions+=st;
86  inspOptions+= " --dir "+TString((*cfg)->tmp_dir)+" ";
87  // the first parameter a the name of MDC defined by the user
88  MDC->SetInspiral("SEOBNRv3_opt_rk4pseudoFourPN",inspOptions);
89 
90 }
91 
void CWB_PluginConfig()
TString inspOptions
CWB::mdc MDC(net)
char st[512]
string network
Definition: cWB_conf.py:7