Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
config.cc
Go to the documentation of this file.
1 #include "config.hh"
2 #include "xroot.hh"
3 #include "TGlobal.h"
4 
5 TGlobal* global;
6 char cmdline[128];
7 
8 #ifdef _USE_ROOT6 // ------------------------------------------------------ ROOT6
9 
10 #define SETVAR(MODE,VAR,TYPE,SIZE1,SIZE2) { \
11  if(MODE==0) { \
12  global = (TGlobal*)gROOT->GetGlobal("gPOINTER",true); \
13  if(global==NULL) sprintf(cmdline,"void* gPOINTER = (void*)&%s;",#VAR); \
14  else sprintf(cmdline,"gPOINTER = (void*)&%s;",#VAR); \
15  gROOT->ProcessLine(cmdline); \
16  global = (TGlobal*)gROOT->GetGlobal("gPOINTER",true); \
17  if(global!=NULL) { \
18  void* gPOINTER=NULL; \
19  memcpy((void*)&gPOINTER,(void*)global->GetAddress(),sizeof(void*)); \
20  memcpy((void*)&VAR,(void*)gPOINTER,SIZE1*SIZE2*sizeof(TYPE)); \
21  } \
22  } else { \
23  global = (TGlobal*)gROOT->GetGlobal(#VAR,true); \
24  if(global==NULL) { \
25  if(SIZE1==1 && SIZE2==1) strcpy(cmdline,#TYPE" "#VAR";"); \
26  if(SIZE1>1 && SIZE2==1) strcpy(cmdline,#TYPE" "#VAR"["#SIZE1"];"); \
27  if(SIZE1>1 && SIZE2>1) strcpy(cmdline,#TYPE" "#VAR"["#SIZE1"]["#SIZE2"];"); \
28  gROOT->ProcessLine(cmdline); \
29  global = (TGlobal*)gROOT->GetGlobal(#VAR,true); \
30  } \
31  if(SIZE1==1 && SIZE2==1) { \
32  void* pVAR = (void*)&VAR; \
33  global = (TGlobal*)gROOT->GetGlobal(#VAR,true); \
34  sprintf(cmdline,#VAR" = *("#TYPE"*)%p;",pVAR); \
35  } else { \
36  void* pVAR = (void*)&VAR; \
37  global = (TGlobal*)gROOT->GetGlobal(#VAR,true); \
38  sprintf(cmdline,"memcpy((void*)%p,(void*)%p,"#SIZE1"*"#SIZE2"*sizeof("#TYPE"));", \
39  (void*)global->GetAddress(),pVAR); \
40  } \
41  gROOT->ProcessLine(cmdline); \
42  }}
43 
44 #else // -------------------------------------------------------------- ROOT5
45 
46 #define SETVAR(MODE,VAR,TYPE,SIZE1,SIZE2) { \
47  if(MODE==0) { \
48  global = (TGlobal*)gROOT->GetGlobal("gPOINTER",true); \
49  if(global==NULL) sprintf(cmdline,"void* gPOINTER = (void*)&%s;",#VAR); \
50  else sprintf(cmdline,"gPOINTER = (void*)&%s;",#VAR); \
51  gROOT->ProcessLine(cmdline); \
52  global = (TGlobal*)gROOT->GetGlobal("gPOINTER",true); \
53  if(global!=NULL) { \
54  void* gPOINTER=NULL; \
55  memcpy((void*)&gPOINTER,(void*)global->GetAddress(),sizeof(void*)); \
56  memcpy((void*)&VAR,(void*)gPOINTER,SIZE1*SIZE2*sizeof(TYPE)); \
57  } \
58  } else { \
59  global = (TGlobal*)gROOT->GetListOfGlobals()->FindObject(#VAR); \
60  if(global==NULL) { \
61  if(SIZE1==1 && SIZE2==1) strcpy(cmdline,#TYPE" "#VAR";"); \
62  if(SIZE1>1 && SIZE2==1) strcpy(cmdline,#TYPE" "#VAR"["#SIZE1"];"); \
63  if(SIZE1>1 && SIZE2>1) strcpy(cmdline,#TYPE" "#VAR"["#SIZE1"]["#SIZE2"];"); \
64  gROOT->ProcessLine(cmdline); \
65  global = (TGlobal*)gROOT->GetGlobal(#VAR,true); \
66  } \
67  sprintf(cmdline,"memcpy((void*)%p,(void*)%p,"#SIZE1"*"#SIZE2"*sizeof("#TYPE"));", \
68  (void*)global->GetAddress(),(void*)&VAR); \
69  gROOT->ProcessLine(cmdline); \
70  }}
71 
72 #endif // ---------------------------------------------------------- END MACRO
73 
74 #define EXPORT(TYPE,VAR,CMD) { \
75  TGlobal* global = (TGlobal*)gROOT->GetGlobal(#VAR,true); \
76  char __cmdline[128]; \
77  if(global==NULL) sprintf(__cmdline,"%s %s;",#TYPE,CMD); \
78  else sprintf(__cmdline,"%s;",CMD); \
79  gROOT->ProcessLine(__cmdline); \
80 }
81 
82 
83 #define PRINT(ARG1,ARG2,ARG3,ARG4) { \
84  printf(" "#ARG1" "#ARG2"\t= "#ARG3";\t\t// "#ARG4"\n",ARG2); \
85  }
86 
87 ////////////////////////////////////////////////////////////////////////////////
88 /* BEGIN_HTML
89 <p>The config class is designed to manage the cwb configuration
90 
91 Overview:
92 <ol style="list-style-type: upper-roman;">
93  <li><a href="#usage">Usage</a></li>
94  <li><a href="#readwritetxt">Read/Write Configuration from/to text file</a></li>
95  <li><a href="#readwriteobj">Read/Write Configuration Object from/to root file</a></li>
96 </ol>
97 
98 <h3><a name="usage">I. Usage</a></h3>
99 <pre>
100  root[] CWB::config config; // define config object with the default parameters
101  root[] cout << config.nIFO << endl; // config.nIFO = 0
102  root[]
103  root[] config.Export(); // export config parameters to CINT
104  root[] // all parameters are visible in CINT
105  root[] cout << nIFO << endl; // nIFO = 0
106  root[] nIFO = 3;
107  root[] cout << nIFO << endl; // nIFO = 3
108  root[] config.Import(); // import CINT config parameters into config object
109  root[] cout << config.nIFO << endl; // config.nIFO = 3
110 </pre>
111 
112 <h3><a name="writeframetxt">II. Read/Write Configuration from/to text file</a></h3>
113 <pre>
114  root[] config.Import("config.C"); // import config parameters from file config.C
115  root[]
116  root[] config.Export("config.C"); // export config parameters from file config.C
117 </pre>
118 
119 <h3><a name="writeframeobj">III. Read/Write Configuration Object from/to root file</a></h3>
120 <pre>
121  root[] // --------------------------------------------------------
122  root[] // Write object config to root file
123  root[] // --------------------------------------------------------
124  root[] TFile *ofroot = new TFile("config.root", "RECREATE");
125  root[] config.Write("CC");
126  root[] ofroot->Close();
127  root[]
128  root[] // --------------------------------------------------------
129  root[] // Read object config from root file
130  root[] // --------------------------------------------------------
131  root[] TFile *ifroot = new TFile("config.root");
132  root[] ifroot.ls();
133  root[] CWB::config *iconfig = (CWB::config*)f->Get("CC");
134  root[] ifroot->Close();
135 </pre>
136 
137 </p>
138 
139 END_HTML */
140 ////////////////////////////////////////////////////////////////////////////////
141 
142 ClassImp(CWB::config)
143 
144 //______________________________________________________________________________
146 //
147 // default constructor
148 //
149 
150  umacro=="" ? Init() : Import(umacro);
151 }
152 
153 //______________________________________________________________________________
155 //
156 // default destructor
157 //
158 
159 }
160 
161 //______________________________________________________________________________
162 void
163 CWB::config::Browse(TBrowser *b) {
164 //
165 // Browse
166 //
167 
168  View();
169 }
170 
171 //______________________________________________________________________________
172 void
174 //
175 // Reset parameters to 0/NULL/""/' '
176 //
177 
178  strcpy(this->analysis,"");
179  online = false;
180 
181  nIFO = 0;
182  search = ' ';
183  optim = false;
184 
185  inRate= 0;
186  bpp = 0.;
187  Tgap = 0.;
188  Fgap = 0.;
189  TFgap = 0.;
190  fLow = 0.;
191  fHigh = 0.;
192  fResample = 0;
193  Acore = 0.;
194  Tlpr = 0.;
195 
196  x2or = 0.;
197  netRHO= 0.;
198 
199  levelR = 0;
200  levelF = 0;
201  levelD = 0;
202  l_low = 0;
203  l_high = 0;
204 
205  segLen = 0.;
206  segMLS = 0.;
207  segTHR = 0.;
208  segEdge = 0.;
209  segOverlap = 0.;
210 
211  lagSize = 0;
212  lagStep = 0.;
213  lagOff = 0;
214  lagMax = 0;
215  lagFile = NULL;
216  strcpy(lagMode," ");
217  lagSite = NULL;
218  for(int i=0;i<NIFO_MAX;i++) shift[i] = 0.;
219 
220  mlagStep = 0;
221 
222  slagSize = 0;
223  slagMin = 0;
224  slagMax = 0;
225  slagOff = 0;
226  slagSite = NULL;
227  slagFile = NULL;
228 
229  whiteWindow = 0.;
230  whiteStride = 0.;
231 
232  Psave = 0;
233 
234  for(int i=0;i<NIFO_MAX;i++) dcCal[i] = 0.;
235 
236  simulation = 0;
237  iwindow = 0.;
238  nfactor = 0;
239 
240  for(int i=0;i<NIFO_MAX;i++) dataShift[i] = 0.;
241 
242  mdc_shift.startMDC = 0;
243  mdc_shift.stopMDC = 0;
244  mdc_shift.offset = 0;
245 
246  strcpy(wdmXTalk,"");
247  upTDF = 0;
248  TDSize = 0;
249  strcpy(filter,"");
250 
251  pattern= 0;
252  BATCH = 0;
253  LOUD = 0;
254  subnet = 0.;
255  subcut = 0.;
256 
257  delta = 0.;
258  gamma = 0.;
259  eDisbalance = false;
260 
261  EFEC = false;
262  mode = 0;
263  angle = 0.;
264  Theta1 = 0.;
265  Theta2 = 0.;
266  Phi1 = 0.;
267  Phi2 = 0.;
268  mask = 0.00;
269  healpix= 0;
270 
271  precision = 0.;
272 
275 
276  dumpHistory = false;
277  dump = false;
278  savemode = false;
279  cedDump = false;
280  cedRHO = 0.;
281  nSky = 0;
282 
283  for(int i=0;i<2*NIFO_MAX;i++) strcpy(frFiles[i],"");
284 
285  frRetryTime = 0;
286 
287  strcpy(filter_dir,"");
288 
289  strcpy(injectionList,"");
290  strcpy(skyMaskFile,"");
291  strcpy(skyMaskCCFile,"");
292  for(int i=0;i<NIFO_MAX;i++) strcpy(channelNamesRaw[i],"");
293  for(int i=0;i<NIFO_MAX;i++) strcpy(channelNamesMDC[i],"");
294 
295  strcpy(work_dir , "");
296  strcpy(config_dir , "");
297  strcpy(input_dir , "");
298  strcpy(output_dir , "");
299  strcpy(merge_dir , "");
300  strcpy(condor_dir , "");
301  strcpy(report_dir , "");
302  strcpy(macro_dir , "");
303  strcpy(log_dir , "");
304  strcpy(data_dir , "");
305  strcpy(tmp_dir , "");
306  strcpy(ced_dir , "");
307  strcpy(pp_dir , "");
308  strcpy(dump_dir , "");
309  strcpy(www_dir , "");
310  strcpy(data_label , "");
311  strcpy(condor_log , "");
312  strcpy(condor_tag , "");
313  strcpy(nodedir , "");
314 
315  nDQF = 0;
316 
317  plugin.SetName("");
318  configPlugin.SetName("");
319  strcpy(parPlugin , "");
320  dataPlugin=false;
321  mdcPlugin=false;
322  dcPlugin=false;
323  cohPlugin=false;
324  scPlugin=false;
325  outPlugin=false;
326 
327  strcpy(comment , "");
328 
329  return;
330 }
331 
332 //______________________________________________________________________________
333 void
335 //
336 // Import from macro or CINT the configuration parameters
337 //
338 // Input: umacro - unnamed root macro
339 // if umacro="" then parameters are imported from CINT
340 //
341 // NOTE: macro must be unnamed, parameters in macro must be declared with type
342 //
343 // WARNING: if umacro!="" all CINT global variables with the same name are overwritten !!!
344 //
345 
346 #ifdef _USE_ROOT6
347  // The interpreter of root6 if full c++ compliant
348  // When unamed macros are loaded the symbols which have been redeclared with the same name are not allowed
349  // The following code check if umacro has been already loaded from the root command line
350  // if already loaded the macro umacro is not reloaded
351  // This patch fix the job running with condor
352  for(int i=0;i<gApplication->Argc();i++) {
353  bool check=true;
354  if(TString(gApplication->Argv(i)).EndsWith(".C")) {
355 
356  char* file1 = CWB::Toolbox::readFile(gApplication->Argv(i));
357  if(file1==NULL) {check=false;continue;}
358  char* file2 = CWB::Toolbox::readFile(umacro);
359  if(file2==NULL) {delete [] file1;check=false;continue;}
360 
361  //cout << "file1 : " << gApplication->Argv(i) << " " << strlen(file2) << endl;
362  //cout << "file2 : " << umacro << " " << strlen(file2) << endl;
363  if(strlen(file1)==strlen(file2)) {
364  for(int i=0;i<strlen(file1);i++) {if(file1[i]!=file2[i]) check=false;break;}
365  } else check=false;
366  delete [] file1;
367  delete [] file2;
368  } else check=false;
369  if(check==true) return;
370  }
371 #endif
372 
373  int err=0;
374  if(umacro!="") {
375  gROOT->ProcessLine("#include \"xroot.hh\""); // define macros SEARCH,GAMMA,XROOT
376  gROOT->Macro(umacro,&err);
377  if(err!=0) {
378  cout << "CWB::config::Import : Error Loading Macro " << umacro.Data() << endl;
379  exit(1);
380  }
381  }
382 
383  SetVar(0);
384 }
385 
386 //______________________________________________________________________________
387 void
389 //
390 // Export to macro or CINT the configuration parameters
391 //
392 // Input: fname - output unnamed macro file name
393 // if fname="" then parameters are exported to CINT
394 //
395 
396  if(fname.Sizeof()>1) Print(fname);
397  else SetVar(1);
398 }
399 
400 //______________________________________________________________________________
401 void
403 //
404 // Import/Export from/to CINT the configuration parameters
405 //
406 // Input: MODE - 0/1 -> Import/Export
407 //
408 
409 // config parameters
410 
411  SETVAR(MODE,analysis,char,8,1);
412  SETVAR(MODE,online,bool,1,1);
413 
414  SETVAR(MODE,nIFO,int,1,1);
415 #ifdef _USE_ROOT6
416  char cfg_search;
417  if(MODE==0) { // import
418  SETVAR(MODE,cfg_search,char,1,1);
419  search=cfg_search;
420  } else { // export
421  cfg_search=search;
422  SETVAR(MODE,cfg_search,char,1,1);
423  }
424 #else
425  SETVAR(MODE,search,char,1,1);
426 #endif
427  SETVAR(MODE,optim,bool,1,1);
428 
429  SETVAR(MODE,ifo,char,NIFO_MAX,8);
430  SETVAR(MODE,refIFO,char,4,1);
432 
433  // cWB settings
434 
435  SETVAR(MODE,inRate,size_t,1,1);
436  SETVAR(MODE,bpp,double,1,1);
437  SETVAR(MODE,Tgap,double,1,1);
438  SETVAR(MODE,Fgap,double,1,1);
439  SETVAR(MODE,TFgap,double,1,1);
440  SETVAR(MODE,fLow,double,1,1);
441  SETVAR(MODE,fHigh,double,1,1);
442  SETVAR(MODE,fResample,size_t,1,1);
443 
444  SETVAR(MODE,Acore,double,1,1);
445  SETVAR(MODE,Tlpr,double,1,1);
446 
447  SETVAR(MODE,x2or,double,1,1);
448  SETVAR(MODE,netRHO,double,1,1);
449  SETVAR(MODE,netCC,double,1,1);
450 
451  // wavelet transformation settings
452 
453  SETVAR(MODE,levelR,int,1,1);
454  SETVAR(MODE,levelF,int,1,1);
455  SETVAR(MODE,levelD,int,1,1);
456  SETVAR(MODE,l_low,int,1,1);
457  SETVAR(MODE,l_high,int,1,1);
458 
459  // segments
460  SETVAR(MODE,segLen,double,1,1);
461  SETVAR(MODE,segMLS,double,1,1);
462  SETVAR(MODE,segTHR,double,1,1);
463  SETVAR(MODE,segEdge,double,1,1);
464  SETVAR(MODE,segOverlap,double,1,1);
465 
466  // lags
467  SETVAR(MODE,lagSize,size_t,1,1);
468  SETVAR(MODE,lagStep,double,1,1);
469  SETVAR(MODE,lagOff,size_t,1,1);
470  SETVAR(MODE,lagMax,size_t,1,1);
471  SETVAR(MODE,lagFile,char*,1,1);
472  SETVAR(MODE,lagMode,char,2,1);
473  SETVAR(MODE,lagSite,size_t*,1,1);
474  SETVAR(MODE,shift,double,NIFO_MAX,1);
475 
476  // multi lags
477  SETVAR(MODE,mlagStep,int,1,1);
478 
479  // super lags
480  SETVAR(MODE,slagSize,int,1,1);
481  SETVAR(MODE,slagMin,int,1,1);
482  SETVAR(MODE,slagMax,int,1,1);
483  SETVAR(MODE,slagOff,int,1,1);
484  SETVAR(MODE,slagSite,size_t*,1,1);
485  SETVAR(MODE,slagFile,char*,1,1);
486 
487  // whitening parameters
488  SETVAR(MODE,whiteWindow,double,1,1);
489  SETVAR(MODE,whiteStride,double,1,1);
490 
491  // Skymap probability pixels to be saved in the final output root file
492  SETVAR(MODE,Psave,int,1,1);
493 
494  // DC corrections
495  SETVAR(MODE,dcCal,double,NIFO_MAX,1);
496 
497  // simulation parameters
498  SETVAR(MODE,simulation,int,1,1);
499  SETVAR(MODE,iwindow,double,1,1);
500  SETVAR(MODE,nfactor,int,1,1);
501  SETVAR(MODE,factors,double,FACTORS_MAX,1);
502 
503  // noise shift data
504  SETVAR(MODE,dataShift,double,NIFO_MAX,1);
505 
506  // parameter to shift in time the injections (sec)
507  SETVAR(MODE,mdc_shift,mdcshift,1,1);
508 
509  // delay filter
510  SETVAR(MODE,wdmXTalk,char,1024,1);
511  SETVAR(MODE,upTDF,size_t,1,1);
512  SETVAR(MODE,TDSize,size_t,1,1);
513  SETVAR(MODE,filter,char,1024,1);
514 
515  // coherence stage
516  SETVAR(MODE,pattern,int,1,1);
517 
518  // supercluster stage
519  SETVAR(MODE,BATCH,int,1,1);
520  SETVAR(MODE,LOUD,int,1,1);
521  SETVAR(MODE,subnet,double,1,1);
522  SETVAR(MODE,subcut,double,1,1);
523 
524  // regulator
525  SETVAR(MODE,delta,double,1,1);
526 #ifdef _USE_ROOT6
527  double cfg_gamma;
528  if(MODE==0) { // import
529  SETVAR(MODE,cfg_gamma,double,1,1);
530  gamma=cfg_gamma;
531  } else { // export
532  cfg_gamma=gamma;
533  SETVAR(MODE,cfg_gamma,double,1,1);
534  }
535 #else
536  SETVAR(MODE,gamma,double,1,1);
537 #endif
538 
539  SETVAR(MODE,eDisbalance,bool,1,1);
540 
541  // sky settings
542 
543  SETVAR(MODE,EFEC,bool,1,1);
544  SETVAR(MODE,mode,size_t,1,1);
545  SETVAR(MODE,angle,double,1,1);
546  SETVAR(MODE,Theta1,double,1,1);
547  SETVAR(MODE,Theta2,double,1,1);
548  SETVAR(MODE,Phi1,double,1,1);
549  SETVAR(MODE,Phi2,double,1,1);
550  SETVAR(MODE,mask,double,1,1);
551  SETVAR(MODE,healpix,size_t,1,1);
552 
553  // error regions settings
554 
555  SETVAR(MODE,precision,double,1,1);
556 
557  // file dump MODE
558 
561  SETVAR(MODE,dumpHistory,bool,1,1);
562  SETVAR(MODE,dump,bool,1,1);
563  SETVAR(MODE,savemode,bool,1,1);
564  SETVAR(MODE,cedDump,bool,1,1);
565  SETVAR(MODE,cedRHO,double,1,1);
566  SETVAR(MODE,nSky,long,1,1);
567 
568  // directories, file names
569 
570  SETVAR(MODE,filter_dir,char,1024,1);
571 
572  SETVAR(MODE,injectionList,char,1024,1);
573  SETVAR(MODE,skyMaskFile,char,1024,1);
574  SETVAR(MODE,skyMaskCCFile,char,1024,1);
575 
576  SETVAR(MODE,channelNamesRaw,char,NIFO_MAX,50);
577  SETVAR(MODE,channelNamesMDC,char,NIFO_MAX,50);
578 
579  // working dir
580  SETVAR(MODE,work_dir,char,1024,1);
581 
582  SETVAR(MODE,config_dir,char,1024,1);
583  SETVAR(MODE,input_dir,char,1024,1);
584  SETVAR(MODE,output_dir,char,1024,1);
585  SETVAR(MODE,merge_dir,char,1024,1);
586  SETVAR(MODE,condor_dir,char,1024,1);
587  SETVAR(MODE,report_dir,char,1024,1);
588  SETVAR(MODE,macro_dir,char,1024,1);
589  SETVAR(MODE,log_dir,char,1024,1);
590  SETVAR(MODE,data_dir,char,1024,1);
591  SETVAR(MODE,tmp_dir,char,1024,1);
592  SETVAR(MODE,ced_dir,char,1024,1);
593  SETVAR(MODE,pp_dir,char,1024,1);
594  SETVAR(MODE,dump_dir,char,1024,1);
595  SETVAR(MODE,www_dir,char,1024,1);
596 
597  // data label
598  SETVAR(MODE,data_label,char,1024,1);
599 
600  // condor declarations
601  SETVAR(MODE,condor_log,char,1024,1);
602 
603  // Define a Unique Tag for Condor Jobs
604  SETVAR(MODE,condor_tag,char,1024,1);
605 
606  // frame files list : [0:nIFO-1]/[nIFO:2*nIFO-1] contains strain/mdc file names
607  // If all mdc channels are in a single frame file -> mdc must be declared in the nIFO position
608  SETVAR(MODE,frFiles,char,(2*NIFO_MAX),1024);
609  // frame reading retry time (sec) : 0 -> disable
610  SETVAR(MODE,frRetryTime,int,1,1);
611 
612  // dq file list
613  // {ifo, dqcat_file, dqcat[0/1/2], shift[sec], inverse[false/true], 4columns[true/false]}
614  SETVAR(MODE,nDQF,int,1,1);
615  SETVAR(MODE,DQF,dqfile,DQF_MAX,1);
616 
617  // read and dump data on local disk (nodedir)
618  SETVAR(MODE,nodedir,char,1024,1);
619 
620  // plugin
621  if(MODE==0) { // import from CINT
622  global = (TGlobal*)gROOT->GetListOfGlobals()->FindObject("plugin");
623  if(global!=NULL)
624  plugin = *(TMacro*)global->GetAddress();
625  if(TString(plugin.GetName())!="") {
626  // check if code is empty
627  TList* list = plugin.GetListOfLines();
628  if(list->GetSize()==0) {
629  cout << "CWB::config::SetVar - Error loading plugin : "
630  << plugin.GetTitle() << endl;
631  exit(1);
632  }
633  }
634  } else { // export to CINT
635  global = (TGlobal*)gROOT->GetListOfGlobals()->FindObject("plugin");
636  if(global==NULL) {
637  sprintf(cmdline,"plugin;");
638  EXPORT(TMacro,plugin,cmdline);
639  }
640  if(TString(plugin.GetName())!="") {
641  // export to CINT macro plugin object
642  sprintf(cmdline,"pplugin = (TMacro*)%p;",&plugin);
643  EXPORT(TMacro*,pplugin,cmdline);
644  sprintf(cmdline,"plugin = TMacro(*pplugin);");
645  gROOT->ProcessLine(cmdline);
646  //sprintf(cmdline,"plugin.SetTitle("");"); // macro is only in memory (no disk)
647  sprintf(cmdline,"plugin.SetTitle(\"%s\");",plugin.GetTitle());
648  gROOT->ProcessLine(cmdline);
649  }
650  }
651  // configPlugin
652  if(MODE==0) { // import from CINT
653  global = (TGlobal*)gROOT->GetListOfGlobals()->FindObject("configPlugin");
654  if(global!=NULL) {
655  configPlugin = *(TMacro*)global->GetAddress();
656  if(TString(configPlugin.GetName())!="") {
657  // check if code is empty
658  TList* list = configPlugin.GetListOfLines();
659  if(list->GetSize()==0) {
660  cout << "CWB::config::SetVar - Error loading configPlugin : "
661  << configPlugin.GetTitle() << endl;
662  exit(1);
663  }
664  }
665  }
666  } else { // export to CINT
667  global = (TGlobal*)gROOT->GetListOfGlobals()->FindObject("configPlugin");
668  if(global==NULL) {
669  sprintf(cmdline,"configPlugin;");
670  EXPORT(TMacro,configPlugin,cmdline);
671  global = (TGlobal*)gROOT->GetGlobal("configPlugin",true);
672  }
673  char tmpFile[1024]="";
674  if(TString(configPlugin.GetName())!="") {
675  // export to CINT macro configPlugin object
676  sprintf(cmdline,"pconfigPlugin = (TMacro*)%p;",&configPlugin);
677  EXPORT(TMacro*,pconfigPlugin,cmdline);
678  sprintf(cmdline,"configPlugin = TMacro(*pconfigPlugin);");
679  gROOT->ProcessLine(cmdline);
680  //sprintf(cmdline,"configPlugin.SetTitle("");"); // macro is only in memory (no disk)
681  sprintf(cmdline,"configPlugin.SetTitle(\"%s\");",configPlugin.GetTitle());
682  gROOT->ProcessLine(cmdline);
683  }
684  }
685  SETVAR(MODE,parPlugin,char,1024,1);
686  SETVAR(MODE,dataPlugin,bool,1,1);
687  SETVAR(MODE,mdcPlugin,bool,1,1);
688  SETVAR(MODE,dcPlugin,bool,1,1);
689  SETVAR(MODE,cohPlugin,bool,1,1);
690  SETVAR(MODE,scPlugin,bool,1,1);
691  SETVAR(MODE,outPlugin,bool,1,1);
692 
693  // user defined comment
694  SETVAR(MODE,comment,char,1024,1);
695 
696  return;
697 }
698 /*
699 void
700 CWB::config::Streamer(TBuffer &R__b) {
701 
702  // Stream an object of class detector.
703 
704  UInt_t R__s, R__c;
705  if (R__b.IsReading()) {
706  Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
707  TObject::Streamer(R__b);
708  R__b.CheckByteCount(R__s, R__c, config::IsA());
709  } else {
710  R__c = R__b.WriteVersion(config::IsA(), kTRUE);
711  TObject::Streamer(R__b);
712  R__b.SetByteCount(R__c, kTRUE);
713  }
714 }
715 */
716 
717 //______________________________________________________________________________
718 void
719 CWB::config::Print(Option_t* option) {
720 //
721 // printf configuration parameters
722 //
723 // Input: option - if option="" then parameters are displayed to the stdout
724 // otherwise to file name = option
725 //
726 
727  FILE* stream = stdout;
728  if(TString(option).Sizeof()>1)
729  if((stream = fopen(option, "w")) == NULL) {
730  cout << "CWB::config::Print : Error opening file " << option << endl;
731  exit(1);
732  }
733 
734  char comma[NIFO_MAX];
735  if(nIFO==0) {for(int n=0;n<NIFO_MAX-1;n++) comma[n]=','; comma[NIFO_MAX-1]=' ';}
736  else {for(int n=0;n<nIFO-1;n++) comma[n]=','; comma[nIFO-1]=' ';}
737 
738  if(TString(option).Sizeof()>1) fprintf(stream,"{\n\n");
739 
740  fprintf(stream," #ifndef CWB_USER_PARAMETER_FILE\n");
741  fprintf(stream," #define CWB_USER_PARAMETER_FILE\n\n");
742 
743  fprintf(stream," #include \"xroot.hh\" // defines macro to manage ROOT5 vs ROOT6\n");
744 
745  fprintf(stream,"\n");
746  fprintf(stream," char analysis[8] \t= \"%s\";\t\t// cWB analysis\n",analysis);
747  fprintf(stream," bool online\t\t= %d;\t\t// true/false -> online/offline\n",online);
748  fprintf(stream,"\n");
749  fprintf(stream," int nIFO\t\t= %d;\t\t// size of network starting with first detector ifo[]\n",nIFO);
750  fprintf(stream," SEARCH(char)\t\t= '%c';\t\t// see description below\n",search);
751  fprintf(stream," bool optim\t\t= %d;\t\t// true -> optimal resolution likelihood analysis\n",optim);
752  fprintf(stream,"\n");
753 
754  if(nIFO==0) {
755  fprintf(stream," char ifo[NIFO_MAX][8];\n");
756  fprintf(stream," char refIFO[4];\t\t\t// reference IFO\n");
757  fprintf(stream," \n");
758  fprintf(stream," // user define detectors list : is selected if detectorParams[n].name!=\"\"\n");
759  fprintf(stream," // {name, latitude, longitude, elevation, AltX, AzX, AltY, AzY}\n");
760  fprintf(stream," detectorParams detParms[NIFO_MAX];\n");
761  } else {
762  char ifos[32]="";for(int n=0;n<nIFO;n++) sprintf(ifos,"%s\"%s\"%c",ifos,ifo[n],comma[n]);
763  fprintf(stream," char ifo[%d][8]\t= {%s};\n",nIFO,ifos);
764  fprintf(stream," char refIFO[4]\t= \"%s\";\t\t// reference IFO\n",refIFO);
765  fprintf(stream," \n");
766  fprintf(stream," // user define detectors list : is selected if detectorParams[n].name!=\"\"\n");
767  fprintf(stream," // {name, latitude, longitude, elevation, AltX, AzX, AltY, AzY}\n");
768  fprintf(stream," detectorParams detParms[%d] = {\n",nIFO);
769  for(int i=0;i<nIFO;i++) fprintf(stream," {\"%s\", %g, %g, %g, %g, %g, %g, %g},\n",
770  detParms[i].name,detParms[i].latitude,detParms[i].longitude,
771  detParms[i].elevation,detParms[i].AltX,detParms[i].AzX,
772  detParms[i].AltY,detParms[i].AzY);
773  fprintf(stream," };\n");
774  }
775 
776  fprintf(stream,"\n");
777  fprintf(stream," // cWB settings\n");
778  fprintf(stream,"\n");
779 
780  fprintf(stream," size_t inRate\t\t= %lu;\t// input data rate\n",inRate);
781  fprintf(stream," double bpp\t\t= %g;\t// probability for pixel selection\n",bpp);
782  if(TString(analysis)=="1G") {
783  fprintf(stream," double Tgap\t\t= %g;\t// time gap between clusters (sec)\n",Tgap);
784  fprintf(stream," double Fgap\t\t= %g;\t// frequency gap between clusters (Hz)\n",Fgap);
785  } else {
786  fprintf(stream," double Tgap\t\t= %g;\t// defragmentation time gap between clusters (sec)\n",Tgap);
787  fprintf(stream," double Fgap\t\t= %g;\t// defragmentation frequency gap between clusters (Hz)\n",Fgap);
788  fprintf(stream," double TFgap\t\t= %g;\t// threshold on the time-frequency separation between two pixels\n",TFgap);
789  }
790  fprintf(stream," double fLow\t\t= %g;\t// low frequency of the search\n",fLow);
791  fprintf(stream," double fHigh\t\t= %g;\t// high frequency of the search\n",fHigh);
792  fprintf(stream," size_t fResample\t= %lu;\t\t// if>0 the inRate is resampled to fResample\n",fResample);
793  fprintf(stream," double Acore\t\t= %g;\t// threshold for selection of core pixels\n",Acore);
794  fprintf(stream," double Tlpr\t\t= %g;\t// training time for LPR filter\n",Tlpr);
795 
796  fprintf(stream,"\n");
797 
798  fprintf(stream," double x2or\t\t= %g;\t// 2 OR threshold\n",x2or);
799  if(TString(analysis)=="1G") {
800  fprintf(stream," double netRHO\t\t= %g;\t// threshold on rho\n",netRHO);
801  } else {
802  fprintf(stream," double netRHO\t\t= %g;\t// (4.5-5.5) - kills weak clusters to reduce output pixel rate (supercluster)\n",netRHO);
803  }
804  fprintf(stream," double netCC\t\t= %g;\t// threshold on network correlation\n",netCC);
805 
806  fprintf(stream,"\n");
807  fprintf(stream," // wavelet transformation settings\n");
808  fprintf(stream,"\n");
809 
810  fprintf(stream," int levelR\t\t= %d;\t\t// resampling level : inRate[fResample]/(2^levelR) Hz\n",levelR);
811  fprintf(stream," int levelF\t\t= %d;\t\t// level where second LPR filter is applied\n",levelF);
812  fprintf(stream," int levelD\t\t= %d;\t\t// decomposition level\n",levelD);
813  fprintf(stream," int l_low\t\t= %d;\t\t// low frequency resolution level (2^l_low Hz)\n",l_low);
814  fprintf(stream," int l_high\t\t= %d;\t\t// high frequency resolution level (2^l_high Hz)\n",l_high);
815 
816  fprintf(stream,"\n");
817  fprintf(stream," // time shift analysis settings\n");
818  fprintf(stream,"\n");
819 
820  fprintf(stream," // segments\n");
821 
822  fprintf(stream," double segLen\t\t= %g;\t// Segment length [sec]\n",segLen);
823  fprintf(stream," double segMLS\t\t= %g;\t// Minimum Segment Length after DQ_CAT1 [sec]\n",segMLS);
824  fprintf(stream," double segTHR\t\t= %g;\t// Minimum Segment Length after DQ_CAT2 [sec]\n",segTHR);
825  fprintf(stream," double segEdge\t= %g;\t// wavelet boundary offset [sec]\n",segEdge);
826  fprintf(stream," double segOverlap\t= %g;\t// overlap between job segments [sec]\n",segOverlap);
827 
828  fprintf(stream,"\n");
829  fprintf(stream," // lags\n");
830 
831  fprintf(stream," size_t lagSize\t= %lu;\t\t// number of lags (simulation=1)\n",lagSize);
832  fprintf(stream," double lagStep\t= %g;\t// time interval between lags [sec]\n",lagStep);
833  fprintf(stream," size_t lagOff\t\t= %lu;\t\t// first lag id (lagOff=0 - include zero lag )\n",lagOff);
834  fprintf(stream," size_t lagMax\t\t= %lu;\t\t// 0/>0 - standard/extended lags\n",lagMax);
835  if(lagFile==NULL) fprintf(stream," char* lagFile\t= NULL;\t\t// lag file list\n");
836  else {
837  fprintf(stream," char* lagFile\t= new char[1024];\t\t// lag file list\n");
838  fprintf(stream," sprintf(lagFile,\"%s\");\n",lagFile);
839  }
840  fprintf(stream," char lagMode[2]\t= \"%s\";\t\t// w/r - write/read lag list\n",lagMode);
841  if(lagSite==NULL) {
842  fprintf(stream," size_t* lagSite\t= NULL;\t\t// site index starting with 0\n");
843  } else {
844  char sites[32];for(int n=0;n<nIFO;n++) sprintf(sites,"%s%lu%c",sites,lagSite[n],comma[n]);
845  fprintf(stream," size_t lagSite[%d]\t= {%s};\t\t// site index starting with 0\n",nIFO,sites);
846  }
847  char shifts[64]="";
848  if(nIFO==0) {for(int n=0;n<NIFO_MAX;n++) sprintf(shifts,"%s%1.0f%c",shifts,0.,comma[n]);
849  fprintf(stream," double shift[NIFO_MAX] = {%s};\t// use for standard shifts\n",shifts);
850  } else { for(int n=0;n<nIFO;n++) sprintf(shifts,"%s%g%c",shifts,shift[n],comma[n]);
851  fprintf(stream," double shift[%d]\t= {%s};\t// use for standard shifts\n",nIFO,shifts);
852  }
853 
854  fprintf(stream,"\n");
855  fprintf(stream," // multi lags\n");
856  fprintf(stream," int mlagStep\t= %d;\t\t// if mlagStep=0 then 'standard lag mode'\n",mlagStep);
857  fprintf(stream," \t\t\t\t\t// else cicle over lags with step mlagStep\n");
858 
859  fprintf(stream,"\n");
860  fprintf(stream," // super lags\n");
861  fprintf(stream," int slagSize\t= %d;\t\t// number of super lags (simulation=1) - if slagSize=0 -> Standard Segments\n",slagSize);
862  fprintf(stream," int slagMin\t= %d;\t\t// select the minimum available slag distance : slagMin must be <= slagMax\n",slagMin);
863  fprintf(stream," int slagMax\t= %d;\t\t// select the maximum available slag distance\n",slagMax);
864  fprintf(stream," int slagOff\t= %d;\t\t// first slag id (slagOff=0 - include zero slag )\n",slagOff);
865  if(slagSite==NULL) {
866  fprintf(stream," size_t* slagSite\t= NULL;\t\t// site index starting with 0\n");
867  } else {
868  char sites[32];
869  for(int n=0;n<nIFO;n++) sprintf(sites,"%s%lu%c",sites,slagSite[n],comma[n]);
870  fprintf(stream," size_t slagSite[%d]\t= {%s};\t\t// site index starting with 0\n",nIFO,sites);
871  }
872  if(slagFile==NULL) fprintf(stream," char* slagFile\t= NULL;\t\t// slag file list\n");
873  else {
874  fprintf(stream," char* slagFile\t= new char[1024];\t\t// slag file list\n");
875  fprintf(stream," sprintf(slagFile,\"%s\");\n",slagFile);
876  }
877 
878  fprintf(stream,"\n");
879  fprintf(stream," // whitening parameters\n");
880  fprintf(stream," double whiteWindow\t= %g;\t// time window dT. if = 0 - dT=T, where T is wavearray duration\n",whiteWindow);
881  fprintf(stream," double whiteStride\t= %g;\t// noise sampling interval (window stride)\n",whiteStride);
882 
883  fprintf(stream,"\n");
884  fprintf(stream," int Psave\t\t= %d;\t\t// Skymap probability to be saved in the final output root file\n",Psave);
885  fprintf(stream," \t\t\t\t\t// (saved if !=0 : see nSky)\n");
886 
887  fprintf(stream,"\n");
888  fprintf(stream," // DC corrections\n");
889  char dcCals[64]="";
890  if(nIFO==0) {for(int n=0;n<NIFO_MAX;n++) sprintf(dcCals,"%s%1.0f%c",dcCals,0.,comma[n]);
891  fprintf(stream," double dcCal[NIFO_MAX] = {%s};\t// use for standard dcCals\n",dcCals);
892  } else { for(int n=0;n<nIFO;n++) sprintf(dcCals,"%s%g%c",dcCals,dcCal[n],comma[n]);
893  fprintf(stream," double dcCal[%d]\t= {%s};\t// use for standard dcCals\n",nIFO,dcCals);
894  }
895 
896  fprintf(stream,"\n");
897  fprintf(stream," // simulation parameters\n");
898  fprintf(stream," int simulation\t= %d;\t\t// 1 for simulation, 0 for production\n",simulation);
899  fprintf(stream," double iwindow\t= %g;\t// analysis time window for injections (Range = Tinj +/- iwindow/2)\n",iwindow);
900  fprintf(stream," int nfactor\t\t= %d;\t\t// number of strain factors\n",nfactor);
901  if(nfactor==0) {
902  fprintf(stream," double factors[FACTORS_MAX];\t\t\t// array of strain factors\n");
903  } else {
904  fprintf(stream," double factors[] = {\t\t\t// array of strain factors\n");
905  for(int i=0;i<nfactor-1;i++) fprintf(stream," %g,\n",factors[i]);
906  if(nfactor>0) fprintf(stream," %g\n",factors[nfactor-1]);
907  fprintf(stream," };\n");
908  }
909 
910  fprintf(stream,"\n");
911  fprintf(stream," // noise shift data\n");
912  char dataShifts[64]="";
913  if(nIFO==0) {for(int n=0;n<NIFO_MAX;n++) sprintf(dataShifts,"%s%1.0f%c",dataShifts,0.,comma[n]);
914  fprintf(stream," double dataShift[NIFO_MAX] = {%s};\t// use for standard dataShifts\n",dataShifts);
915  } else { for(int n=0;n<nIFO;n++) sprintf(dataShifts,"%s%g%c",dataShifts,dataShift[n],comma[n]);
916  fprintf(stream," double dataShift[%d]\t= {%s};\t// use for standard dataShifts\n",nIFO,dataShifts);
917  }
918 
919  fprintf(stream,"\n");
920  fprintf(stream," // use this parameter to shift in time the injections (sec)\n");
921  fprintf(stream," // use {0,0,0} to set mdc_shift to 0\n");
922  fprintf(stream," // if {-1,0,0} the shift is automaticaly selected\n");
923  fprintf(stream," // {startMDC, stopMDC}\n");
924  fprintf(stream," mdcshift mdc_shift = {%g, %g, %g};\n",mdc_shift.startMDC,mdc_shift.stopMDC,mdc_shift.offset);
925 
926  fprintf(stream,"\n");
927  fprintf(stream," // delay filter\n");
928  fprintf(stream,"\n");
929 
930  if(TString(analysis)=="1G") {
931  fprintf(stream," char filter[1024] = \"%s\";\t\t// delay filter suffix: \"\", or \"up1\", or \"up2\" [1G]\n",filter);
932  } else {
933  fprintf(stream," \t\t\t\t\t// catalog of WDM cross-talk coefficients [2G]\n");
934  fprintf(stream," char wdmXTalk[1024] = \"%s\";\n",wdmXTalk);
935  fprintf(stream," size_t upTDF\t\t= %lu;\t\t// upsample factor to obtain rate of TD filter\n",upTDF);
936  fprintf(stream," \t\t\t\t\t// TDRate = (inRate>>levelR)*upTDF [2G]\n");
937  fprintf(stream," size_t TDSize\t\t= %lu;\t\t// time-delay filter size (max 20) [2G]\n",TDSize);
938  }
939 
940  if(TString(analysis)=="2G") {
941  fprintf(stream,"\n");
942  fprintf(stream," // coherence stage\n");
943  fprintf(stream,"\n");
944 
945  fprintf(stream," int pattern\t= %d;\t\t// select pixel pattern used to produce the energy max maps for pixel's selection [2G]\n",pattern);
946 
947  fprintf(stream,"\n");
948  fprintf(stream," // supercluster stage\n");
949  fprintf(stream,"\n");
950 
951  fprintf(stream," int BATCH\t= %d;\t\t// max number of pixel to process in one loadTDamp batch [2G]\n",BATCH);
952  fprintf(stream," int LOUD\t= %d;\t\t\t// number of pixel per cluster to load TD amplitudes [2G]\n",LOUD);
953  fprintf(stream," double subnet\t= %g;\t\t// sub network threshold (supercluster) [2G]\n",subnet);
954  fprintf(stream," double subcut\t= %g;\t\t// sub network threshold in the skyloop (supercluster) [2G]\n",subcut);
955  }
956 
957  fprintf(stream,"\n");
958  fprintf(stream," // regulator\n");
959  fprintf(stream,"\n");
960 
961  if(TString(analysis)=="1G") {
962  fprintf(stream," double delta\t= %g;\t\t// [0/1] -> [weak/soft]\n",delta);
963  fprintf(stream," GAMMA(double)\t= %g;\t\t// set params in net5, [0/1]->net5=[nIFO/0],\n",gamma);
964  fprintf(stream," \t\t\t\t\t// if net5>[threshold=(nIFO-1)] weak/soft[according to delta] else hard\n");
965  fprintf(stream," bool eDisbalance\t= %d;\n",eDisbalance);
966  } else {
967  fprintf(stream," double delta\t= %g;\t\t// 2G: [-1:1] - regulate 2 Detector sky locations\n",delta);
968  fprintf(stream," \t\t\t\t\t// 2G: delta=0 : regulator is disabled, delta<0 : select Lo as skystat instead of Lr\n");
969  fprintf(stream," GAMMA(double)\t= %g;\t\t// 2G: [-1,1] - \n",gamma);
970  fprintf(stream," \t\t\t\t\t// 2G: gamma=0 : regulator is disabled, gamma<0 : sky prior is applied\n");
971  }
972 
973  fprintf(stream,"\n");
974  fprintf(stream," // sky settings\n");
975  fprintf(stream,"\n");
976 
977  fprintf(stream," bool EFEC\t\t= %d;\t\t// Earth Fixed / Selestial coordinates\n",EFEC);
978  fprintf(stream," size_t mode\t\t= %lu;\t\t// sky search mode\n",mode);
979  fprintf(stream," double angle\t\t= %g;\t// angular resolution\n",angle);
980  fprintf(stream," double Theta1\t\t= %g;\t// start theta\n",Theta1);
981  fprintf(stream," double Theta2\t\t= %g;\t// end theta\n",Theta2);
982  fprintf(stream," double Phi1\t\t= %g;\t// start theta\n",Phi1);
983  fprintf(stream," double Phi2\t\t= %g;\t// end theta\n",Phi2);
984  fprintf(stream," double mask\t\t= %g;\t// sky mask fraction\n",mask);
985  fprintf(stream," size_t healpix\t= %lu;\t\t// if not 0 use healpix sky map (healpix order)\n",healpix);
986 
987  fprintf(stream,"\n");
988  fprintf(stream," // error regions settings\n");
989  fprintf(stream,"\n");
990 
991  if(TString(analysis)=="1G") {
992  fprintf(stream," double precision\t= %g;\t// No = nIFO*(K+KZero)+precision*E\n",precision);
993  } else {
994  fprintf(stream," double precision\t= %g;\t// set parameters for big clusters events management",precision);
995  }
996 
997  fprintf(stream,"\n");
998  fprintf(stream," // file dump mode\n");
999  fprintf(stream,"\n");
1000 
1001  fprintf(stream," // job file options\n");
1002  fprintf(stream," CWB_JOBF_OPTIONS jobfOptions;\n");
1003  fprintf(stream," jobfOptions = CWB_JOBF_SAVE_DISABLE;\n");
1004  if(jobfOptions&CWB_JOBF_SAVE_CONFIG) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_CONFIG;\n");
1005  if(jobfOptions&CWB_JOBF_SAVE_NETWORK) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_NETWORK;\n");
1006  if(jobfOptions&CWB_JOBF_SAVE_HISTORY) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_HISTORY;\n");
1007  if(jobfOptions&CWB_JOBF_SAVE_STRAIN) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_STRAIN;\n");
1008  if(jobfOptions&CWB_JOBF_SAVE_MDC) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_MDC;\n");
1009  if(jobfOptions&CWB_JOBF_SAVE_CSTRAIN) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_CSTRAIN;\n");
1010  if(jobfOptions&CWB_JOBF_SAVE_COHERENCE) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_COHERENCE;\n");
1011  if(jobfOptions&CWB_JOBF_SAVE_SUPERCLUSTER) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_SUPERCLUSTER;\n");
1012  if(jobfOptions&CWB_JOBF_SAVE_LIKELIHOOD) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_LIKELIHOOD;\n");
1013  if(jobfOptions&CWB_JOBF_SAVE_CED) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_CED;\n");
1014  if(jobfOptions&CWB_JOBF_SAVE_JNET_MACRO) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_JNET_MACRO;\n");
1015  if(jobfOptions&CWB_JOBF_SAVE_CWB) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_CWB;\n");
1016  if(jobfOptions&CWB_JOBF_SAVE_SPARSE) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_SPARSE;\n");
1017  if(jobfOptions&CWB_JOBF_SAVE_WFINJ) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_WFINJ;\n");
1018  if(jobfOptions&CWB_JOBF_SAVE_WFREC) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_WFREC;\n");
1019  if(jobfOptions&CWB_JOBF_SAVE_NODE) fprintf(stream," jobfOptions &= CWB_JOBF_SAVE_NODE;\n");
1020  fprintf(stream," // output root file options\n");
1021  fprintf(stream," CWB_OUTF_OPTIONS outfOptions;\n");
1022  fprintf(stream," outfOptions = CWB_OUTF_SAVE_DISABLE;\n");
1023  if(jobfOptions&CWB_OUTF_SAVE_VAR) fprintf(stream," jobfOptions &= CWB_OUTF_SAVE_VAR;\n");
1024  if(jobfOptions&CWB_OUTF_SAVE_NOISE) fprintf(stream," jobfOptions &= CWB_OUTF_SAVE_NOISE;\n");
1025  fprintf(stream,"\n");
1026  fprintf(stream," bool dumpHistory\t= %d;\t\t// dump history into output root file\n",dumpHistory);
1027  fprintf(stream," bool dump\t\t= %d;\t\t// dump triggers into ascii file\n",dump);
1028  fprintf(stream," bool savemode\t\t= %d;\t\t// temporary save clusters on disc\n",savemode);
1029  fprintf(stream," bool cedDump\t\t= %d;\t\t// dump ced plots with rho>cedRHO\n",cedDump);
1030  fprintf(stream," double cedRHO\t\t= %g;\n",cedRHO);
1031  fprintf(stream," long nSky\t\t= %lu;\t\t// # of skymap prob pixels dumped to ascii\n",nSky);
1032  fprintf(stream," \t\t\t\t\t//(nSky=0 -> (#pixels==1000 || cum prob > 0.99))\n");
1033 
1034  fprintf(stream,"\n");
1035  fprintf(stream," // directories, file names\n");
1036  fprintf(stream,"\n");
1037 
1038  fprintf(stream," char filter_dir[1024]\t\t= \"%s\";\n",filter_dir);
1039 
1040  fprintf(stream," char injectionList[1024]\t= \"%s\";\n",injectionList);
1041  fprintf(stream," char skyMaskFile[1024]\t= \"%s\";\n",skyMaskFile);
1042  fprintf(stream," char skyMaskCCFile[1024]\t= \"%s\";\n",skyMaskCCFile);
1043  if(nIFO==0) {
1044  fprintf(stream," char channelNamesRaw[NIFO_MAX][50];\n");
1045  } else {
1046  fprintf(stream," char channelNamesRaw[%d][50] = {\n",nIFO);
1047  for(int n=0;n<nIFO;n++) fprintf(stream," \"%s\"%c\n",channelNamesRaw[n],comma[n]);
1048  fprintf(stream," };\n");
1049  }
1050  if(nIFO==0) {
1051  fprintf(stream," char channelNamesMDC[NIFO_MAX][50];\n");
1052  } else {
1053  fprintf(stream," char channelNamesMDC[%d][50] = {\n",nIFO);
1054  for(int n=0;n<nIFO;n++) fprintf(stream," \"%s\"%c\n",channelNamesMDC[n],comma[n]);
1055  fprintf(stream," };\n");
1056  }
1057 
1058  fprintf(stream,"\n");
1059  fprintf(stream," // working dir\n");
1060  fprintf(stream," char work_dir[1024]\t= \"%s\";\n",work_dir);
1061 
1062  fprintf(stream," char config_dir[1024]\t= \"%s\";\n",config_dir);
1063  fprintf(stream," char input_dir[1024]\t= \"%s\";\n",input_dir);
1064  fprintf(stream," char output_dir[1024]\t= \"%s\";\n",output_dir);
1065  fprintf(stream," char merge_dir[1024]\t= \"%s\";\n",merge_dir);
1066  fprintf(stream," char condor_dir[1024]\t= \"%s\";\n",condor_dir);
1067  fprintf(stream," char report_dir[1024]\t= \"%s\";\n",report_dir);
1068  fprintf(stream," char macro_dir[1024]\t= \"%s\";\n",macro_dir);
1069  fprintf(stream," char log_dir[1024]\t= \"%s\";\n",log_dir);
1070  fprintf(stream," char data_dir[1024]\t= \"%s\";\n",data_dir);
1071  fprintf(stream," char tmp_dir[1024]\t= \"%s\";\n",tmp_dir);
1072  fprintf(stream," char ced_dir[1024]\t= \"%s\";\n",ced_dir);
1073  fprintf(stream," char pp_dir[1024]\t= \"%s\";\n",pp_dir);
1074  fprintf(stream," char dump_dir[1024]\t= \"%s\";\n",dump_dir);
1075  fprintf(stream," char www_dir[1024]\t= \"%s\";\n",www_dir);
1076 
1077  fprintf(stream,"\n");
1078  fprintf(stream," // data label\n");
1079  fprintf(stream," char data_label[1024]\t= \"%s\";\n",data_label);
1080 
1081  fprintf(stream,"\n");
1082  fprintf(stream," // condor declarations\n");
1083  fprintf(stream," char condor_log[1024]\t= \"%s\";\n",condor_log);
1084 
1085  fprintf(stream,"\n");
1086  fprintf(stream," // Define a Unique Tag for Condor Jobs\n");
1087  fprintf(stream," char condor_tag[1024]\t= \"%s\";\n",condor_tag);
1088 
1089  fprintf(stream,"\n");
1090  fprintf(stream," // frame files list : [0:nIFO-1]/[nIFO:2*nIFO-1] contains strain/mdc file names\n");
1091  fprintf(stream," // If all mdc channels are in a single frame file -> mdc must be declared in the nIFO position\n");
1092  if(nIFO==0) {
1093  fprintf(stream," char frFiles[2*NIFO_MAX][1024];\n");
1094  } else {
1095  fprintf(stream," char frFiles[%d][1024] = {\n",2*nIFO);
1096  for(int n=0;n<2*nIFO-1;n++) fprintf(stream," \"%s\",\n",frFiles[n]);
1097  fprintf(stream," \"%s\" \n",frFiles[2*nIFO-1]);
1098  fprintf(stream," };\n");
1099  fprintf(stream,"\n");
1100  }
1101  fprintf(stream," // frame reading retry time (sec) : 0 -> disable\n");
1102  fprintf(stream," int frRetryTime = %d;\n",frRetryTime);
1103 
1104  fprintf(stream,"\n");
1105  fprintf(stream," // dq file list\n");
1106  fprintf(stream," // {ifo, dqcat_file, dqcat[0/1/2], shift[sec], inverse[false/true], 4columns[true/false]}\n");
1107  fprintf(stream," int nDQF = %d;\n",nDQF);
1108  if(nDQF==0) {
1109  fprintf(stream," dqfile DQF[DQF_MAX];\n");
1110  } else {
1111  fprintf(stream," dqfile DQF[%d] = {\n",nDQF);
1112  for(int i=0;i<nDQF;i++) fprintf(stream," {\"%s\", \"%s\", (CWB_CAT)%d, %g, %d, %d},\n",
1113  DQF[i].ifo,DQF[i].file,DQF[i].cat,DQF[i].shift,DQF[i].invert,DQF[i].c4);
1114  fprintf(stream," };\n");
1115  }
1116 
1117  fprintf(stream,"\n");
1118  fprintf(stream," // read and dump data on local disk (nodedir)\n");
1119  fprintf(stream," char nodedir[1024]\t= \"%s\";\n",nodedir);
1120  fprintf(stream,"\n");
1121 
1122  fprintf(stream,"\n");
1123  fprintf(stream," // cwb config path\n");
1124  fprintf(stream," char cwb_config_env[1024]\t= \"%s\";\n",cwb_config_env);
1125  fprintf(stream," // cluster site name\n");
1126  fprintf(stream," char site_cluster_env[1024]\t= \"%s\";\n",site_cluster_env);
1127  fprintf(stream,"\n");
1128 
1129  fprintf(stream," // plugin name\n");
1130  fprintf(stream," TMacro plugin;\n");
1131  if(TString(plugin.GetTitle())!="") {
1132  TString pluginPath = plugin.GetTitle();
1133  pluginPath.ReplaceAll("_C.so",".C");
1134  fprintf(stream," plugin = TMacro(\"%s\");\n",pluginPath.Data());
1135  fprintf(stream," plugin.SetTitle(\"%s\");\n",plugin.GetTitle());
1136  }
1137  fprintf(stream," TMacro configPlugin;\n");
1138  if(TString(configPlugin.GetTitle())!="") {
1139  //fprintf(stream," configPlugin.SetName(\"%s\");\n",configPlugin.GetName()); // (removed to get unique md5)
1140  fprintf(stream," configPlugin = TMacro(\"%s\");\n",configPlugin.GetTitle());
1141  }
1142  fprintf(stream," char parPlugin[1024]\t= \"%s\";\n",parPlugin);
1143  fprintf(stream," bool dataPlugin\t= %d;\t\t// if dataPlugin=true disable read data from frames\n",dataPlugin);
1144  fprintf(stream," bool mdcPlugin\t= %d;\t\t// if mdcPlugin=true disable read data from frames\n",mdcPlugin);
1145  fprintf(stream," bool dcPlugin\t\t= %d;\t\t// if dcPlugin=true disable built-in data conditioning (only 2G)\n",dcPlugin);
1146  fprintf(stream," bool cohPlugin\t= %d;\t\t// if cohPlugin=true disable built-in coherence stage (only 2G)\n",cohPlugin);
1147  fprintf(stream," bool scPlugin\t\t= %d;\t\t// if scPlugin=true disable built-in supercluster function (only 2G)\n",scPlugin);
1148  fprintf(stream," bool outPlugin\t= %d;\t\t// if outPlugin=true disable built-in output wave file (only 2G)\n",outPlugin);
1149  fprintf(stream,"\n");
1150 
1151  fprintf(stream," char comment[1024]\t= \"%s\";\n",comment);
1152 
1153  if(TString(analysis)=="1G") {
1154  fprintf(stream," // statistics\n");
1155  fprintf(stream," // L - likelihood\n");
1156  fprintf(stream," // c - network correlation coefficient\n");
1157  fprintf(stream," // A - energy disbalance asymmetry\n");
1158  fprintf(stream," // P - penalty factor based on correlation coefficients <x,s>/sqrt(<x,x>*<s,s>)\n");
1159  fprintf(stream," // E - total energy in the data streams\n");
1160  fprintf(stream,"\n");
1161  fprintf(stream," // search modes\n");
1162  fprintf(stream," // 'c' - un-modeled search, fast S5 cWB version, requires constraint settings\n");
1163  fprintf(stream," // 'h' - un-modeled search, S5 cWB version, requires constraint settings\n");
1164  fprintf(stream," // 'B' - un-modeled search, max(P*L*c/E)\n");
1165  fprintf(stream," // 'b' - un-modeled search, max(P*L*c*A/E)\n");
1166  fprintf(stream," // 'I' - elliptical plarisation, max(P*L*c/E)\n");
1167  fprintf(stream," // 'S' - linear plarisation, max(P*L*c/E)\n");
1168  fprintf(stream," // 'G' - circular plarisation, max(P*L*c/E)\n");
1169  fprintf(stream," // 'i' - elliptical plarisation, max(P*L*c*A/E)\n");
1170  fprintf(stream," // 's' - linear plarisation, max(P*L*c*A/E)\n");
1171  fprintf(stream," // 'g' - circular plarisation, max(P*L*c*A/E)\n");
1172  } else {
1173  fprintf(stream," // search modes\n");
1174  fprintf(stream," // r - un-modeled\n");
1175  fprintf(stream," // i - iota - wave (no dispersion correction)\n");
1176  fprintf(stream," // p - Psi - wave\n");
1177  fprintf(stream," // l,s - linear\n");
1178  fprintf(stream," // c,g - circular\n");
1179  fprintf(stream," // e,b - elliptical (no dispersion correction)\n");
1180  }
1181  fprintf(stream,"\n");
1182 
1183  fprintf(stream," #endif\n");
1184 
1185  if(TString(option).Sizeof()>1) fprintf(stream,"\n}\n");
1186  if(TString(option).Sizeof()>1) fclose(stream);
1187 }
1188 
1189 //______________________________________________________________________________
1190 void
1191 CWB::config::DumpPlugin(const char* filename) {
1192 //
1193 // Save macro plugin source into filename
1194 //
1195 // Input: filename - filename where source macro is saved
1196 // if filename="" then the source code is dumped to stdout
1197 //
1198 
1199  if(sizeof(filename)==0) {
1200  cout << "CWB::config::DumpPlugin - Error : no input filename" << endl;
1201  cout.flush();
1202  return;
1203  }
1204  if(TString(filename)=="") {
1205  TList* list=plugin.GetListOfLines();
1206  for(int i=0;i<list->GetSize();i++) {
1207  TObjString* string = (TObjString*)list->At(i);
1208  cout << string->GetString() << endl;
1209  }
1210  } else {
1211  plugin.SaveSource(filename);
1212  cout << "plugin saved into : " << filename << endl;
1213  cout.flush();
1214  }
1215 }
1216 
1217 //______________________________________________________________________________
1218 void
1219 CWB::config::DumpConfigPlugin(const char* filename) {
1220 //
1221 // Save macro configPlugin source into filename
1222 //
1223 // Input: filename - filename where source macro is saved
1224 // if filename="" then the source code is dumped to stdout
1225 //
1226 
1227  if(sizeof(filename)==0) {
1228  cout << "CWB::config::DumpConfigPlugin - Error : no input filename" << endl;
1229  cout.flush();
1230  return;
1231  }
1232  if(TString(filename)=="") {
1233  TList* list=configPlugin.GetListOfLines();
1234  for(int i=0;i<list->GetSize();i++) {
1235  TObjString* string = (TObjString*)list->At(i);
1236  cout << string->GetString() << endl;
1237  }
1238  } else {
1239  configPlugin.SaveSource(filename);
1240  cout << "configPlugin saved into : " << filename << endl;
1241  cout.flush();
1242  }
1243 }
1244 
1245 //______________________________________________________________________________
1246 int
1248 //
1249 // compare config with this->config, display the differences
1250 //
1251 // Input: config - config object to be compared with this object
1252 //
1253 
1254  gRandom->SetSeed(0);
1255  int rnID = int(gRandom->Rndm(13)*1.e9);
1256  UserGroup_t* uinfo = gSystem->GetUserInfo();
1257  TString uname = uinfo->fUser;
1258  gSystem->Exec(TString("mkdir -p /dev/shm/")+uname);
1259 
1260  char ofile1[1024];
1261  sprintf(ofile1,"/dev/shm/%s/cwb_config_1_%d.txt",uname.Data(),rnID);
1262  char ofile2[1024];
1263  sprintf(ofile2,"/dev/shm/%s/cwb_config_2_%d.txt",uname.Data(),rnID);
1264 
1265  config.Print(ofile1);
1266  this->Print(ofile2);
1267 
1268  gSystem->Exec(TString("diff ")+TString(ofile1)+" "+TString(ofile2));
1269 
1270  gSystem->Exec(TString("rm ")+ofile1);
1271  gSystem->Exec(TString("rm ")+ofile2);
1272 
1273  return 0;
1274 }
1275 
1276 //______________________________________________________________________________
1277 void
1279 //
1280 // Show config with a editor defined in CWB_CONFIG_VIEWER environment
1281 //
1282 
1283  gRandom->SetSeed(0);
1284  int rnID = int(gRandom->Rndm(13)*1.e9);
1285  UserGroup_t* uinfo = gSystem->GetUserInfo();
1286  TString uname = uinfo->fUser;
1287  gSystem->Exec(TString("mkdir -p /dev/shm/")+uname);
1288 
1289  char fName[1024];
1290  sprintf(fName,"/dev/shm/%s/cwb_config_%d.C",uname.Data(),rnID);
1291  Print(fName);
1292 
1293  int ret;
1294  char tmpStr[1024];
1295 
1296  if (getenv("CWB_CONFIG_VIEWER") != NULL) {
1297  sprintf(tmpStr, "%s %s", getenv("CWB_CONFIG_VIEWER"), fName);
1298  ret = system(tmpStr);
1299  if (ret != 0) {
1300  sprintf(tmpStr, "vim %s", fName);
1301  system(tmpStr);
1302  }
1303  }
1304  else {
1305  sprintf(tmpStr, "vim %s", fName);
1306  system(tmpStr);
1307  }
1308 
1309  sprintf(tmpStr, "rm -f %s", fName);
1310  system(tmpStr);
1311 
1312  return;
1313 }
1314 
1315 //______________________________________________________________________________
1316 void
1317 CWB::config::DumpConfig(const char* filename, Option_t* option) {
1318 //
1319 // Save configuration to file
1320 //
1321 // Input: filename - output file name
1322 //
1323 
1324  if(sizeof(filename)==0) {
1325  cout << "CWB::config::DumpConfig - Error : no input filename" << endl;
1326  cout.flush();
1327  return;
1328  }
1329  Print(filename);
1330  return;
1331 }
1332 
1333 void
1335 //
1336 // Set configuration in 1 detector mode
1337 // The first detector (if declared) is selected
1338 //
1339 
1340  if(TString(ifo[0])!="" || TString(detParms[0].name)!="") {
1341  cout << "------> Set Sigle Detector Mode !!!" << endl;
1342  // all parameters are declared twice because cWB works only with nIFO>1
1343  // the analysis is done as a network of 2 equal detectors
1344  sprintf(ifo[1],"%s",ifo[0]);
1345  detParms[1] = detParms[0];
1346  dataShift[1] = dataShift[0];
1347  if(TString(ifo[0])!="") strcpy(refIFO,ifo[0]);
1348  else strcpy(refIFO,detParms[0].name); // user defined detector
1351  strcpy(frFiles[2],frFiles[nIFO]); // mdc frFiles
1352  strcpy(frFiles[1],frFiles[0]);
1353 
1354  // select ifo[0] DQ
1355  int k=0;
1356  for(int i=0;i<nDQF;i++) if(TString(DQF[i].ifo)==refIFO) DQF[k++]=DQF[i];
1357  nDQF=k;
1358  for(int i=0;i<nDQF;i++) DQF[i+nDQF]=DQF[i];
1359  nDQF*=2;
1360 
1361  eDisbalance = false; // disable energy disbalance
1362  if(slagSize!=0) {
1363  slagSize = 1;
1364  slagMin = 0;
1365  slagMax = 0;
1366  slagOff = 0;
1367  slagFile = NULL;
1368  }
1369  lagSize = 1;
1370  lagStep = 1;
1371  lagOff = 0;
1372  mode = 1; // 1 - exclude duplicate delay configurations
1373  delta = 0; // weak regulator
1374  if(TString(analysis)=="1G") {
1375  gamma = 0; // force regulator not to be hard
1376  } else {
1377  gamma = 1.0;
1378  precision = 0.0;
1379  }
1380  nSky = 1; // dump only 1 sky location (for single detector there is no sky loop)
1381 
1382  nIFO=2;
1383 
1384  } else {
1385  cout << "CWB::config::SetSingleDetectorMode - Error : ifo[0] not defined !!! " << endl;
1386  exit(1);
1387  }
1388 
1389  return;
1390 }
1391 
1392 void
1394 //
1395 // Check consistency of the parameters
1396 //
1397 
1398  if(TString(analysis)!="1G" && TString(analysis)!="2G")
1399  {cout<<"config::Check : analisys parameter non valid "<<analysis<<endl;exit(1);}
1400 
1401  // check consistency with the environment CWB_ANALYSIS
1402  if(gSystem->Getenv("CWB_ANALYSIS")!=NULL) {
1403  if(TString(analysis)!=TString(gSystem->Getenv("CWB_ANALYSIS"))) {
1404  cout << "CWB::config::Check - Error : analysis=" << analysis;
1405  cout << " is inconsistent with the environment CWB_ANALYSIS="
1406  << gSystem->Getenv("CWB_ANALYSIS") << endl;
1407  cout << " check analysis parameter in user_parameters.C" << endl;
1408  cout << " check CWB_ANALYSIS env in watenv setup" << endl;
1409  cout << " use 'cwb_setpipe 1G/2G' command to switch analysis type" << endl;
1410  exit(1);
1411  }
1412  } else {
1413  cout << "" << endl;
1414  cout << "CWB_ANALYSIS env not defined in watenv setup" << endl;
1415  cout << "add in watenv setup the following statement" << endl;
1416  cout << "" << endl;
1417  cout << "setenv CWB_ANALYSIS '1G' # 1G analysis " << endl;
1418  cout << "or" << endl;
1419  cout << "setenv CWB_ANALYSIS '2G' # 2G analysis " << endl;
1420  cout << "" << endl;
1421  exit(1);
1422  }
1423 
1424  if(nIFO<=0 || nIFO>XIFO) {
1425  cout<<"config::Check : nIFO parameter non valid -> "<<nIFO<<endl;
1426  cout<<" WAT is compiled with XIFO = "<<XIFO<<endl<<endl;
1427  exit(1);
1428  }
1429 
1430  if(nIFO==2) {
1431  if(TString(ifo[0])==TString(ifo[1])) {
1432  if(lagSize!=1) {
1433  cout<<"config::Check : Error - when nIFO=2 & ifo[0]=ifo[1] -> lagSize must be 1"<<endl;
1434  exit(1);
1435  }
1436  if(slagSize==1) {
1437  if((slagMin!=0)||(slagMax!=0)||(slagOff!=0)||(slagFile!=NULL)) {
1438  cout<<"config::Check : Error - when nIFO=2 & ifo[0]=ifo[1] -> slagSize must be 0 or 1"<<endl;
1439  cout<<" if slagSize=1 -> slagMin=slagMax=slagOff=0, slagFile=NULL "<<endl;
1440  exit(1);
1441  }
1442  }
1443  }
1444  }
1445  if(nIFO>2) {
1446  for(int n=0;n<nIFO;n++) {
1447  for(int m=n+1;m<nIFO;m++) {
1448  TString detName1 = TString(ifo[n])!="" ? ifo[n] : detParms[n].name;
1449  TString detName2 = TString(ifo[m])!="" ? ifo[m] : detParms[m].name;
1450  if(detName1==detName2) {
1451  cout<<"config::Check : Error - ifo["<<n<<"]=ifo["<<m<<"]"<<endl;
1452  cout<<"config::Check : when nIFO>2 detector names must be different"<<endl;
1453  exit(1);
1454  }
1455  }
1456  }
1457  }
1458 
1459  if(TString(analysis)=="1G") {
1460  if((search!='r')&&(search!='c')&&(search!='h')&&(search!='B')&&(search!='b')&&(search!='I')&&
1461  (search!='S')&&(search!='G')&&(search!='i')&&(search!='s')&&(search!='g'))
1462  {cout<<"config::Check : 1G search parameter non valid "<<search<<endl;exit(1);}
1463  }
1464  if(TString(analysis)=="2G") {
1465  char _search = std::tolower(search);
1466  if((_search!='r')&&(_search!='i')&&(_search!='p')&&
1467  (_search!='l')&&(_search!='s')&&(_search!='c')&&
1468  (_search!='g')&&(_search!='e')&&(_search!='b'))
1469  {cout<<"config::Check : 2G search parameter non valid "<<search<<endl;exit(1);}
1470  if(fabs(delta)>1)
1471  {cout<<"config::Check : 2G delta parameter non valid "<<delta<<" - must be [-1:1]"<<endl;exit(1);}
1472  if(fabs(gamma)>1)
1473  {cout<<"config::Check : 2G gamma parameter non valid "<<gamma<<" - must be [-1:1]"<<endl;exit(1);}
1474 
1475  if(fmod(precision,1)!=0) {
1476  {cout<<"config::Check : precision must be integer : "<<precision<<endl;exit(1);}
1477  }
1478  if(precision!=0 && healpix==0) {
1479  {cout<<"config::Check : precision is enabled only for healpix>0 : "<<precision<<endl;exit(1);}
1480  }
1481  if(precision!=0 && healpix>0) {
1482  int iprecision = int(fabs(precision));
1483  int csize = iprecision%65536; // get number of pixels threshold per level
1484  int order = (iprecision-csize)/65536; // get resampled order
1485  if(csize==0)
1486  {cout<<"config::Check : precision must be defined with csize>0 && order>0 : "<<csize<<" " <<order<<endl;exit(1);}
1487  if(order==0 || order>healpix)
1488  {cout<<"config::Check : precision must be defined with order<=healpix : "<<order<<endl;exit(1);}
1489  }
1490  }
1491 
1492  if(TString(analysis)=="2G") {
1493  int x=upTDF; // must be power of 2
1494  if(!((x != 0) && ((x & (~x + 1)) == x)) || upTDF<=0)
1495  {cout<<"config::Check : upTDF parameter non valid : must be power of 2 : "<<upTDF<<endl;exit(1);}
1496  }
1497 
1498  int x=inRate; // must be power of 2
1499  if(!((x != 0) && ((x & (~x + 1)) == x)) || inRate<=0)
1500  {cout<<"config::Check : inRate parameter non valid : must be power of 2 : "<<inRate<<endl;exit(1);}
1501 
1502  if(!(inRate>>levelR))
1503  {cout<<"config::Check : levelR parameter non valid "<<levelR<<endl;exit(1);}
1504 
1505  if((TString(analysis)=="1G")&&(levelF>levelD))
1506  {cout<<"config::Check : levelF must be <= levelD "<<levelF<<" " <<levelD<<endl;exit(1);}
1507 
1508  if(l_high<l_low)
1509  {cout<<"config::Check : l_low must be <= l_high "<<l_low<<" " <<l_high<<endl;exit(1);}
1510 
1511  if(l_low<0)
1512  {cout<<"config::Check : l_low must be >0 "<<l_low<<endl;exit(1);}
1513 
1514  if((TString(analysis)=="2G")&&(l_high-l_low+1>NRES_MAX)) {
1515  cout<<"config::Check : number of resolutions must le NRES_MAX="<<NRES_MAX<<endl;
1516  cout<<" l_low : "<<l_low <<endl;
1517  cout<<" l_high : "<<l_high<<endl;
1518  cout<<" l_high-l_low+1 : "<<l_high-l_low+1<<endl;
1519  exit(1);
1520  }
1521 
1522  if((TString(analysis)=="1G")&&(l_high>levelD))
1523  {cout<<"config::Check : l_high must be <= levelD "<<l_high<<" " <<levelD<<endl;exit(1);}
1524 
1525  if((TString(analysis)=="1G")&&((simulation<0)||(simulation>3)))
1526  {cout<<"config::Check : simulation parameter not valid [0:3] "<<simulation<<endl;exit(1);}
1527 
1528  if((TString(analysis)=="2G")&&((simulation<0)||(simulation>4)))
1529  {cout<<"config::Check : simulation parameter not valid [0:4] "<<simulation<<endl;exit(1);}
1530 
1531  if((simulation==0)&&(nfactor!=1))
1532  {cout<<"config::Check : nfactor must be 1 when simulation=0 "<<endl;exit(1);}
1533 
1534  if((simulation!=0)&&(lagSize!=1))
1535  {cout<<"config::Check : lagSize must be 1 when simulation!=0 "<<endl;exit(1);}
1536 
1537  if(segLen<whiteWindow)
1538  {cout<<"config::Check : segLen must be ge whiteWindow"<<endl;exit(1);}
1539 
1540  if((TString(analysis)=="1G")&&(dcPlugin || outPlugin))
1541  {cout<<"config::Check : dcPlugin ot outPlugin not enabled in 1G"<<endl;exit(1);}
1542 
1543  // segment parameters must be integers
1544  if(fmod(segLen,1)) {cout<<"config::Check : segLen must be integer"<<endl;exit(1);}
1545  if(fmod(segMLS,1)) {cout<<"config::Check : segMLS must be integer"<<endl;exit(1);}
1546  if(fmod(segTHR,1)) {cout<<"config::Check : segTHR must be integer"<<endl;exit(1);}
1547  if(fmod(segEdge,1)) {cout<<"config::Check : segEdge must be integer"<<endl;exit(1);}
1548  if(fmod(segOverlap,1)) {cout<<"config::Check : segOverlap must be integer"<<endl;exit(1);}
1549  // segment parameters must be positive
1550  if(segLen<=0) {cout<<"config::Check : segLen must be >0"<<endl;exit(1);}
1551  if(segMLS<=0) {cout<<"config::Check : segMLS must be >0"<<endl;exit(1);}
1552  // segment parameters must be greater than zero
1553  if(segTHR<0) {cout<<"config::Check : segTHR must be >=0"<<endl;exit(1);}
1554  if(segEdge<0) {cout<<"config::Check : segEdge must be >=0"<<endl;exit(1);}
1555  if(segOverlap<0) {cout<<"config::Check : segOverlap must be >=0"<<endl;exit(1);}
1556  // segment parameters consistent checks
1557  if(segMLS>segLen) {cout<<"config::Check : segMLS must be <= segLen"<<endl;exit(1);}
1558 
1559  if(simulation==0) {
1560  if(lagStep<=0) {
1561  cout<<"config::Check : when simulation=0 factors[0] lagStep must be >0"<<endl;
1562  exit(1);
1563  }
1564  if(lagMax>segMLS/lagStep) {
1565  cout<<"config::Check : when simulation=0 lagMax must be <= segMLS/lagStep"<<endl;
1566  exit(1);
1567  }
1568  }
1569 
1570  // nfactor must be > 0
1571  if(nfactor<=0) {
1572  cout<<"config::Check : nfactor must be > 0"<<endl;
1573  exit(1);
1574  }
1575  // if simulation==1 || simulation==2 factors must be > 0
1576  if(simulation==1 || simulation==2) {
1577  for(int i=0;i<nfactor;i++) if(factors[i]<=0) {
1578  cout<<"config::Check : factors["<<i<<"]="<<factors[i]<<endl;
1579  cout<<"config::Check : factors must be > 0"<<endl;
1580  exit(1);
1581  }
1582  }
1583 
1584  // jobfOptions=CWB_JOBF_SAVE_TRGFILE is not allowed in simulation mode
1585  if(simulation!=0) {
1587  cout<<"config::Check : jobfOptions=CWB_JOBF_SAVE_TRGFILE is not allowed in simulation mode!!!"<<endl;
1588  exit(1);
1589  }
1590  }
1591 
1592  // for simulation=4 factors are used as tags for the output root files
1593  if(simulation==4) {
1594  if(fmod(factors[0],1)) {
1595  cout<<"config::Check : when simulation=4 factors[0] is the offset and must be integer>0"<<endl;
1596  exit(1);
1597  }
1598  if(factors[0]<0) {
1599  cout<<"config::Check : when simulation=4 factors[0] is the offset and must be integer>=0"<<endl;
1600  exit(1);
1601  }
1602  bool fcheck=true;
1603  for(int i=1;i<nfactor;i++) {
1604  if(factors[i]!=factors[0]+i-1) fcheck=false;
1605  }
1606  if(!fcheck) {
1607  for(int i=1;i<nfactor;i++) {
1608  if(factors[i]!=0) {
1609  cout<<endl;
1610  cout<<"config::Check : when simulation=4 only factors[0] must be declared"<<endl;
1611  cout<<" factors are generated automatically by the pipeline"<<endl;
1612  cout<<endl;
1613  cout<<"factors[1]=offset;"<<endl;
1614  cout<<"factors[2]=offset+1;"<<endl;
1615  cout<<"..."<<endl;
1616  cout<<"factors[N]=offset+N-1;"<<endl;
1617  cout<<endl;
1618  cout<<"where offset=factors[0] which must be integer>0"<<endl;
1619  cout<<"where N=nfactor"<<endl;
1620  cout<<"if factors[0]==0 then factors[0] is set to 1"<<endl;
1621  cout<<endl;
1622  exit(1);
1623  }
1624  }
1625  }
1626  }
1627 
1629  cout<<"config::Check : error : mdc_shift.stopMDC must be > =mdc_shift.startMDC"<<endl;
1630  exit(1);
1631  }
1632 
1633 }
1634 
1635 //______________________________________________________________________________
1636 void
1637 CWB::config::Streamer(TBuffer &R__b) {
1638 
1639  // Stream an object of class CWB::config.
1640 
1641  //This works around a msvc bug and should be harmless on other platforms
1642  int size;
1643  typedef ::CWB::config thisClass;
1644  UInt_t R__s, R__c;
1645  if (R__b.IsReading()) {
1646  Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
1647  TNamed::Streamer(R__b);
1648  if(R__v > 1) R__b.ReadStaticArray((char*)analysis);
1649  if(R__v > 3) R__b >> online;
1650  R__b >> nIFO;
1651  R__b >> search;
1652  if(R__v > 13) R__b >> optim;
1653  R__b.ReadStaticArray((char*)ifo);
1654  R__b.ReadStaticArray((char*)refIFO);
1655  int R__i;
1656  for (R__i = 0; R__i < 9; R__i++)
1657  R__b.StreamObject(&(detParms[R__i]),typeid(detectorParams));
1658 // detParms[R__i].Streamer(R__b);
1659  if(R__v > 1) R__b >> inRate;
1660  R__b >> bpp;
1661  R__b >> Tgap;
1662  R__b >> Fgap;
1663  if(R__v > 11) R__b >> TFgap;
1664  R__b >> fLow;
1665  R__b >> fHigh;
1666  R__b >> fResample;
1667  R__b >> Acore;
1668  R__b >> Tlpr;
1669  R__b >> x2or;
1670  R__b >> netRHO;
1671  R__b >> netCC;
1672  R__b >> levelR;
1673  R__b >> levelF;
1674  R__b >> levelD;
1675  R__b >> l_low;
1676  R__b >> l_high;
1677  R__b >> segLen;
1678  R__b >> segMLS;
1679  R__b >> segTHR;
1680  R__b >> segEdge;
1681  if(R__v > 12) R__b >> segOverlap;
1682  R__b >> lagSize;
1683  R__b >> lagStep;
1684  R__b >> lagOff;
1685  R__b >> lagMax;
1686  if(R__v > 7) {
1687  R__b >> size; lagFile = size ? new char[size] : NULL;
1688  if(lagFile) R__b.ReadStaticArray((char*)lagFile);
1689  }
1690  R__b.ReadStaticArray((char*)lagMode);
1691  if(R__v > 7) {
1692  R__b >> size; lagSite = size ? new size_t[size] : NULL;
1693  if(lagSite) R__b.ReadStaticArray((size_t*)lagSite);
1694  }
1695  R__b.ReadStaticArray((double*)shift);
1696  R__b >> mlagStep;
1697  R__b >> slagSize;
1698  R__b >> slagMin;
1699  R__b >> slagMax;
1700  R__b >> slagOff;
1701  if(R__v > 7) {
1702  R__b >> size; slagSite = size ? new size_t[size] : NULL;
1703  if(slagSite) R__b.ReadStaticArray((size_t*)slagSite);
1704  }
1705  if(R__v > 7) {
1706  R__b >> size; slagFile = size ? new char[size] : NULL;
1707  if(slagFile) R__b.ReadStaticArray((char*)slagFile);
1708  }
1709  R__b >> whiteWindow;
1710  R__b >> whiteStride;
1711  R__b >> Psave;
1712  R__b.ReadStaticArray((double*)dcCal);
1713  R__b >> simulation;
1714  R__b >> iwindow;
1715  R__b >> nfactor;
1716  R__b.ReadStaticArray((double*)factors);
1717  R__b.ReadStaticArray((double*)dataShift);
1718  R__b.StreamObject(&(mdc_shift),typeid(mdcshift));
1719  if(R__v > 3) R__b.ReadStaticArray((char*)wdmXTalk);
1720  if(R__v > 3) R__b >> upTDF;
1721  if(R__v > 4) R__b >> TDSize;
1722  R__b.ReadStaticArray((char*)filter);
1723  if(R__v > 20) R__b >> pattern;
1724  if(R__v > 4) R__b >> BATCH;
1725  if(R__v > 4) R__b >> LOUD;
1726  if(R__v > 4) R__b >> subnet;
1727  if(R__v > 18) R__b >> subcut;
1728  R__b >> delta;
1729  R__b >> gamma;
1730  R__b >> eDisbalance;
1731  R__b >> EFEC;
1732  R__b >> mode;
1733  R__b >> angle;
1734  R__b >> Theta1;
1735  R__b >> Theta2;
1736  R__b >> Phi1;
1737  R__b >> Phi2;
1738  R__b >> mask;
1739  if(R__v > 1) R__b >> healpix;
1740  if((R__v < 7)||(R__v > 19)) R__b >> precision;
1741  if(R__v > 2) {
1742  void *ptr_jobfOptions = (void*)&jobfOptions;
1743  R__b >> *reinterpret_cast<Int_t*>(ptr_jobfOptions);
1744  }
1745  if(R__v > 6) {
1746  void *ptr_outfOptions = (void*)&outfOptions;
1747  R__b >> *reinterpret_cast<Int_t*>(ptr_outfOptions);
1748  }
1749  bool bool_dummy;
1750  if(R__v < 3) R__b >> bool_dummy; // previous was bool saveTemp
1751  R__b >> dumpHistory;
1752  R__b >> dump;
1753  R__b >> savemode;
1754  R__b >> cedDump;
1755  R__b >> cedRHO;
1756  R__b >> nSky;
1757  R__b.ReadStaticArray((char*)filter_dir);
1758  R__b.ReadStaticArray((char*)injectionList);
1759  R__b.ReadStaticArray((char*)skyMaskFile);
1760  R__b.ReadStaticArray((char*)skyMaskCCFile);
1761  R__b.ReadStaticArray((char*)channelNamesRaw);
1762  R__b.ReadStaticArray((char*)channelNamesMDC);
1763  R__b.ReadStaticArray((char*)work_dir);
1764  R__b.ReadStaticArray((char*)config_dir);
1765  R__b.ReadStaticArray((char*)input_dir);
1766  R__b.ReadStaticArray((char*)output_dir);
1767  R__b.ReadStaticArray((char*)merge_dir);
1768  R__b.ReadStaticArray((char*)condor_dir);
1769  R__b.ReadStaticArray((char*)report_dir);
1770  R__b.ReadStaticArray((char*)macro_dir);
1771  R__b.ReadStaticArray((char*)log_dir);
1772  R__b.ReadStaticArray((char*)data_dir);
1773  R__b.ReadStaticArray((char*)tmp_dir);
1774  R__b.ReadStaticArray((char*)ced_dir);
1775  R__b.ReadStaticArray((char*)pp_dir);
1776  R__b.ReadStaticArray((char*)dump_dir);
1777  R__b.ReadStaticArray((char*)www_dir);
1778  R__b.ReadStaticArray((char*)data_label);
1779  R__b.ReadStaticArray((char*)condor_log);
1780  if(R__v > 17) R__b.ReadStaticArray((char*)condor_tag);
1781  R__b.ReadStaticArray((char*)frFiles);
1782  if(R__v > 3) R__b >> frRetryTime;
1783  R__b >> nDQF;
1784  if(R__v > 23)
1785  for (R__i = 0; R__i < DQF_MAX; R__i++) R__b.StreamObject(&(DQF[R__i]),typeid(dqfile));
1786  else
1787  for (R__i = 0; R__i < 20; R__i++) R__b.StreamObject(&(DQF[R__i]),typeid(dqfile));
1788 // DQF[R__i].Streamer(R__b);
1789  R__b.ReadStaticArray((char*)nodedir);
1790  if(R__v > 22) R__b.ReadStaticArray((char*)cwb_config_env);
1791  if(R__v > 22) R__b.ReadStaticArray((char*)site_cluster_env);
1792  plugin.Streamer(R__b);
1793  configPlugin.Streamer(R__b);
1794  if(R__v > 21) R__b.ReadStaticArray((char*)parPlugin);
1795  R__b >> dataPlugin;
1796  R__b >> mdcPlugin;
1797  if(R__v > 5) R__b >> dcPlugin;
1798  if(R__v > 14) R__b >> cohPlugin;
1799  if(R__v > 15) R__b >> scPlugin;
1800  if(R__v > 9) R__b >> outPlugin;
1801  if(R__v > 21) R__b.ReadStaticArray((char*)comment);
1802  R__b.CheckByteCount(R__s, R__c, thisClass::IsA());
1803  } else {
1804  R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE);
1805  TNamed::Streamer(R__b);
1806  R__b.WriteArray(analysis, 8);
1807  R__b << online;
1808  R__b << nIFO;
1809  R__b << search;
1810  R__b << optim;
1811  R__b.WriteArray((char*)ifo, 72);
1812  R__b.WriteArray(refIFO, 4);
1813  int R__i;
1814  for (R__i = 0; R__i < 9; R__i++)
1815  R__b.StreamObject(&(detParms[R__i]),typeid(detectorParams));
1816 // detParms[R__i].Streamer(R__b);
1817  R__b << inRate;
1818  R__b << bpp;
1819  R__b << Tgap;
1820  R__b << Fgap;
1821  R__b << TFgap;
1822  R__b << fLow;
1823  R__b << fHigh;
1824  R__b << fResample;
1825  R__b << Acore;
1826  R__b << Tlpr;
1827  R__b << x2or;
1828  R__b << netRHO;
1829  R__b << netCC;
1830  R__b << levelR;
1831  R__b << levelF;
1832  R__b << levelD;
1833  R__b << l_low;
1834  R__b << l_high;
1835  R__b << segLen;
1836  R__b << segMLS;
1837  R__b << segTHR;
1838  R__b << segEdge;
1839  R__b << segOverlap;
1840  R__b << lagSize;
1841  R__b << lagStep;
1842  R__b << lagOff;
1843  R__b << lagMax;
1844  if(lagFile!=NULL) {size=strlen(lagFile)+1;R__b << size;R__b.WriteArray(lagFile, size);}
1845  else R__b << 0;
1846  R__b.WriteArray(lagMode, 2);
1847  if(lagSite!=NULL) {size=NIFO_MAX;R__b << size;R__b.WriteArray(lagSite, size);}
1848  else R__b << 0;
1849  R__b.WriteArray(shift, 9);
1850  R__b << mlagStep;
1851  R__b << slagSize;
1852  R__b << slagMin;
1853  R__b << slagMax;
1854  R__b << slagOff;
1855  if(slagSite!=NULL) {size=NIFO_MAX;R__b << size;R__b.WriteArray(slagSite, size);}
1856  else R__b << 0;
1857  if(slagFile!=NULL) {size=strlen(slagFile)+1;R__b << size;R__b.WriteArray(slagFile, size);}
1858  else R__b << 0;
1859  R__b << whiteWindow;
1860  R__b << whiteStride;
1861  R__b << Psave;
1862  R__b.WriteArray(dcCal, 9);
1863  R__b << simulation;
1864  R__b << iwindow;
1865  R__b << nfactor;
1866  R__b.WriteArray(factors, FACTORS_MAX);
1867  R__b.WriteArray(dataShift, 9);
1868  R__b.StreamObject(&(mdc_shift),typeid(mdcshift));
1869  R__b.WriteArray(wdmXTalk, 1024);
1870  R__b << upTDF;
1871  R__b << TDSize;
1872  R__b.WriteArray(filter, 1024);
1873  R__b << pattern;
1874  R__b << BATCH;
1875  R__b << LOUD;
1876  R__b << subnet;
1877  R__b << subcut;
1878  R__b << delta;
1879  R__b << gamma;
1880  R__b << eDisbalance;
1881  R__b << EFEC;
1882  R__b << mode;
1883  R__b << angle;
1884  R__b << Theta1;
1885  R__b << Theta2;
1886  R__b << Phi1;
1887  R__b << Phi2;
1888  R__b << mask;
1889  R__b << healpix;
1890  R__b << precision;
1891  R__b << jobfOptions;
1892  R__b << outfOptions;
1893  R__b << dumpHistory;
1894  R__b << dump;
1895  R__b << savemode;
1896  R__b << cedDump;
1897  R__b << cedRHO;
1898  R__b << nSky;
1899  R__b.WriteArray(filter_dir, 1024);
1900  R__b.WriteArray(injectionList, 1024);
1901  R__b.WriteArray(skyMaskFile, 1024);
1902  R__b.WriteArray(skyMaskCCFile, 1024);
1903  R__b.WriteArray((char*)channelNamesRaw, NIFO_MAX*50);
1904  R__b.WriteArray((char*)channelNamesMDC, NIFO_MAX*50);
1905  R__b.WriteArray(work_dir, 1024);
1906  R__b.WriteArray(config_dir, 1024);
1907  R__b.WriteArray(input_dir, 1024);
1908  R__b.WriteArray(output_dir, 1024);
1909  R__b.WriteArray(merge_dir, 1024);
1910  R__b.WriteArray(condor_dir, 1024);
1911  R__b.WriteArray(report_dir, 1024);
1912  R__b.WriteArray(macro_dir, 1024);
1913  R__b.WriteArray(log_dir, 1024);
1914  R__b.WriteArray(data_dir, 1024);
1915  R__b.WriteArray(tmp_dir, 1024);
1916  R__b.WriteArray(ced_dir, 1024);
1917  R__b.WriteArray(pp_dir, 1024);
1918  R__b.WriteArray(dump_dir, 1024);
1919  R__b.WriteArray(www_dir, 1024);
1920  R__b.WriteArray(data_label, 1024);
1921  R__b.WriteArray(condor_log, 1024);
1922  R__b.WriteArray(condor_tag, 1024);
1923  R__b.WriteArray((char*)frFiles, 2*NIFO_MAX*1024);
1924  R__b << frRetryTime;
1925  R__b << nDQF;
1926  for (R__i = 0; R__i < DQF_MAX; R__i++)
1927  R__b.StreamObject(&(DQF[R__i]),typeid(dqfile));
1928 // DQF[R__i].Streamer(R__b);
1929  R__b.WriteArray(nodedir, 1024);
1930  R__b.WriteArray(cwb_config_env, 1024);
1931  R__b.WriteArray(site_cluster_env, 1024);
1932  plugin.Streamer(R__b);
1933  configPlugin.Streamer(R__b);
1934  R__b.WriteArray(parPlugin, 1024);
1935  R__b << dataPlugin;
1936  R__b << mdcPlugin;
1937  R__b << dcPlugin;
1938  R__b << cohPlugin;
1939  R__b << scPlugin;
1940  R__b << outPlugin;
1941  R__b.WriteArray(comment, 1024);
1942  R__b.SetByteCount(R__c, kTRUE);
1943  }
1944 }
1945 
char skyMaskFile[1024]
char wdmXTalk[1024]
double segMLS
Definition: test_config1.C:47
int slagSize
Definition: test_config1.C:65
double startMDC
Definition: Toolbox.hh:88
bool online
char site_cluster_env[1024]
double lagStep
Definition: test_config1.C:53
void Export(TString fname="")
Definition: config.cc:388
char filter_dir[1024]
void Init()
Definition: ChirpMass.C:280
size_t * slagSite
Definition: test_config1.C:69
int slagOff
Definition: test_config1.C:68
char cmdline[128]
Definition: config.cc:6
void Print(Option_t *option="")
Definition: config.cc:719
mdcshift mdc_shift
Definition: test_config1.C:93
size_t TDSize
fprintf(stdout,"start=%f duration=%f rate=%f\n", x.start(), x.size()/x.rate(), x.rate())
char channelNamesMDC[NIFO_MAX][50]
Definition: ced.hh:24
cout<< cfg-> nodedir<< endl;cfg-> Import("../../../cwb/macros/cwb_inet.C")
double fHigh
double delta
void View()
Definition: config.cc:1278
char name[32]
Definition: detector.hh:32
CWB_OUTF_OPTIONS outfOptions
char parPlugin[1024]
CWB_JOBF_OPTIONS
Definition: config.hh:37
char channelNamesRaw[NIFO_MAX][50]
par[0] name
size_t * lagSite
Definition: test_config1.C:58
int n
Definition: cwb_net.C:10
double angle
bool scPlugin
TString("c")
char comment[1024]
char www_dir[512]
Definition: test_config1.C:157
double stopMDC
Definition: Toolbox.hh:89
const int DQF_MAX
Definition: config.hh:69
char skyMaskCCFile[1024]
double x2or
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
void Check()
Definition: config.cc:1393
double bpp
Definition: test_config1.C:22
bool optim
char frFiles[NIFO_MAX+1][256]
Definition: test_config1.C:166
int slagMax
Definition: test_config1.C:67
void Init()
Definition: config.cc:173
CWB_JOBF_OPTIONS jobfOptions
size_t lagOff
Definition: test_config1.C:54
double Theta2
Long_t size
char refIFO[4]
Definition: test_config1.C:14
char macro_dir[512]
Definition: test_config1.C:150
int m
Definition: cwb_net.C:10
double segEdge
Definition: test_config1.C:49
char report_dir[512]
Definition: test_config1.C:149
i drho i
int l_low
Definition: test_config1.C:40
void Import(TString umacro="")
Definition: config.cc:334
TList * list
search
double whiteWindow
Definition: test_config1.C:72
CWB_OUTF_OPTIONS
Definition: config.hh:61
double netCC
Definition: test_config1.C:33
char ifo[NIFO_MAX][8]
double Tgap
Definition: test_config1.C:23
double Theta1
double fResample
Definition: test_config1.C:27
char ced_dir[512]
Definition: test_config1.C:154
char injectionList[1024]
nDQF
Definition: cwb_eced.C:92
int Psave
Definition: test_config1.C:75
double Acore
Definition: test_config1.C:28
double segTHR
Definition: test_config1.C:48
size_t mode
#define nIFO
#define SETVAR(MODE, VAR, TYPE, SIZE1, SIZE2)
Definition: config.cc:46
bool mdcPlugin
char data_label[512]
Definition: test_config1.C:160
#define MODE
char input_dir[512]
Definition: test_config1.C:145
void DumpPlugin(const char *filename="")
Definition: config.cc:1191
MDC Print()
int BATCH
const int FACTORS_MAX
Definition: config.hh:68
TGlobal * global
Definition: config.cc:5
static char * readFile(TString ifName)
Definition: Toolbox.cc:2815
TString uname
int levelD
char tmp_dir[512]
Definition: test_config1.C:153
char lagMode[2]
Definition: test_config1.C:57
int pattern
int Compare(CWB::config config)
Definition: config.cc:1247
i() int(T_cor *100))
size_t upTDF
void SetVar(bool MODE)
Definition: config.cc:402
const int NIFO_MAX
Definition: wat.hh:4
dqfile DQF[12]
Definition: test_config1.C:171
double dataShift[NIFO_MAX]
Definition: test_config1.C:87
bool EFEC
int mlagStep
char fname[1024]
segLen
Definition: cwb_eced.C:7
double precision
bool dumpHistory
char merge_dir[512]
Definition: test_config1.C:147
double cedRHO
bool eDisbalance
int k
char data_dir[512]
Definition: test_config1.C:152
double offset
Definition: Toolbox.hh:90
UserGroup_t * uinfo
Definition: cwb_frdisplay.C:73
char log_dir[512]
Definition: test_config1.C:151
const int NRES_MAX
Definition: wat.hh:5
char config_dir[512]
Definition: test_config1.C:144
double Phi1
bool outPlugin
double factors[100]
Definition: test_config1.C:84
#define EXPORT(TYPE, VAR, CMD)
Definition: config.cc:74
double dcCal[NIFO_MAX]
Definition: test_config1.C:78
char filter[1024]
bool cohPlugin
double Fgap
Definition: test_config1.C:24
double fLow
int LOUD
double whiteStride
Definition: test_config1.C:73
double fabs(const Complex &x)
Definition: numpy.cc:37
char dump_dir[512]
Definition: test_config1.C:156
string file
Definition: cwb_online.py:385
char pp_dir[512]
Definition: test_config1.C:155
void DumpConfig(const char *filename="", Option_t *option="")
Definition: config.cc:1317
char * lagFile
Definition: test_config1.C:56
void DumpConfigPlugin(const char *filename="")
Definition: config.cc:1219
strcpy(RunLabel, RUN_LABEL)
virtual void Browse(TBrowser *b)
Definition: config.cc:163
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
nfactor[0]
Definition: cwb_eced.C:10
double mask
double netRHO
Definition: test_config1.C:32
char condor_log[512]
Definition: test_config1.C:163
TMacro plugin
bool dump
bool savemode
int l_high
Definition: test_config1.C:41
slagFile
Definition: cwb_tune_slag.C:7
char nodedir[1024]
Definition: test_config1.C:187
double Phi2
char condor_dir[512]
Definition: test_config1.C:148
int cat
char work_dir[512]
Definition: test_config1.C:143
TMacro configPlugin
long nSky
int levelR
Definition: test_config1.C:37
int slagMin
Definition: test_config1.C:66
int rnID
simulation
Definition: cwb_eced.C:9
fclose(ftrig)
double Tlpr
TString config
detectorParams detParms[4]
double shift[NIFO_MAX]
char fName[256]
int check
char output_dir[512]
Definition: test_config1.C:146
bool dcPlugin
bool dataPlugin
size_t lagMax
Definition: test_config1.C:55
bool cedDump
int levelF
void SetSingleDetectorMode()
Definition: config.cc:1334
TString ifos[60]
exit(0)
size_t healpix
size_t lagSize
Definition: test_config1.C:52