coherent WaveBurst
Library Reference Guide
home
cWB_docker
git
cWB
library
tools
cwb
gwosc
gwosc_plugin_config.C
Go to the documentation of this file.
1
#include "
CWB_Plugin.h
"
2
3
void
CWB_PluginConfig
() {
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
;
9
CWB_PLUGIN_IMPORT
(
CWB::mdc
*,MDC);
10
11
CWB::config
**
cfg
;
12
CWB_PLUGIN_IMPORT
(
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
30
TString
inspOptions
=
""
;
31
inspOptions+=
"--dir "
+
TString
((*cfg)->nodedir)+
" "
;
32
inspOptions+=
"--xml "
+
xmlFile
;
33
MDC->SetInspiral(
"PE"
,inspOptions);
34
// MDC->SetInspiralCLB(clbFile);
35
}
36
cfg
CWB::config * cfg
Definition:
TestCWB_Plugin.C:23
TString
TString("c")
Definition:
cwb_report_skymap.C:129
xmlFile
TString xmlFile
Definition:
Posterior2XML.C:34
MDC
CWB::mdc * MDC
Definition:
CWB_Plugin_HEN_SIM_Config.C:84
CWB_PluginConfig
void CWB_PluginConfig()
Definition:
gwosc_plugin_config.C:3
CWB::config
Definition:
config.hh:91
CWB_Plugin.h
CWB::mdc
Definition:
mdc.hh:248
inspOptions
TString inspOptions
Definition:
CWB_Plugin_InjectCBC_Config.C:12
gIFACTOR
int gIFACTOR
Definition:
cwb_mkhtml_cbc.C:138
CWB_PLUGIN_IMPORT
#define CWB_PLUGIN_IMPORT(TYPE, VAR)
Definition:
CWB_Plugin.h:6
sprintf
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
CWB::Toolbox::getFileName
static TString getFileName(FILE *fp)
Definition:
Toolbox.cc:6780