Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CWB_Plugin_cwb_inet.C
Go to the documentation of this file.
1 #define XIFO 4
2 
3 #pragma GCC system_header
4 
5 #include "cwb.hh"
6 #include "config.hh"
7 #include "network.hh"
8 #include "wavearray.hh"
9 #include "gwavearray.hh"
10 #include "TString.h"
11 #include "TObjArray.h"
12 #include "TObjString.h"
13 #include "TRandom.h"
14 #include "TComplex.h"
15 #include "TMath.h"
16 #include "mdc.hh"
17 #include <vector>
18 
20 TString CWB_Plugin_CheckIFO(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
22 TString CWB_Plugin_CheckTYPE(TString cwb_inet_options,TFile* jfile, CWB::config* cfg, TString type);
23 void CWB_Plugin_frdisplay(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
24  network* net, WSeries<double>* x, TString ifo, int type);
25 void CWB_Plugin_psd(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
26  network* net, WSeries<double>* x, TString ifo, int type);
27 void CWB_Plugin_inj(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
28  network* net, WSeries<double>* x, TString ifo, int type);
29 void CWB_Plugin_nRMS(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
30  network* net, WSeries<double>* x, TString ifo, int type);
31 void CWB_Plugin_wdm(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
32  network* net, WSeries<double>* x, TString ifo, int type);
33 void CWB_Plugin_emax(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
34  network* net, WSeries<double>* xdummy, TString sdummy, int type);
35 void CWB_Plugin_sparse(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
36  network* net, TString ifo, int type);
37 void CWB_Plugin_ced(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
38  network* net, TString ifo, int type);
39 
40 void
42 
43 // Plugin to show data with frdisplay & psd with the cwb_inet command
44 
45  if(TString(cfg->analysis)!="2G") {
46  cout << "CWB_Plugin_cwb_inet.C : allowed only for 2G analysis" << endl;
47  gSystem->Exit(1);
48  }
49 
50  // get cwb_inet options
51  TString cwb_inet_options=TString(gSystem->Getenv("CWB_INET_OPTIONS"));
52 
53  cout << endl;
54  cout << "-----> plugins/CWB_Plugin_cwb_inet.C : ifo : " << ifo.Data() << " - type : " << type << endl;
55  cout << " options : " << cwb_inet_options << endl;
56  cout << endl;
57 
58  // get ifo : return if not equal to input plugin parameter (ifo)
59  TString cwb_inet_tool = CWB::Toolbox::getParameter(cwb_inet_options,"--tool");
60  cwb_inet_tool.ToUpper();
61  TString cwb_inet_type = CWB::Toolbox::getParameter(cwb_inet_options,"--type");
62  cwb_inet_type.ToUpper();
63 
64  // exit if cwb_inet_tool can not be applied
65  bool error = true;
66  // import istage,jstage
67  //CWB_STAGE gISTAGE=-1; IMPORT(CWB_STAGE,gISTAGE)
68  int gISTAGE=-1; IMPORT(int,gISTAGE)
69  int gJSTAGE=-1; IMPORT(int,gJSTAGE)
70 
71  if((gISTAGE<CWB_STAGE_STRAIN)&&(gJSTAGE>=CWB_STAGE_STRAIN)||(gJSTAGE==CWB_STAGE_FULL)) {
72  if((cwb_inet_tool=="PSD")&&((cwb_inet_type=="STRAIN")||(cwb_inet_type=="MDC"))) error=false;
73  if((cwb_inet_tool=="WDM")&&((cwb_inet_type=="STRAIN")||(cwb_inet_type=="MDC"))) error=false;
74  if((cwb_inet_tool=="FRDISPLAY")&&((cwb_inet_type=="STRAIN")||(cwb_inet_type=="MDC"))) error=false;
75  if(cwb_inet_tool=="INJ") error=false;
76  }
77  if((gISTAGE<CWB_STAGE_CSTRAIN)&&(gJSTAGE>=CWB_STAGE_CSTRAIN)||(gJSTAGE==CWB_STAGE_FULL)) {
78  if((cwb_inet_tool=="WDM")&&(cwb_inet_type=="STRAIN")) error=false;
79  if((cwb_inet_tool=="PSD")&&(cwb_inet_type=="WHITE")) error=false;
80  if((cwb_inet_tool=="WDM")&&(cwb_inet_type=="WHITE")) error=false;
81  if((cwb_inet_tool=="FRDISPLAY")&&(cwb_inet_type=="WHITE")) error=false;
82  if(cwb_inet_tool=="INJ") error=false;
83  if(cwb_inet_tool=="NRMS") error=false;
84  }
85  if((gISTAGE<CWB_STAGE_COHERENCE)&&(gJSTAGE>=CWB_STAGE_COHERENCE)||(gJSTAGE==CWB_STAGE_FULL)) {
86  if(cwb_inet_tool=="EMAX") error=false;
87  }
88  if((gISTAGE<CWB_STAGE_SUPERCLUSTER)&&(gJSTAGE>=CWB_STAGE_SUPERCLUSTER)||(gJSTAGE==CWB_STAGE_FULL)) {
89  if((cwb_inet_tool=="SPARSE")&&(cwb_inet_type=="SUPERCLUSTER")) error=false;
90  }
91  if((gISTAGE<CWB_STAGE_LIKELIHOOD)&&(gJSTAGE>=CWB_STAGE_LIKELIHOOD)||(gJSTAGE==CWB_STAGE_FULL)) {
92  if((cwb_inet_tool=="SPARSE")&&(cwb_inet_type=="LIKELIHOOD")) error=false;
93  if(cwb_inet_tool=="CED") error=false;
94  }
95 
96  if(error) {
97  cout << "CWB_Plugin_cwb_inet.C : cwb_inet option can not applied for this stage range , process terminated!!!" << endl;
98  cout << endl;
99  cout << "OPTIONS : " << cwb_inet_options << endl;
100  cout << "BEGIN STAGE : " << cwb::GetStageString(CWB_STAGE(gISTAGE)) << endl;
101  cout << "END STAGE : " << cwb::GetStageString(CWB_STAGE(gJSTAGE)) << endl;
102  cout << endl;
104  gSystem->Exit(1);
105  }
106 
107  // execute plugin
108  if(cwb_inet_tool=="FRDISPLAY") CWB_Plugin_frdisplay(cwb_inet_options, jfile, cfg, net, x, ifo, type);
109  else if(cwb_inet_tool=="PSD") CWB_Plugin_psd(cwb_inet_options, jfile, cfg, net, x, ifo, type);
110  else if(cwb_inet_tool=="INJ") CWB_Plugin_inj(cwb_inet_options, jfile, cfg, net, x, ifo, type);
111  else if(cwb_inet_tool=="NRMS") CWB_Plugin_nRMS(cwb_inet_options, jfile, cfg, net, x, ifo, type);
112  else if(cwb_inet_tool=="WDM") CWB_Plugin_wdm(cwb_inet_options, jfile, cfg, net, x, ifo, type);
113  else if(cwb_inet_tool=="EMAX") CWB_Plugin_emax(cwb_inet_options, jfile, cfg, net, x, ifo, type);
114  else if(cwb_inet_tool=="SPARSE") CWB_Plugin_sparse(cwb_inet_options, jfile, cfg, net, ifo, type);
115  else if(cwb_inet_tool=="CED") CWB_Plugin_ced(cwb_inet_options, jfile, cfg, net, ifo, type);
116  else {
117  cout << "CWB_Plugin_cwb_inet.C : Bad inet option --tool " << cwb_inet_tool << endl;
118  cout << "Select : --tool FRDISPLAY/PSD/NRMS/WDM/EMAX/SPARSE/CED" << endl << endl;
120  gSystem->Exit(1);
121  }
122 }
123 
124 void
125 CWB_Plugin_ced(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
126  network* net, TString ifo, int type) {
127 
128  if(type==CWB_PLUGIN_ILIKELIHOOD) { // save ced to jfile
129  cfg->cedDump = true;
130  unsigned int jobfOptions = cfg->jobfOptions;
131  jobfOptions |= CWB_JOBF_SAVE_CED;
132  cfg->jobfOptions = (CWB_JOBF_OPTIONS)jobfOptions;
133  return;
134  }
135  if(type!=CWB_PLUGIN_CLOSE_JOB) return;
136 
137  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
138  cwb_inet_draw.ToUpper();
139 
140  // get job file name
141  TString jname = jfile->GetPath();
142  jname.ReplaceAll(":/","");
143  cout << jname.Data() << endl;
144 
145  if(cwb_inet_draw=="TRUE") {
146  // creates a temporary file name
147  char fmacroName[1024];
148  unsigned int Pid = gSystem->GetPid(); // used to tag in a unique way the temporary files
149  sprintf(fmacroName,"%s/CWB_Plugin_cwb_inet_ced_macro_%s_%d_job%d.XXXXXX",
150  cfg->tmp_dir,cfg->data_label,Pid,net->nRun);
151  CWB::Toolbox::mksTemp(fmacroName); // create temporary file, must be deleted only at the end of run
152  ofstream out;
153  out.open(fmacroName,ios::out);
154  if(!out.good()) {
155  cout << "CWB_Plugin_cwb_inet.C - Error : Opening File : " << fmacroName << endl;
156  gSystem->Exit(1);
157  }
158  char line[1024];
159  sprintf(line,"{TFile* ifile = new TFile(\"%s\");TBrowser br(\"CWB\",ifile);}",jname.Data());
160  out << line << endl;
161  out.close();
162 
163  char cmd[1024];
164  // start root browser
165  sprintf(cmd,"root -l %s",fmacroName);
166  cout << cmd << endl; gSystem->Exec(cmd);
167  // remove temporary files
168  sprintf(cmd,"rm %s",jname.Data());
169  cout << cmd << endl; gSystem->Exec(cmd);
170  sprintf(cmd,"rm %s",fmacroName);
171  cout << cmd << endl; gSystem->Exec(cmd);
172  }
173 
175  gSystem->Exit(0);
176 }
177 
178 void
179 CWB_Plugin_sparse(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
180  network* net, TString ifo, int type) {
181 
182  // get type : return if not equal to input plugin parameter (type)
183  TString cwb_inet_type = CWB_Plugin_CheckTYPE(cwb_inet_options, jfile, cfg, type);
184  if(cwb_inet_type=="") return;
185  cwb_inet_type.ToLower();
186 
187  bool check=false;
188  if((type==CWB_PLUGIN_ISUPERCLUSTER)&&(cwb_inet_type=="supercluster")) check=true;
189  if((type==CWB_PLUGIN_ILIKELIHOOD)&&(cwb_inet_type=="likelihood")) check=true;
190  if(!check) return;
191 
192  // get ifo : return if not equal to input plugin parameter (ifo)
193  TString cwb_inet_ifo = CWB::Toolbox::getParameter(cwb_inet_options,"--ifo");
194  // check if ifo is in the network
195  if(cwb_inet_ifo!="") CWB_Plugin_CheckIFO(cwb_inet_options, jfile, cfg, net, ifo);
196 
197  watplot* WTS = new watplot(const_cast<char*>("WTS"));
198 
199  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
200  cwb_inet_draw.ToUpper();
201  TString odir = cfg->dump_dir;
202 
203  // get draw mode
204  TString cwb_inet_mode = CWB::Toolbox::getParameter(cwb_inet_options,"--mode");
205  int mode = (cwb_inet_mode!="") ? cwb_inet_mode.Atoi() : 1;
206  TString gmode="";
207  if(mode==0) mode=1;
208  if(mode==1) gmode="(E00+E90)/2";
209  if(mode==2) gmode="sqrt((E00+E90)/2)";
210  if(mode==3) gmode="amplitude:00";
211  if(mode==4) gmode="energy:00";
212  if(mode==5) gmode="|amplitude:00|";
213  if(mode==6) gmode="amplitude:90";
214  if(mode==7) gmode="energy:90";
215  if(mode==8) gmode="|amplitude:90|";
216 
217  // get core pixels selection
218  // core=true -> rebuild TF map using only core pixels
219  // core=false -> rebuild TF map using all pixels
220  TString cwb_inet_core = CWB::Toolbox::getParameter(cwb_inet_options,"--core");
221  cwb_inet_core = ((cwb_inet_core=="true")||(cwb_inet_core=="false")) ? cwb_inet_core : "true";
222 
223  // open ioutput root file
224  char fName[1024];
225  sprintf(fName,"%s/sparse_%s_%s_%d_%s_job%lu.root",
226  odir.Data(),cwb_inet_type.Data(),cwb_inet_ifo.Data(),mode,cfg->data_label,net->nRun);
227  TFile* ofile = new TFile(fName,"RECREATE");
228 
229  int nIFO = net->ifoListSize();
230  detector* pD[NIFO_MAX]; //! pointers to detectors
231  for(int n=0;n<nIFO;n++) pD[n] = net->getifo(n);
232  //for(int n=0;n<nIFO;n++) cout << n << " detector Name : " << pD[n]->Name << endl;
233 
234  bool singleDetector = false;
235  if(nIFO==2 && TString(pD[1]->Name)==pD[0]->Name) singleDetector=true;
236 
237  for(int n=0;n<nIFO;n++) { // loop over detectors
238  if(cwb_inet_ifo!="") if(net->getifo(n)->Name!=cwb_inet_ifo) continue;
239 
240  // create ifo root directory to store sparse TF
241  TDirectory* dsparse = ofile->mkdir(pD[n]->Name);
242  dsparse->cd();
243 
244  int nSS = pD[n]->vSS.size();
245  for(int i=0;i<nSS;i++) { // loop over levels
246 
247  int level;
248  if(cwb_inet_type=="supercluster") level = i+cfg->l_low;
249  if(cwb_inet_type=="likelihood") level = i+cfg->l_low;
250 
251  // create ifo root directory to store sparse TF
252  char dname[32]; sprintf(dname,"%s:level-%d",pD[n]->Name,level);
253  TDirectory* dlevel = dsparse->mkdir(dname);
254  dlevel->cd();
255 
256  size_t rateANA=cfg->inRate>>cfg->levelR;
257  int rate = rateANA>>level;
258  double dt = 1000./rate;
259  double df = rateANA/2./double(1<<level);
260  cout << "level : " << level << "\t rate : " << rate
261  << "\t df(hz) : " << df << "\t dt(ms) : " << dt << endl;
262 
263  bool core = (cwb_inet_core=="true") ? true : false;
264  pD[n]->vSS[i].Expand(core); // rebuild wseries from sparse table
265  //cout << "REBUILD SIZE " << pD[n]->vSS[i].size() << endl;
266 
267  WSeries<double>* WS = (WSeries<double>*)(&(pD[n]->vSS[i]));
268 
269  // Plot WDM Scalogram
270  double start = WS->start();
271  double stop = WS->start()+WS->size()/WS->rate();
272  double flow = cfg->fLow;
273  double fhigh = cfg->fHigh;
274 
275  WTS->plot(WS, mode, start, stop,const_cast<char*>("COLZ"));
276  WTS->hist2D->GetYaxis()->SetRangeUser(flow, fhigh);
277  char title[64];
278  sprintf(title,"SPARSE TF (%s) - ifo:%s - type:sparse - level:%d - dt:%g (ms) - df=%g (Hz)",
279  gmode.Data(),net->getifo(n)->Name,level,dt,df);
280  WTS->hist2D->SetTitle(title);
281  char name[64]; sprintf(name,"%s:tf:sparse:%d",net->getifo(n)->Name,level);
282  WTS->canvas->Write(name);
283 
284  // project hist2D to time axis
285  sprintf(name,"%s:t:sparse:%d",net->getifo(n)->Name,level);
286  sprintf(title,"SPARSE:TIME (%s) - ifo:%s - type:sparse - level:%d - dt:%g (ms) - df=%g (Hz)",
287  gmode.Data(),net->getifo(n)->Name,level,dt,df);
288  TH1D *tProjH2 = WTS->hist2D->ProjectionX(name);
289  WTS->canvas->Clear();
290  tProjH2->SetTitle(title);
291  tProjH2->SetStats(kFALSE);
292  tProjH2->Draw();
293  WTS->canvas->Write(name);
294 
295  // project hist2D to frequency axis
296  int hist2D_size = WTS->hist2D->GetNbinsX();
297  int edgeSize = (int)(hist2D_size*cfg->segEdge/(2*cfg->segEdge+cfg->segLen));
298  sprintf(name,"%s:f:sparse:%d",net->getifo(n)->Name,level);
299  sprintf(title,"SPARSE:FREQ (%s) - ifo:%s - type:sparse - level:%d - dt:%g (ms) - df=%g (Hz)",
300  gmode.Data(),net->getifo(n)->Name,level,dt,df);
301  TH1D *fProjH2 = WTS->hist2D->ProjectionY(name,edgeSize,hist2D_size-edgeSize);
302  WTS->canvas->Clear();
303  fProjH2->SetTitle(title);
304  fProjH2->SetStats(kFALSE);
305  fProjH2->Draw();
306  WTS->canvas->Write(name);
307 
308  }
309  if(singleDetector) break;
310  }
311 
312  delete WTS;
313  delete ofile;
314 
315  if(cwb_inet_draw=="TRUE") {
316  // creates a temporary file name
317  char fmacroName[1024];
318  unsigned int Pid = gSystem->GetPid(); // used to tag in a unique way the temporary files
319  sprintf(fmacroName,"%s/CWB_Plugin_cwb_inet_sparse_macro_%s_%d_job%d.XXXXXX",
320  cfg->tmp_dir,cfg->data_label,Pid,net->nRun);
321  CWB::Toolbox::mksTemp(fmacroName); // create temporary file, must be deleted only at the end of run
322  ofstream out;
323  out.open(fmacroName,ios::out);
324  if(!out.good()) {cout << "CWB_Plugin_cwb_inet.C - Error : Opening File : " << fmacroName << endl;gSystem->Exit(1);}
325  char line[1024];
326  sprintf(line,"{TFile* ifile = new TFile(\"%s\");TBrowser br(\"CWB\",ifile);}",fName);
327  out << line << endl;
328  out.close();
329 
330  char cmd[1024];
331  // start root browser
332  sprintf(cmd,"root -l %s",fmacroName);
333  cout << cmd << endl; gSystem->Exec(cmd);
334  // remove temporary files
335  sprintf(cmd,"rm %s",fName);
336  cout << cmd << endl; gSystem->Exec(cmd);
337  sprintf(cmd,"rm %s",fmacroName);
338  cout << cmd << endl; gSystem->Exec(cmd);
339  } else {
340  cout << endl << "Dump Sparse : " << fName << endl << endl;
341  }
342 
344  gSystem->Exit(0);
345 }
346 
347 void
348 CWB_Plugin_nRMS(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
349  network* net, WSeries<double>* x, TString ifo, int type) {
350 
351  if(type!=CWB_PLUGIN_ODATA_CONDITIONING) return;
352 
353  // get type : return if not equal to input plugin parameter (type)
354  TString cwb_inet_type = CWB_Plugin_CheckTYPE(cwb_inet_options, jfile, cfg, type);
355  if(cwb_inet_type=="") return;
356 
357  // get ifo : return if not equal to input plugin parameter (ifo)
358  TString cwb_inet_ifo = CWB_Plugin_CheckIFO(cwb_inet_options, jfile, cfg, net, ifo);
359  if(cwb_inet_ifo=="") return;
360 
361  if(x==NULL) {
362  cout << "CWB_Plugin_cwb_inet.C : Error : NULL data " << endl;
363  gSystem->Exit(1);
364  }
365 
366  TString cwb_inet_gps = CWB::Toolbox::getParameter(cwb_inet_options,"--gps");
367  double gps = 0;
368  if(cwb_inet_gps!="") {
369  if(!cwb_inet_gps.IsFloat()) {
370  cout<< "CWB_Plugin_cwb_inet.C : Error : --gps value is not a number" << endl;
371  exit(1);
372  }
373  if(cwb_inet_gps.Atof()>0) gps=cwb_inet_gps.Atof();
374  cout.precision(14);
375  cout << "CWB_Plugin_cwb_inet.C : gps = " << gps << endl;
376  }
377 
378  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
379  cwb_inet_draw.ToUpper();
380  TString odir = cfg->dump_dir;
381 
382  // get oneside option // default is TRUE
383  TString cwb_inet_oneside = CWB::Toolbox::getParameter(cwb_inet_options,"--oneside");
384  cwb_inet_oneside.ToUpper();
385  if(cwb_inet_oneside=="") cwb_inet_oneside="TRUE";
386  if((cwb_inet_oneside!="TRUE")&&(cwb_inet_oneside!="FALSE")) {
387  cout << "CWB_Plugin_cwb_inet.C : Error : wrong --oneside option , must be true/false" << endl;
388  gSystem->Exit(1);
389  }
390  TString psdtype = (cwb_inet_oneside=="TRUE") ? "oneside" : "doubleside";
391  bool oneside = (cwb_inet_oneside=="TRUE") ? true : false;
392 
393  // get nRMS
394  WSeries<double> nRMS;
395  int nIFO = net->ifoListSize();
396  for(int n=0;n<nIFO;n++) if(ifo==net->getifo(n)->Name) nRMS=net->getifo(n)->nRMS;
397 
398  int levels = nRMS.getLevel()+1; // number of levels
399  int slices = nRMS.size()/levels; // number of nRMS samples
400  double length = slices*cfg->whiteStride; // nRMS len in sec
401 
402  // nRMS do not come from a TF transform
403  // nRMS params must be fixed before to pass to watplot
404  double rate = nRMS.rate();
405  double fNinquist = rate/2.;
406  nRMS.rate(nRMS.size()/length);
407  WDM<double>* wdm = (WDM<double>*) nRMS.pWavelet;
408  wdm->nSTS=nRMS.size();
409 
410  // Plot nRMS Scalogram
411  double start = nRMS.start();
412  double stop = nRMS.start()+nRMS.size()/nRMS.rate();
413  double flow = cfg->fLow;
414  double fhigh = cfg->fHigh;
415 
416  if(gps>0) { // if options --gps value > 0 we extract rms at that time and produce PSD
417 
418  if(gps<start || gps>stop) {
419  cout.precision(14);
420  cout << "CWB_Plugin_cwb_inet.C : Error : --gps value is out of the data range ["
421  << start << ":" << stop << "]" << endl;
422  gSystem->Exit(1);
423  }
424 
425  int M = nRMS.getLevel();
426  const double scale = 1./nRMS.wrate();
427  int igps = (gps-nRMS.start())/scale + 1; // time index
428 
429  // dump nRMS to file
430  char file[1024];
431  double chuncklen=8; // default = 8 sec
432  // get chuncklen options - Example --chuncklen 8
433  TString cwb_inet_chuncklen = CWB::Toolbox::getParameter(cwb_inet_options,"--chuncklen");
434  if(cwb_inet_chuncklen.IsFloat()) chuncklen = cwb_inet_chuncklen.Atof();
435  if(chuncklen==0) chuncklen=x->size()/x->rate()-2*cfg->segEdge; // chuncklen = full buffer
436  sprintf(file,"%s/nrms_%s_gps%10.2f_%s_%s_%d_%s_job%lu.txt",
437  odir.Data(),psdtype.Data(),gps,cwb_inet_type.Data(),ifo.Data(),int(x->start()),cfg->data_label,net->nRun);
438  cout << endl << "Dump nRMS " << "(chuncklen = " << chuncklen << ")"
439  << " : " << file << endl << endl;
440  ofstream out;
441  out.open(file,ios::out);
442  if(!out.good()) {cout << "CWB_Plugin_cwb_inet.C : Error Opening File : " << file << endl;exit(1);}
443 
444  double inRate = cfg->fResample>0 ? cfg->fResample : cfg->inRate;
445  double rescale = oneside ? sqrt(2.)/sqrt(inRate) : 1./sqrt(inRate);
446 
447  double df=fNinquist/M;
448  for(int j=1; j<M; ++j) {
449  double f = j*df+df/2.;
450  if(f<flow || f>fhigh) continue;
451  out << j*df+df/2. << " " << nRMS.data[igps*(M+1)+j]*rescale << endl;
452  }
453  out.close();
454 
455  if(cwb_inet_draw=="TRUE") {
456  TString cwb_inet_save = CWB::Toolbox::getParameter(cwb_inet_options,"--save");
457  cwb_inet_save.ToUpper();
458  int save = cwb_inet_save=="TRUE" ? 1 : 0;
459  TString cwb_inet_range = CWB::Toolbox::getParameter(cwb_inet_options,"--range");
460  cwb_inet_range.ToUpper();
461  int range = cwb_inet_range=="FIX" ? 1 : 0;
462  char cmd[1024];
463  // execute cwb_draw_sensitivity
464  sprintf(cmd,"export CWB_SENSITIVITY_FILE_NAME=\"%s\";",file);
465  sprintf(cmd,"%s export CWB_SENSITIVITY_SAVE_PLOT=%d;",cmd,save);
466  sprintf(cmd,"%s export CWB_SENSITIVITY_RANGE_FIX=%d;",cmd,range);
467  sprintf(cmd,"%s root -n -l ${CWB_MACROS}/cwb_draw_sensitivity.C",cmd);
468  cout << cmd << endl; gSystem->Exec(cmd);
469 
470  // remove temporary files
471  sprintf(cmd,"rm %s",file);
472  cout << cmd << endl; gSystem->Exec(cmd);
473  }
474 
475  } else { // produce the T/F plot of nRMS
476 
477  // open ioutput root file
478  char fName[1024];
479  sprintf(fName,"%s/nRMS_%s_%d_%s_job%lu.root",
480  odir.Data(),ifo.Data(),int(x->start()),cfg->data_label,net->nRun);
481  TFile* ofile = new TFile(fName,"RECREATE");
482  cout << endl << "Dump nRMS : " << fName << endl << endl;
483 
484  watplot* WTS = new watplot(const_cast<char*>("nRMS"));
485  WTS->plot(nRMS, 3, start, stop,const_cast<char*>("COLZ"));
486  WTS->hist2D->GetYaxis()->Set(WTS->hist2D->GetNbinsY(),0, fNinquist); // correct freq range
487  WTS->hist2D->GetYaxis()->SetRangeUser(flow, fhigh);
488  char title[64];
489  sprintf(title,"nRMS TF - ifo:%s", ifo.Data());
490  WTS->hist2D->SetTitle(title);
491  char name[64]; sprintf(name,"%s",ifo.Data());
492  WTS->canvas->SetLogz(true);
493  WTS->canvas->Write(name);
494 // delete WTS; // this instruction is commented because it produces a crash (why?)
495 
496  delete ofile;
497 
498  if(cwb_inet_draw=="TRUE") {
499  // creates a temporary file name
500  char fmacroName[1024];
501  unsigned int Pid = gSystem->GetPid(); // used to tag in a unique way the temporary files
502  sprintf(fmacroName,"%s/CWB_Plugin_cwb_inet_nRMS_macro_%s_%d_job%d.XXXXXX",
503  cfg->tmp_dir,cfg->data_label,Pid,net->nRun);
504  CWB::Toolbox::mksTemp(fmacroName); // create temporary file, must be deleted only at the end of run
505  ofstream out;
506  out.open(fmacroName,ios::out);
507  if(!out.good()) {cout << "CWB_Plugin_cwb_inet.C - Error : Opening File : " << fmacroName << endl;gSystem->Exit(1);}
508  char line[1024];
509  sprintf(line,"{TFile* ifile = new TFile(\"%s\");TBrowser br(\"CWB\",ifile);}",fName);
510  out << line << endl;
511  out.close();
512 
513  char cmd[1024];
514  // start root browser
515  sprintf(cmd,"root -l %s",fmacroName);
516  cout << cmd << endl; gSystem->Exec(cmd);
517  // remove temporary files
518  sprintf(cmd,"rm %s",fName);
519  cout << cmd << endl; gSystem->Exec(cmd);
520  sprintf(cmd,"rm %s",fmacroName);
521  cout << cmd << endl; gSystem->Exec(cmd);
522  }
523  }
524 
526  gSystem->Exit(0);
527 }
528 
529 void
530 CWB_Plugin_wdm(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
531  network* net, WSeries<double>* x, TString ifo, int type) {
532 
533  // get type : return if not equal to input plugin parameter (type)
534  TString cwb_inet_type = CWB_Plugin_CheckTYPE(cwb_inet_options, jfile, cfg, type);
535  if(cwb_inet_type=="") return;
536  cwb_inet_type.ToLower();
537 
538  // get ifo : return if not equal to input plugin parameter (ifo)
539  TString cwb_inet_ifo = CWB_Plugin_CheckIFO(cwb_inet_options, jfile, cfg, net, ifo);
540  if(cwb_inet_ifo=="") return;
541 
542  if(x==NULL) {
543  cout << "CWB_Plugin_cwb_inet.C : Error : NULL data " << endl;
544  gSystem->Exit(1);
545  }
546 
547  watplot* WTS = new watplot(const_cast<char*>("WTS"));
548 
549  wavearray<double> y = *x; // copy original data to y (contains the final handled data)
550  WSeries<double> w; // temporary array for data manipulation
551  Meyer<double> B(1024); // set wavelet for resampling
552  WDM<double>* pwdm = NULL;
553 
554  if(type==CWB_PLUGIN_STRAIN) { // we must apply resampling
555  if(cfg->fResample>0) { // RESAMPLING
556  y.FFTW(1);
557  y.resize(cfg->fResample/y.rate()*y.size());
558  y.FFTW(-1);
559  y.rate(cfg->fResample);
560  }
561  w.Forward(y,B,cfg->levelR);
562  w.getLayer(y,0);
563  }
564 
565  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
566  cwb_inet_draw.ToUpper();
567  TString odir = cfg->dump_dir;
568 
569  // get draw mode
570  TString cwb_inet_mode = CWB::Toolbox::getParameter(cwb_inet_options,"--mode");
571  int mode = (cwb_inet_mode!="") ? cwb_inet_mode.Atoi() : 2;
572  TString gmode="";
573  if(mode==0) mode=2;
574  if(mode==1) gmode="(E00+E90)/2";
575  if(mode==2) gmode="sqrt((E00+E90)/2)";
576  if(mode==3) gmode="amplitude:00";
577  if(mode==4) gmode="energy:00";
578  if(mode==5) gmode="|amplitude:00|";
579  if(mode==6) gmode="amplitude:90";
580  if(mode==7) gmode="energy:90";
581  if(mode==8) gmode="|amplitude:90|";
582 
583  // open ioutput root file
584  char fName[1024];
585  sprintf(fName,"%s/wdm_%s_%s_%d_%s_job%lu.root",
586  odir.Data(),cwb_inet_type.Data(),ifo.Data(),int(x->start()),cfg->data_label,net->nRun);
587  TFile* ofile = new TFile(fName,"RECREATE");
588  cout << endl << "Dump WDM : " << fName << endl << endl;
589 
590  for(int level=cfg->l_high; level>=cfg->l_low; level--) { // loop over levels
591 
592  // create ifo root directory to store wdm TF
593  char dname[32]; sprintf(dname,"%s:level-%d",ifo.Data(),level);
594  TDirectory* dwdm = ofile->mkdir(dname);
595  dwdm->cd();
596 
597  int layers = level>0 ? 1<<level : 0; // get layers
598  cout << "level : " << level << " layers : " << layers << endl;
599 
600  size_t rateANA=cfg->inRate>>cfg->levelR;
601  int rate = rateANA>>level;
602  double dt = 1000./rate;
603  double df = rateANA/2./double(1<<level);
604  cout << "level : " << level << "\t rate : " << rate
605  << "\t df(hz) : " << df << "\t dt(ms) : " << dt << endl;
606 
607  pwdm = net->getwdm(layers+1); // get pointer to wdm transform
608  if(pwdm==NULL) {
609  cout << "CWB_Plugin_cwb_inet.C : Error - WDM not defined !!!" << endl;
610  gSystem->Exit(1);
611  }
612 
613  w.Forward(y,*pwdm); // apply wdm transformation
614  WSeries<double>* WS = (WSeries<double>*)(&w);
615 
616  // Plot WDM Scalogram
617  double start = WS->start();
618  double stop = WS->start()+WS->size()/WS->rate();
619  double flow = cfg->fLow;
620  double fhigh = cfg->fHigh;
621 
622  WTS->plot(WS, mode, start, stop,const_cast<char*>("COLZ"));
623  WTS->hist2D->GetYaxis()->SetRangeUser(flow, fhigh);
624  char title[64];
625  sprintf(title,"WDM:TF (%s) - ifo:%s - type:%s - level:%d - dt:%g (ms) - df=%g (Hz)",
626  gmode.Data(),ifo.Data(),cwb_inet_type.Data(),level,dt,df);
627  WTS->hist2D->SetTitle(title);
628  char name[64]; sprintf(name,"%s:tf:%s-%d",ifo.Data(),cwb_inet_type.Data(),level);
629  WTS->canvas->Write(name);
630 
631  // Project hist2D to time axis
632  sprintf(name,"%s:t:%s-%d",ifo.Data(),cwb_inet_type.Data(),level);
633  sprintf(title,"WDM:TIME (%s) - ifo:%s - type:%s - level:%d - dt:%g (ms) - df=%g (Hz)",
634  gmode.Data(),ifo.Data(),cwb_inet_type.Data(),level,dt,df);
635  TH1D *tProjH2 = WTS->hist2D->ProjectionX(name);
636  WTS->canvas->Clear();
637  tProjH2->SetTitle(title);
638  tProjH2->SetStats(kFALSE);
639  tProjH2->Draw();
640  WTS->canvas->Write(name);
641 
642  // Project hist2D to frequency axis
643  int hist2D_size = WTS->hist2D->GetNbinsX();
644  int edgeSize = (int)(hist2D_size*cfg->segEdge/(2*cfg->segEdge+cfg->segLen));
645  sprintf(name,"%s:f:%s-%d",ifo.Data(),cwb_inet_type.Data(),level);
646  sprintf(title,"WDM:FREQ (%s) - ifo:%s - type:%s - level:%d - dt:%g (ms) - df=%g (Hz)",
647  gmode.Data(),ifo.Data(),cwb_inet_type.Data(),level,dt,df);
648  TH1D *fProjH2 = WTS->hist2D->ProjectionY(name,edgeSize,hist2D_size-edgeSize);
649  WTS->canvas->Clear();
650  fProjH2->SetTitle(title);
651  fProjH2->SetStats(kFALSE);
652  fProjH2->Draw();
653  WTS->canvas->Write(name);
654 
655  w.Inverse(); // inverse transform
656  y = w; // copy manipulated data to y
657  }
658 
659  delete ofile;
660 // delete WTS; // this instruction is commented because it produces a crash (why?)
661 
662  if(cwb_inet_draw=="TRUE") {
663  // creates a temporary file name
664  char fmacroName[1024];
665  unsigned int Pid = gSystem->GetPid(); // used to tag in a unique way the temporary files
666  sprintf(fmacroName,"%s/CWB_Plugin_cwb_inet_wdm_macro_%s_%d_job%d.XXXXXX",
667  cfg->tmp_dir,cfg->data_label,Pid,net->nRun);
668  CWB::Toolbox::mksTemp(fmacroName); // create temporary file, must be deleted only at the end of run
669  ofstream out;
670  out.open(fmacroName,ios::out);
671  if(!out.good()) {cout << "CWB_Plugin_cwb_inet.C - Error : Opening File : " << fmacroName << endl;gSystem->Exit(1);}
672  char line[1024];
673  sprintf(line,"{TFile* ifile = new TFile(\"%s\");TBrowser br(\"CWB\",ifile);}",fName);
674  out << line << endl;
675  out.close();
676 
677  char cmd[1024];
678  // start root browser
679  sprintf(cmd,"root -l %s",fmacroName);
680  cout << cmd << endl; gSystem->Exec(cmd);
681  // remove temporary files
682  sprintf(cmd,"rm %s",fName);
683  cout << cmd << endl; gSystem->Exec(cmd);
684  sprintf(cmd,"rm %s",fmacroName);
685  cout << cmd << endl; gSystem->Exec(cmd);
686  }
687 
689  gSystem->Exit(0);
690 }
691 
692 void
693 CWB_Plugin_emax(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
694  network* net, WSeries<double>* xdummy, TString sdummy, int type) {
695 
696  if(type!=CWB_PLUGIN_XCOHERENCE) return;
697 
698  // import factor
699  int gIFACTOR=-1; IMPORT(int,gIFACTOR)
700  // import resolution
701  size_t gILEVEL=-1; IMPORT(size_t,gILEVEL)
702 
703  // get level : if level>0 then select only one level
704  TString cwb_inet_level = CWB::Toolbox::getParameter(cwb_inet_options,"--level");
705  int ilevel = cwb_inet_level.Atoi();
706  if(ilevel>0 && ilevel!=gILEVEL) return;
707 
708  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
709  cwb_inet_draw.ToUpper();
710  TString odir = cfg->dump_dir;
711 
712  int level = gILEVEL;
713  int layers = level>0 ? 1<<level : 0; // get layers
714 
715  size_t rateANA=cfg->inRate>>cfg->levelR;
716  int rate = rateANA>>level;
717  double dt = 1000./rate;
718  double df = rateANA/2./double(1<<level);
719  cout << "level : " << level << "\t rate(hz) : " << rate << "\t layers : " << layers
720  << "\t df(hz) : " << df << "\t dt(ms) : " << dt << endl;
721 
722  int nIFO = net->ifoListSize();
723  detector* pD[NIFO_MAX]; // pointers to detectors
724  for(int n=0;n<nIFO;n++) pD[n] = net->getifo(n);
725 
726  // open ioutput root file
727  char fName[1024];
728  sprintf(fName,"%s/emax_%d_%s_job%lu.root",
729  odir.Data(),int(pD[0]->getTFmap()->start()),cfg->data_label,net->nRun);
730  TFile* ofile = (ilevel||level==cfg->l_high) ? new TFile(fName,"RECREATE") : new TFile(fName,"UPDATE");
731  if(ofile==NULL||!ofile->IsOpen())
732  {cout << "CWB_Plugin_cwb_inet.C - Error opening : " << fName << endl;exit(1);}
733  cout << endl << "Dump EMAX : " << fName << endl << endl;
734 
735  watplot WTS(const_cast<char*>("WTS"));
736 
737  bool singleDetector = false;
738  if(nIFO==2 && TString(pD[1]->Name)==pD[0]->Name) singleDetector=true;
739 
740  WSeries<double> WSE = *pD[0]->getTFmap();
741  for(int n=0; n<=nIFO; n++) { // produce TF maps with max over the sky energy
742 
743  if(n<nIFO) WSE.add(*pD[n]->getTFmap()); // produce TF maps with sum of energy over the ifo
744 
745  TString ifo = n==nIFO ? "NET" : net->ifoName[n];
746 
747  // create ifo root directory to store emax TF
748  TDirectory* demax = ofile->mkdir(ifo.Data());
749  demax->cd();
750 
751  WSeries<double>* WS = n==nIFO ? &WSE : pD[n]->getTFmap();
752 
753  //scalogram maps
754  double start = WS->start()+cfg->segEdge;
755  double stop = WS->start()+WS->size()/WS->rate()-cfg->segEdge;
756  double flow = cfg->fLow;
757  double fhigh = cfg->fHigh;
758  WTS.plot(*WS, 0, start, stop,const_cast<char*>("COLZ"));
759  WTS.hist2D->GetYaxis()->SetRangeUser(flow, fhigh);
760 
761  // Dump EMAX Scalogram
762  char title[64];
763  sprintf(title,"EMAX:TF (energy) - ifo:%s - factor:%d - level:%d - dt:%g (ms) - df=%g (Hz)",
764  ifo.Data(),gIFACTOR,level,dt,df);
765  WTS.hist2D->SetTitle(title);
766  char name[64]; sprintf(name,"%s:tf:%d-%d",ifo.Data(),gIFACTOR,level);
767  WTS.canvas->Write(name);
768 
769  // Project hist2D to time axis
770  sprintf(name,"%s:t:%d-%d",ifo.Data(),gIFACTOR,level);
771  sprintf(title,"EMAX:TIME (energy) - ifo:%s - factor:%d - level:%d - dt:%g (ms) - df=%g (Hz)",
772  ifo.Data(),gIFACTOR,level,dt,df);
773  TH1D *tProjH2 = WTS.hist2D->ProjectionX(name);
774  WTS.canvas->Clear();
775  tProjH2->SetTitle(title);
776  tProjH2->SetStats(kFALSE);
777  tProjH2->Draw();
778  WTS.canvas->Write(name);
779 
780  // Project hist2D to frequency axis
781  int hist2D_size = WTS.hist2D->GetNbinsX();
782  int edgeSize = (int)(hist2D_size*cfg->segEdge/(2*cfg->segEdge+cfg->segLen));
783  sprintf(name,"%s:f:%d-%d",ifo.Data(),gIFACTOR,level);
784  sprintf(title,"EMAX:FREQ (energy) - ifo:%s - factor:%d - level:%d - dt:%g (ms) - df=%g (Hz)",
785  ifo.Data(),gIFACTOR,level,dt,df);
786  TH1D *fProjH2 = WTS.hist2D->ProjectionY(name,edgeSize,hist2D_size-edgeSize);
787  WTS.canvas->Clear();
788  fProjH2->SetTitle(title);
789  fProjH2->SetStats(kFALSE);
790  fProjH2->Draw();
791  WTS.canvas->Write(name);
792 
793  if(singleDetector) break;
794  }
795 
796  delete ofile;
797 
798  if(!ilevel && level!=cfg->l_low) return;
799 
800  if(cwb_inet_draw=="TRUE") {
801  // creates a temporary file name
802  char fmacroName[1024];
803  unsigned int Pid = gSystem->GetPid(); // used to tag in a unique way the temporary files
804  sprintf(fmacroName,"%s/CWB_Plugin_cwb_inet_wdm_macro_%s_%d_job%d.XXXXXX",
805  cfg->tmp_dir,cfg->data_label,Pid,net->nRun);
806  CWB::Toolbox::mksTemp(fmacroName); // create temporary file, must be deleted only at the end of run
807  ofstream out;
808  out.open(fmacroName,ios::out);
809  if(!out.good()) {cout << "CWB_Plugin_cwb_inet.C - Error : Opening File : " << fmacroName << endl;gSystem->Exit(1);}
810  char line[1024];
811  sprintf(line,"{TFile* ifile = new TFile(\"%s\");TBrowser br(\"CWB\",ifile);}",fName);
812  out << line << endl;
813  out.close();
814 
815  char cmd[1024];
816  // start root browser
817  sprintf(cmd,"root -l %s",fmacroName);
818  cout << cmd << endl; gSystem->Exec(cmd);
819  // remove temporary files
820  sprintf(cmd,"rm %s",fName);
821  cout << cmd << endl; gSystem->Exec(cmd);
822  sprintf(cmd,"rm %s",fmacroName);
823  cout << cmd << endl; gSystem->Exec(cmd);
824  }
825 
827  gSystem->Exit(0);
828 }
829 
830 void
831 CWB_Plugin_psd(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
832  network* net, WSeries<double>* x, TString ifo, int type) {
833 
834  // get type : return if not equal to input plugin parameter (type)
835  TString cwb_inet_type = CWB_Plugin_CheckTYPE(cwb_inet_options, jfile, cfg, type);
836  if(cwb_inet_type=="") return;
837 
838  // get ifo : return if not equal to input plugin parameter (ifo)
839  TString cwb_inet_ifo = CWB_Plugin_CheckIFO(cwb_inet_options, jfile, cfg, net, ifo);
840  if(cwb_inet_ifo=="") return;
841 
842  if(x==NULL) {
843  cout << "CWB_Plugin_cwb_inet.C : Error : NULL data " << endl;
844  gSystem->Exit(1);
845  }
846 
847  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
848  cwb_inet_draw.ToUpper();
849  TString odir = cfg->dump_dir;
850  //TString odir = (cwb_inet_draw=="TRUE") ? cfg->tmp_dir : cfg->dump_dir;
851 
852  double chuncklen=8; // default = 8 sec
853  // get chuncklen options - Example --chuncklen 8
854  TString cwb_inet_chuncklen = CWB::Toolbox::getParameter(cwb_inet_options,"--chuncklen");
855  if(cwb_inet_chuncklen.IsFloat()) chuncklen = cwb_inet_chuncklen.Atof();
856  if(chuncklen==0) chuncklen=x->size()/x->rate()-2*cfg->segEdge; // chuncklen = full buffer
857 
858  // get oneside option // default is TRUE
859  TString cwb_inet_oneside = CWB::Toolbox::getParameter(cwb_inet_options,"--oneside");
860  cwb_inet_oneside.ToUpper();
861  if(cwb_inet_oneside=="") cwb_inet_oneside="TRUE";
862  if((cwb_inet_oneside!="TRUE")&&(cwb_inet_oneside!="FALSE")) {
863  cout << "CWB_Plugin_cwb_inet.C : Error : wrong --oneside option , must be true/false" << endl;
864  gSystem->Exit(1);
865  }
866  TString psdtype = (cwb_inet_oneside=="TRUE") ? "oneside" : "doubleside";
867  bool oneside = (cwb_inet_oneside=="TRUE") ? true : false;
868 
869  char file[1024];
870  sprintf(file,"%s/psd_%s_%s_%s_%d_%s_job%lu.txt",
871  odir.Data(),psdtype.Data(),cwb_inet_type.Data(),ifo.Data(),int(x->start()),cfg->data_label,net->nRun);
872  cout << endl << "Dump PSD " << "(chuncklen = " << chuncklen << ")"
873  << " : " << file << endl << endl;
874  CWB::Toolbox::makeSpectrum(file, *x, chuncklen, cfg->segEdge, oneside); // dump spectrum
875 
876  if(cwb_inet_draw=="TRUE") {
877  TString cwb_inet_save = CWB::Toolbox::getParameter(cwb_inet_options,"--save");
878  cwb_inet_save.ToUpper();
879  int save = cwb_inet_save=="TRUE" ? 1 : 0;
880  TString cwb_inet_range = CWB::Toolbox::getParameter(cwb_inet_options,"--range");
881  cwb_inet_range.ToUpper();
882  int range = cwb_inet_range=="FIX" ? 1 : 0;
883  char cmd[1024];
884  // execute cwb_draw_sensitivity
885  sprintf(cmd,"export CWB_SENSITIVITY_FILE_NAME=\"%s\";",file);
886  sprintf(cmd,"%s export CWB_SENSITIVITY_SAVE_PLOT=%d;",cmd,save);
887  sprintf(cmd,"%s export CWB_SENSITIVITY_RANGE_FIX=%d;",cmd,range);
888  sprintf(cmd,"%s root -n -l ${CWB_MACROS}/cwb_draw_sensitivity.C",cmd);
889  cout << cmd << endl; gSystem->Exec(cmd);
890 
891  // remove temporary files
892  sprintf(cmd,"rm %s",file);
893  cout << cmd << endl; gSystem->Exec(cmd);
894  }
895 
897  gSystem->Exit(0);
898 }
899 
900 void
901 CWB_Plugin_inj(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
902  network* net, WSeries<double>* x, TString ifo, int type) {
903 
904  if(type!=CWB_PLUGIN_OREADDATA) return;
905 
906  TString cwb_inet_draw = CWB::Toolbox::getParameter(cwb_inet_options,"--draw");
907  cwb_inet_draw.ToUpper();
908  TString odir = cfg->dump_dir;
909 
910  int nIFO = net->ifoListSize();
911  detector* pD[NIFO_MAX]; // pointers to detectors
912  for(int n=0;n<nIFO;n++) pD[n] = net->getifo(n);
913 
914  // open ioutput root file
915  char fName[1024];
916  sprintf(fName,"%s/inj_%d_%s_job%lu.root",
917  odir.Data(),int(pD[0]->getTFmap()->start()),cfg->data_label,net->nRun);
918  TFile* ofile = new TFile(fName,"RECREATE");
919  if(ofile==NULL||!ofile->IsOpen())
920  {cout << "CWB_Plugin_cwb_inet.C - Error opening : " << fName << endl;exit(1);}
921  cout << endl << "Dump INJ : " << fName << endl << endl;
922 
923  for(int n=0;n<nIFO;n++) {
924 
925  // create ifo root directory to store injections
926  TDirectory* dinj = ofile->mkdir(pD[n]->Name);
927  dinj->cd();
928 
929  wavearray<double> w = pD[n]->HoT;
930  std::vector<double>* pT = net->getmdcTime();
931  double dT = cfg->iwindow/2.;
932  double offset = cfg->segEdge;
933 
934  int j,nstop,nstrt;
935  size_t k;
936  double F,T;
937  size_t K = pT->size();
938  size_t N = w.size();
939  double rate = w.rate(); // simulation rate
940 
941  dT = fabs(dT);
942 
943  // isolate injections
944  for(k=0; k<K; k++) {
945 
946  T = (*pT)[k] - w.start();
947 
948  nstrt = int((T - dT)*rate);
949  nstop = int((T + dT)*rate);
950  if(nstrt<=0) nstrt = 0;
951  if(nstop>=int(N)) nstop = N;
952  if(nstop<=0) continue; // outside of the segment
953  if(nstrt>=int(N)) continue; // outside of the segment
954 
955  gwavearray<double> gx(nstop-nstrt);
956  gx.rate(rate);
957  gx.start(0);
958 
959  for(j=nstrt; j<nstop; j++) gx.data[j-nstrt]=w.data[j];
960  gx.SetComment(net->mdcList[k]);
961  char name[256];sprintf(name,"%s:%2.2f",pD[n]->Name,nstrt/rate);
962  gx.Write(name);
963  }
964  }
965  delete ofile;
966 
967  if(cwb_inet_draw=="TRUE") {
968  // creates a temporary file name
969  char fmacroName[1024];
970  unsigned int Pid = gSystem->GetPid(); // used to tag in a unique way the temporary files
971  sprintf(fmacroName,"%s/CWB_Plugin_cwb_inet_wdm_macro_%s_%d_job%d.XXXXXX",
972  cfg->tmp_dir,cfg->data_label,Pid,net->nRun);
973  CWB::Toolbox::mksTemp(fmacroName); // create temporary file, must be deleted only at the end of run
974  ofstream out;
975  out.open(fmacroName,ios::out);
976  if(!out.good()) {cout << "CWB_Plugin_cwb_inet.C - Error : Opening File : " << fmacroName << endl;gSystem->Exit(1);}
977  char line[1024];
978  sprintf(line,"{TFile* ifile = new TFile(\"%s\");TBrowser br(\"CWB\",ifile);}",fName);
979  out << line << endl;
980  out.close();
981 
982  char cmd[1024];
983  // start root browser
984  sprintf(cmd,"root -l %s",fmacroName);
985  cout << cmd << endl; gSystem->Exec(cmd);
986  // remove temporary files
987  sprintf(cmd,"rm %s",fName);
988  cout << cmd << endl; gSystem->Exec(cmd);
989  sprintf(cmd,"rm %s",fmacroName);
990  cout << cmd << endl; gSystem->Exec(cmd);
991  }
992 
994  gSystem->Exit(0);
995 }
996 
997 void
998 CWB_Plugin_frdisplay(TString cwb_inet_options, TFile* jfile, CWB::config* cfg,
999  network* net, WSeries<double>* x, TString ifo, int type) {
1000 
1001  // get type : return if not equal to input plugin parameter (type)
1002  TString cwb_inet_type = CWB_Plugin_CheckTYPE(cwb_inet_options, jfile, cfg, type);
1003  if(cwb_inet_type=="") return;
1004 
1005  // get ifo : return if not equal to input plugin parameter (ifo)
1006  TString cwb_inet_ifo = CWB_Plugin_CheckIFO(cwb_inet_options, jfile, cfg, net, ifo);
1007  if(cwb_inet_ifo=="") return;
1008 
1009  if(x==NULL) {
1010  cout << "CWB_Plugin_cwb_inet.C : Error : NULL data " << endl;
1011  gSystem->Exit(1);
1012  }
1013 
1014  // get ifo index
1015  int ifoID =0; for(int n=0;n<cfg->nIFO;n++) if(ifo==net->getifo(n)->Name) {ifoID=n;break;}
1016 
1017  // get frdisplay directory
1018  TString home_frdisplay="";
1019  if(gSystem->Getenv("HOME_FRDISPLAY")==NULL) {
1020  cout << "Error : environment HOME_FRDISPLAY is not defined!!!" << endl;
1021  gSystem->Exit(1);
1022  } else {
1023  home_frdisplay=TString(gSystem->Getenv("HOME_FRDISPLAY"));
1024  }
1025  cout << "home_frdisplay : " << home_frdisplay.Data() << endl;
1026 
1027  // get data buffer start,stop
1028  int job_start = x->start();
1029  int job_stop = x->stop();
1030  cout << "job_start : " << job_start << " job_stop : " << job_stop << endl;
1031 
1032  // prepare frame list format for frdisplay
1033  gRandom->SetSeed(0);
1034  int rnID = gRandom->Uniform(0,10000000); // random name ID
1035 
1036  // write temporary frame file
1037  char chName[64]; sprintf(chName,"%s",cfg->channelNamesRaw[ifoID]);
1038  char frLabel[64]; sprintf(frLabel,"CWB_Plugin_cwb_inet_%s_%s_%d",ifo.Data(),cwb_inet_type.Data(),rnID);
1039  TString frFile = CWB::Toolbox::WriteFrameFile(*x, chName, "FRDISPLAY", frLabel, cfg->tmp_dir);
1040 
1041  // write temporary ffl file
1042  char ffl[1024];
1043  sprintf(ffl,"%s/CWB_Plugin_cwb_inet_%s_%s_%d.ffl",cfg->tmp_dir,ifo.Data(),cwb_inet_type.Data(),rnID);
1044  cout << "ffl : " << ffl << endl;
1045 
1046  ofstream out;
1047  out.open(ffl,ios::out);
1048  if (!out.good()) {cout << "Error Opening File : " << ffl << endl;gSystem->Exit(1);}
1049  out << frFile.Data() << " " << job_start << " " << job_stop-job_start << " " << 0 << " " << 0 << endl;
1050  cout << frFile.Data() << endl;
1051  out.close();
1052 
1053  // build cmd frdisplay command
1054  char cmd[1024];
1055  sprintf(cmd,"%s/FrDisplay -d 5 -proc -t %s -i %s",home_frdisplay.Data(),chName,ffl);
1056 
1057  // get filter options - Example --filter 50,
1058  TString cwb_inet_hpf = CWB::Toolbox::getParameter(cwb_inet_options,"--hpf");
1059  if(cwb_inet_hpf!="") sprintf(cmd,"%s -k \"-Bu -Hp -o 6 -a %s\"",cmd,cwb_inet_hpf.Data());
1060 
1061  char xoptions[256]="";
1062  // get decimateby options - Example --decimateby 16
1063  TString cwb_inet_decimateby = CWB::Toolbox::getParameter(cwb_inet_options,"--decimateby");
1064  if(cwb_inet_decimateby!="") sprintf(xoptions,"%s -decimateby %s",xoptions,cwb_inet_decimateby.Data());
1065  // get -downmix options - Example --downmix 400
1066  TString cwb_inet_downmix = CWB::Toolbox::getParameter(cwb_inet_options,"--downmix");
1067  if(cwb_inet_downmix!="") sprintf(xoptions,"%s -downmix %s",xoptions,cwb_inet_downmix.Data());
1068  // get -uscaleby options - Example --uscaleby 0.5
1069  TString cwb_inet_uscaleby = CWB::Toolbox::getParameter(cwb_inet_options,"--uscaleby");
1070  if(cwb_inet_uscaleby!="") sprintf(xoptions,"%s -uscaleby %s",xoptions,cwb_inet_uscaleby.Data());
1071  // get -decimategain options - Example --decimategain 48
1072  TString cwb_inet_decimategain = CWB::Toolbox::getParameter(cwb_inet_options,"--decimategain");
1073  if(cwb_inet_decimategain!="") sprintf(xoptions,"%s -decimategain %s",xoptions,cwb_inet_decimategain.Data());
1074 
1075  // execute frdisplay command
1076  if(TString(xoptions)!="") sprintf(cmd,"%s -x \"%s\"",cmd,xoptions);
1077  cout << cmd << endl; gSystem->Exec(cmd);
1078 
1079  // remove temporary files
1080  sprintf(cmd,"rm %s %s",ffl,frFile.Data());
1081  cout << cmd << endl; gSystem->Exec(cmd);
1082 
1083  CWB_Plugin_RemoveTemporaryFiles(jfile, cfg);
1084  gSystem->Exit(0);
1085 }
1086 
1087 TString
1088 CWB_Plugin_CheckTYPE(TString cwb_inet_options, TFile* jfile, CWB::config* cfg, TString type) {
1089 
1090  // get type : return if not equal to input plugin parameter (type)
1091  TString cwb_inet_type = CWB::Toolbox::getParameter(cwb_inet_options,"--type");
1092  cwb_inet_type.ToUpper();
1093  if((cwb_inet_type=="STRAIN")||(cwb_inet_type=="MDC")||(cwb_inet_type=="WHITE")||
1094  (cwb_inet_type=="SUPERCLUSTER")||(cwb_inet_type=="LIKELIHOOD")) {
1095  bool selected=false;
1096  if((type==CWB_PLUGIN_DATA) &&(cwb_inet_type=="STRAIN")) selected=true;
1097  if((type==CWB_PLUGIN_MDC) &&(cwb_inet_type=="MDC")) selected=true;
1098  if((type==CWB_PLUGIN_WHITE) &&(cwb_inet_type=="WHITE")) selected=true;
1099  if((type==CWB_PLUGIN_IDATA_CONDITIONING)&&(cwb_inet_type=="STRAIN")) selected=true;
1100  if((type==CWB_PLUGIN_ODATA_CONDITIONING)&&(cwb_inet_type=="STRAIN")) selected=true;
1101  if((type==CWB_PLUGIN_ISUPERCLUSTER)&&(cwb_inet_type=="SUPERCLUSTER")) selected=true;
1102  if((type==CWB_PLUGIN_ILIKELIHOOD) &&(cwb_inet_type=="LIKELIHOOD")) selected=true;
1103  if(!selected) return "";
1104  } else {
1105  cout << "CWB_Plugin_cwb_inet.C : Option error --type " << cwb_inet_type << endl << endl;
1106  cout << "Select : --type strain/mdc/white/supercluster/likelihood" << endl << endl;
1107  CWB_Plugin_RemoveTemporaryFiles(jfile, cfg);
1108  gSystem->Exit(1);
1109  }
1110 
1111  return cwb_inet_type;
1112 }
1113 
1114 TString
1116 
1117  // get ifo : return if not equal to input plugin parameter (ifo)
1118  TString cwb_inet_ifo = CWB::Toolbox::getParameter(cwb_inet_options,"--ifo");
1119  cwb_inet_ifo.ToUpper();
1120  // check if ifo is in the network
1121  bool isPresentIFO=false;
1122  for(int n=0;n<cfg->nIFO;n++) if(cwb_inet_ifo==net->getifo(n)->Name) isPresentIFO=true;
1123  if(isPresentIFO) {
1124  if(ifo!="0") if(cwb_inet_ifo!=ifo) return "";
1125  } else {
1126  cout << "CWB_Plugin_cwb_inet.C : Option error --ifo " << cwb_inet_ifo << endl;
1127  char ifo_opts[32];strcpy(ifo_opts,net->getifo(0)->Name);
1128  for(int n=1;n<cfg->nIFO;n++) sprintf(ifo_opts,"%s/%s",ifo_opts,net->getifo(n)->Name);
1129  cout << "Select : --ifo " << ifo_opts << endl << endl;
1130  CWB_Plugin_RemoveTemporaryFiles(jfile, cfg);
1131  gSystem->Exit(1);
1132  }
1133 
1134  return cwb_inet_ifo;
1135 }
1136 
1137 void
1139 
1140  // remove temporary job file
1141  if(jfile) {
1142  TString jname = jfile->GetPath();
1143  bool remove = true;
1144  if(jname.Contains("init_")) remove=false;
1145  if(jname.Contains("strain_")) remove=false;
1146  if(jname.Contains("cstrain_")) remove=false;
1147  if(jname.Contains("coherence_")) remove=false;
1148  if(jname.Contains("supercluster_")) remove=false;
1149  if(jname.Contains("likelihood_")) remove=false;
1150  if(remove) {
1151  jname.ReplaceAll(":/","");
1152  //cout << jname.Data() << endl;
1153  gSystem->Exec(TString("rm "+jname).Data());
1154  }
1155  }
1156 
1157  // remove temporary plugin file
1158  gSystem->Exec((TString("rm ")+cfg->plugin.GetTitle()).Data());
1159 
1160  // remove temporary plugin config file
1161  TString configPluginName = cfg->configPlugin.GetTitle();
1162  if(configPluginName!="")
1163  gSystem->Exec((TString("rm ")+configPluginName).Data());
1164 
1165  // search output root file in the system list
1166  // & remove output root file
1167  TList *files = (TList*)gROOT->GetListOfFiles();
1168  if(files) {
1169  TIter next(files);
1170  TSystemFile *file;
1171  while ((file=(TSystemFile*)next())) {
1172  TString fname = file->GetName();
1173  if(fname.Contains("wave_")) gSystem->Exec((TString("rm ")+fname).Data());
1174  }
1175  }
1176 }
std::vector< char * > ifoName
Definition: network.hh:591
CWB_JOBF_OPTIONS jobfOptions
Definition: config.hh:273
detector * getifo(size_t n)
param: detector index
Definition: network.hh:418
CWB::config * cfg
Definition: TestCWB_Plugin.C:5
char analysis[8]
Definition: config.hh:99
double iwindow
Definition: config.hh:182
virtual size_t size() const
Definition: wavearray.hh:127
int job_start
Definition: cwb_frdisplay.C:64
int slices
void CWB_Plugin_psd(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
tuple f
Definition: cwb_online.py:91
TMacro configPlugin
Definition: config.hh:344
char cmd[1024]
std::vector< double > * getmdcTime()
Definition: network.hh:404
wavearray< double > HoT
Definition: detector.hh:332
int offset
Definition: TestSTFT_2.C:19
virtual void rate(double r)
Definition: wavearray.hh:123
void CWB_Plugin_emax(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *xdummy, TString sdummy, int type)
CWB_JOBF_OPTIONS
Definition: config.hh:37
static TString WriteFrameFile(wavearray< double > x, TString chName, TString frName, TString frLabel, TString frDir="")
Definition: Toolbox.cc:6308
par[0] name
#define B
int n
Definition: cwb_net.C:10
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
TString("c")
size_t nRun
Definition: network.hh:554
void CWB_Plugin_RemoveTemporaryFiles(TFile *jfile, CWB::config *cfg)
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\t layers : "<< nLAYERS<< "\t dF(hz) : "<< dF<< "\t dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1)*itime+ifreq;double time=itime *dT;double freq=(ifreq >0)?ifreq *dF:dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
double fLow
Definition: config.hh:122
char odir[1024]
WDM< double > wdm(nLAYERS, nLAYERS, 6, 10)
void add(const wavearray< DataType_t > &, int=0, int=0, int=0)
Definition: wavearray.cc:728
static int mksTemp(char *fTemplate)
Definition: Toolbox.hh:323
bool cedDump
Definition: config.hh:279
std::vector< SSeries< double > > vSS[NIFO_MAX]
CWB_JOBF_OPTIONS jobfOptions
int layers
#define M
Definition: UniqSLagsList.C:3
virtual void start(double s)
Definition: wavearray.hh:119
char ofile[512]
int j
Definition: cwb_net.C:10
i drho i
void plot(wavearray< double > &, char *=NULL, int=1, double=0., double=0., bool=false, float=0., float=0., bool=false, float=0., bool=false)
Definition: watplot.cc:132
#define N
char ifo[NIFO_MAX][8]
network ** net
NOISE_MDC_SIMULATION.
TH2F * hist2D
Definition: watplot.hh:175
size_t ifoListSize()
Definition: network.hh:413
void CWB_Plugin_wdm(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
WDM< double > * getwdm(size_t M)
param: number of wdm layers
Definition: network.hh:430
bool singleDetector
size_t mode
wavearray< double > w
Definition: Test1.C:27
double segEdge
Definition: config.hh:146
#define nIFO
void wrate(double r)
Definition: wseries.hh:102
ofstream out
Definition: cwb_merge.C:196
TCanvas * canvas
Definition: watplot.hh:174
int getLevel()
Definition: wseries.hh:91
TString chName[NIFO_MAX]
size_t fResample
Definition: config.hh:124
void CWB_Plugin_frdisplay(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
jfile
Definition: cwb_job_obj.C:25
unsigned long nSTS
Definition: WaveDWT.hh:125
static TString GetStageString(CWB_STAGE jstage)
Definition: cwb.cc:2187
int l_high
Definition: config.hh:138
#define IMPORT(TYPE, VAR)
Definition: cwb.hh:51
WSeries< double > nRMS
Definition: detector.hh:340
watplot * WTS
Definition: ChirpMass.C:115
i() int(T_cor *100))
gwavearray< double > * gx
void CWB_Plugin_ced(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, TString ifo, int type)
void CWB_Plugin_sparse(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, TString ifo, int type)
std::vector< std::string > mdcList
Definition: network.hh:594
const int NIFO_MAX
Definition: wat.hh:4
double fhigh
char tmp_dir[1024]
Definition: config.hh:307
int gIFACTOR
int getLayer(wavearray< DataType_t > &w, double n)
param: n - layer number
Definition: wseries.cc:175
TIter next(twave->GetListOfBranches())
char fname[1024]
void CWB_Plugin_nRMS(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
TString CWB_Plugin_CheckIFO(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, TString ifo)
char channelNamesRaw[NIFO_MAX][50]
Definition: config.hh:292
int k
void SetComment(TString comment)
Definition: gwavearray.hh:77
double F
void CWB_Plugin(TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
COHERENCE.
size_t rateANA
Definition: test_config1.C:21
double dt
virtual void FFTW(int=1)
Definition: wavearray.cc:878
double flow
int l_low
Definition: config.hh:137
int job_stop
Definition: cwb_frdisplay.C:65
void CWB_Plugin_inj(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
char title[256]
Definition: SSeriesExample.C:1
double gps
double T
Definition: testWDM_4.C:11
double whiteStride
Definition: config.hh:172
TLine * line
Definition: compare_bkg.C:482
static TString getParameter(TString options, TString param="")
Definition: Toolbox.cc:5943
double fHigh
Definition: config.hh:123
WSeries< double > * getTFmap()
param: no parameters
Definition: detector.hh:161
Definition: Meyer.hh:18
char Name[16]
Definition: detector.hh:309
virtual void stop(double s)
Definition: wavearray.hh:121
TMacro plugin
Definition: config.hh:343
double fabs(const Complex &x)
Definition: numpy.cc:37
string file
Definition: cwb_online.py:385
double segLen
Definition: config.hh:143
char dump_dir[1024]
Definition: config.hh:310
void Forward(int n=-1)
param: wavelet - n is number of steps (-1 means full decomposition)
Definition: wseries.cc:228
strcpy(RunLabel, RUN_LABEL)
double df
static void makeSpectrum(wavearray< double > &psd, wavearray< double > x, double chuncklen=8, double scratchlen=0, bool oneside=true)
Definition: Toolbox.cc:4705
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
int nIFO
Definition: config.hh:102
DataType_t * data
Definition: wavearray.hh:301
TString CWB_Plugin_CheckTYPE(TString cwb_inet_options, TFile *jfile, CWB::config *cfg, TString type)
TString jname
WaveDWT< DataType_t > * pWavelet
Definition: wseries.hh:438
double dT
Definition: testWDM_5.C:12
int rnID
bool save
cout<< "live time after cat 2 : "<< detSegs_ctime<< endl;if(detSegs_ctime< segTHR){cout<< "job segment live time after cat2 < "<< segTHR<< " sec, job terminated !!!"<< endl;exit(1);}double Tb=detSegs[0].start;double Te=detSegs[0].stop;double dT=Te-Tb;char file[512], tdf00[512], tdf90[512], buFFer[1024];int rnID=int(gRandom->Rndm(13)*1.e9);if(simulation){i=NET.readMDClog(injectionList, double(long(Tb))-mdcShift);printf("GPS: %16.6f saved, injections: %d\n", double(long(Tb)), i);frTB[nIFO].shiftBurstMDCLog(NET.mdcList, ifos, mdcShift);for(int i=0;i< NET.mdcTime.size();i++) NET.mdcTime[i]+=mdcShift;vector< waveSegment > mdcSegs(NET.mdcTime.size());for(int k=0;k< NET.mdcTime.size();k++){mdcSegs[k].start=NET.mdcTime[k]-gap;mdcSegs[k].stop=NET.mdcTime[k]+gap;}vector< waveSegment > mdcSegs_dq2=slagTB.mergeSegLists(detSegs_dq2, mdcSegs);double mdcSegs_ctime=slagTB.getTimeSegList(mdcSegs_dq2);cout<< "live time in zero lag after cat2+inj : "<< mdcSegs_ctime<< endl;if(mdcSegs_ctime==0){cout<< "job segment with zero cat2+inj live time in zero lag, job terminated !!!"<< endl;exit(1);}}if(dump_infos_and_exit) exit(0);if(mask >0.) NET.setSkyMask(mask, skyMaskFile);for(i=0;i< nIFO;i++){frTB[i].readFrames(FRF[i], channelNamesRaw[i], x);x.start(x.start()+dataShift[i]);x.start(x.start()-segLen *(segID[i]-segID[0]));if(singleDetector) TB.resampleToPowerOfTwo(x);sprintf(file,"%s/%s_%d_%s_%d_%d.dat", nodedir, ifo[i], int(Tb), data_label, runID, rnID);if(dump_sensitivity_and_exit){sprintf(file,"%s/sensitivity_%s_%d_%s_job%d.txt", dump_dir, ifo[i], int(Tb), data_label, runID);cout<< endl<< "Dump Sensitivity : "<< file<< endl<< endl;TB.makeSpectrum(file, x);continue;}if(dcCal[i]>0.) x *=dcCal[i];if(fResample >0){x.FFT(1);x.resize(fResample/x.rate()*x.size());x.FFT(-1);x.rate(fResample);}pTF[i]=pD[i]-> getTFmap()
char data_label[1024]
Definition: config.hh:314
list files
Definition: cwb_online.py:529
std::vector< SSeries< double > > vSS
Definition: detector.hh:334
char fName[256]
virtual void resize(unsigned int)
Definition: wavearray.cc:445
int check
double length
Definition: TestBandPass.C:18
void Inverse(int n=-1)
param: n - number of steps (-1 means full reconstruction)
Definition: wseries.cc:273
wavearray< double > y
Definition: Test10.C:31
size_t inRate
Definition: config.hh:114
TString frLabel[NIFO_MAX]
int levelR
Definition: config.hh:134
detector ** pD
CWB_STAGE
Definition: cwb.hh:102
exit(0)