Logo coherent WaveBurst  
Library Reference Guide
Logo
gwosc_plugin_config.C
Go to the documentation of this file.
1 #include "CWB_Plugin.h"
2 
4 
5  // Config Plugin used to generate injections from posterior samples XML files
6  // used by the cwb_gwosc command
7 
8  CWB::mdc* MDC;
10 
11  CWB::config** cfg;
13 
14  int* gIFACTOR;
15  CWB_PLUGIN_IMPORT(int*,gIFACTOR);
16 
17  char symlink[1024];
18  sprintf(symlink,"config/injections.xml");
19  TString xmlFile = CWB::Toolbox::getFileName(symlink); // get path from symbolic link
20  if(xmlFile!="") { // it is a symbolic link
21  if(xmlFile[0]=='.') { // if path is relative, start with '../' then '../' is removed
22  xmlFile = xmlFile(xmlFile.Index('/')+1, xmlFile.Sizeof()-xmlFile.Index('/')-2);
23  }
24  cout << endl;
25  cout << "---------> CWB_PluginConfig: injections.xml = " << xmlFile << endl;
26  } else {
27  xmlFile=symlink; // not a symbolic link
28  }
29 
31  inspOptions+= "--dir "+TString((*cfg)->nodedir)+" ";
32  inspOptions+= "--xml "+xmlFile;
33  MDC->SetInspiral("PE",inspOptions);
34 // MDC->SetInspiralCLB(clbFile);
35 }
36 
CWB::config * cfg
TString("c")
TString xmlFile
Definition: Posterior2XML.C:34
CWB::mdc * MDC
void CWB_PluginConfig()
Definition: mdc.hh:248
TString inspOptions
int gIFACTOR
#define CWB_PLUGIN_IMPORT(TYPE, VAR)
Definition: CWB_Plugin.h:6
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
static TString getFileName(FILE *fp)
Definition: Toolbox.cc:6780