4 #define DIM "width=\"496\" height=\"440\""
5 #define SHBOX "rel=\"shadowbox[gallery]"
11 TB.
checkFile(gSystem->Getenv(
"CWB_ROOTLOGON_FILE"));
12 TB.
checkFile(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
13 TB.
checkFile(gSystem->Getenv(
"CWB_UPARAMETERS_FILE"));
14 TB.
checkFile(gSystem->Getenv(
"CWB_PPARAMETERS_FILE"));
15 TB.
checkFile(gSystem->Getenv(
"CWB_UPPARAMETERS_FILE"));
16 TB.
checkFile(gSystem->Getenv(
"CWB_EPPARAMETERS_FILE"));
21 if(gSystem->Getenv(
"CWB_MERGE_LABEL")==NULL) {
22 cout <<
"Error : environment CWB_MERGE_LABEL is not defined!!!" << endl;
exit(1);
24 cwb_merge_label=
TString(gSystem->Getenv(
"CWB_MERGE_LABEL"));
27 cwb_merge_label=((TObjString*)token->At(0))->
GetString();
29 if(cwb_merge_label[0]!=
'M') {
30 cout <<
"Error : label " << cwb_merge_label.Data() <<
" has bad format (M#)" << endl;
exit(1);
34 if(!lcheck.IsDigit()) {
35 cout <<
"Error : label " << cwb_merge_label.Data() <<
" has bad format (M#)" << endl;
exit(1);
37 iversion=lcheck.Atoi();
41 cout <<
"Number of jobs in the merged lists : " << merge_jobList.size() << endl;
50 sprintf(condor_dag_file,
"%s/%s%s.dag",full_condor_dir,
data_label,cwb_condor_tag.Data());
52 int estat = gSystem->GetPathInfo(condor_dag_file,&
id,&size,&
flags,&mt);
58 cout <<
"Number of jobs/factors in the condor lists : " << condor_jobList.size() <<
"/" <<
nfactor << endl;
62 if(merge_jobList.size()<
nfactor*condor_jobList.size()) {
63 sprintf(merge_job_list_str,
"<font color=\"red\">%d</font>",merge_jobList.size());
68 if(condor_jobList.size()>0) {
70 sprintf(condor_job_list_str,
"(%d*%d) - <font color=\"blue\">%2.1f\%</font>",
71 nfactor,condor_jobList.size(),100.*merge_jobList.size()/(
nfactor*condor_jobList.size()));
73 sprintf(condor_job_list_str,
"%d - <font color=\"blue\">%2.1f\%</font>",
74 condor_jobList.size(),100.*merge_jobList.size()/condor_jobList.size());
80 if(gSystem->Getenv(
"HOME_WAT")==NULL) {
81 cout <<
"Error : environment HOME_WAT is not defined!!!" << endl;
exit(1);
83 home_wat=
TString(gSystem->Getenv(
"HOME_WAT"));
86 if(gSystem->Getenv(
"CWB_NETC_FILE")==NULL) {
87 cout <<
"Error : environment CWB_NETC_FILE is not defined!!!" << endl;
exit(1);
89 cwb_netc_file=
TString(gSystem->Getenv(
"CWB_NETC_FILE"));
92 if(gSystem->Getenv(
"CWB_PARAMETERS_FILE")==NULL) {
93 cout <<
"Error : environment CWB_PARAMETERS_FILE is not defined!!!" << endl;
exit(1);
95 cwb_parameters_file=
TString(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
98 if(gSystem->Getenv(
"CWB_UPARAMETERS_FILE")==NULL) {
99 cout <<
"Error : environment CWB_UPARAMETERS_FILE is not defined!!!" << endl;
exit(1);
101 cwb_uparameters_file=
TString(gSystem->Getenv(
"CWB_UPARAMETERS_FILE"));
104 if(gSystem->Getenv(
"CWB_PPARAMETERS_FILE")==NULL) {
105 cout <<
"Error : environment CWB_PPARAMETERS_FILE is not defined!!!" << endl;
exit(1);
107 cwb_pparameters_file=
TString(gSystem->Getenv(
"CWB_PPARAMETERS_FILE"));
110 if(gSystem->Getenv(
"CWB_UPPARAMETERS_FILE")==NULL) {
111 cout <<
"Error : environment CWB_UPPARAMETERS_FILE is not defined!!!" << endl;
exit(1);
113 cwb_upparameters_file=
TString(gSystem->Getenv(
"CWB_UPPARAMETERS_FILE"));
118 html.SetEtcDir(gSystem->ExpandPathName(
"$HOME_WAT/html/etc/html"));
119 html.SetProductName(
"CWB");
120 html.SetInputDir(
"config:macro:condor:$CWB_TOOLBOX:$CWB_SKYPLOT:$CWB_HISTORY:$HOME_CWB:$CWB_STFT:$CWB_BICO:$HOME_WAT/wat:$ROOTSYS/include");
129 sprintf(cmd,
"cp %s/html/etc/html/ROOT.css %s/",gSystem->ExpandPathName(
"$HOME_WAT"),
pp_dir);
131 sprintf(cmd,
"cp %s/html/etc/html/ROOT.js %s/",gSystem->ExpandPathName(
"$HOME_WAT"),
pp_dir);
135 sprintf(cmd,
"cp %s/tools/config.csh %s/config.csh",home_wat.Data(),
odir);
143 html.Convert(cwb_parameters_file.Data(),cwb_parameters_file.Data(),
odir);
148 html.Convert(cwb_uparameters_file.Data(),cwb_uparameters_file.Data(),
odir);
153 html.Convert(cwb_pparameters_file.Data(),cwb_pparameters_file.Data(),
odir);
158 html.Convert(cwb_upparameters_file.Data(),cwb_upparameters_file.Data(),
odir);
165 UserGroup_t*
uinfo = gSystem->GetUserInfo();
172 char pluginName[256]=
"";
173 sprintf(pluginName,
"%s/CWB_Plugin.C",tdir);
174 plugin.SaveSource(pluginName);
175 html.Convert(pluginName,
"CWB_Plugin.C",odir);
179 char configPluginName[256]=
"";
180 sprintf(configPluginName,
"%s/CWB_configPlugin.C",tdir);
182 html.Convert(configPluginName,
"CWB_configPlugin.C",odir);
193 if (!ofile.good()) {cout <<
"Error Opening File : " << fileout << endl;
exit(1);}
228 if(
MDC.GetInspiralOption(
"--gps-start-time")!=
""){GpsStartTime = (
int)
MDC.GetInspiralOption(
"--gps-start-time").Atoi();}
229 if(
MDC.GetInspiralOption(
"--gps-end-time")!=
""){GpsEndTime = (
int)
MDC.GetInspiralOption(
"--gps-end-time").Atoi();}
230 if(
MDC.GetInspiralOption(
"--waveform")!=
""){waveform =
MDC.GetInspiralOption(
"--waveform");}
254 for(
int i=0;
i<epsList.size();
i++) {
256 oFile.ReplaceAll(
".eps",
".png");
259 sprintf(cmd,
"convert -density 664x516 %s -resize 664x516 %s",epsList[
i].Data(),oFile.Data());
263 cout<<
"Removing eps files...."<<endl;
264 sprintf(cmd,
"rm %s",epsList[
i].Data());
276 cout <<
"Creating html page: " << fileout << endl;
279 ofile <<
"<html>" << endl;
282 ofile <<
"<link rel=\"stylesheet\" type=\"text/css\" href=\"/~waveburst/LSC/waveburst/shadowbox-3.0.3/shadowbox.css\">" << endl;
283 ofile <<
"<script type=\"text/javascript\" src=\"/~waveburst/LSC/waveburst/shadowbox-3.0.3/shadowbox.js\"></script>" << endl;
284 ofile <<
"<script type=\"text/javascript\">" << endl;
285 ofile <<
"Shadowbox.init();" << endl;
286 ofile <<
"</script>" << endl;
289 ofile <<
"<body>" << endl;
292 ofile <<
"<div id=\"container\" style=\"width:1560px\" \" height:100px\">" << endl;
293 ofile <<
"<div id=\"header\" style=\"background-color:#FFA500;\">" << endl;
294 ofile <<
"<h1 style=\"margin-bottom:9;\"><p style=\"text-align: center;\">SEARCH FOR INTERMEDIATE MASS BLACK HOLE BINARIES</p></h1></div>" << endl;
295 ofile <<
"</div>" << endl;
297 ofile <<
" " << endl;
300 ofile <<
"<table width=\"2084px\">" << endl;
301 ofile <<
"<tr>" << endl;
302 ofile <<
"<td>" << endl;
303 ofile <<
"<div id=\"nmenu\">" << endl;
304 ofile <<
"<b>" << endl;
305 ofile <<
"<ul>" << endl;
306 ofile <<
"<td><a target=\"_parent\" id=\"logo\" href=\"http:\/\/www.virgo.lnl.infn.it/Wiki/index.php/Main_Page\"><img style=\"border: none;\" src=\"/~waveburst/LSC/waveburst/logo/cwb_logo_ext_3d\" width=\"300px\"></a></td>" << endl;
307 ofile <<
"</td>" << endl;
308 ofile <<
"<td align=\"left\">" << endl;
309 ofile <<
"<div id=\"nmenu\">" << endl;
310 ofile <<
"<b>" << endl;
311 ofile <<
"<ul>" << endl;
320 ofile <<
"<li> <h1><font color=\"red\">Network: " << title <<
"</font> </h3>" << endl;
321 ofile <<
"<li> <h3>Job Status : "<< merge_job_list_str <<
"/"<<condor_job_list_str <<
"</h3>" << endl;
322 ofile <<
"<li> <h3>Data set: " << RUN_LABEL <<
" [" << GpsStartTime <<
" - " << GpsEndTime <<
"] s </h3>" << endl;
323 ofile <<
"<li> <h3>Frequency band: [" <<
ifLow <<
"-"<<
ifHigh <<
"] Hz</h3>" << endl;
324 ofile <<
"<li> <h3>Injected waveforms: <font color=\"blue\">" << waveform.Data() <<
"</font> (LAL version: " <<
MDC.GetLALVersion() <<
")</h3>" << endl;
325 ofile <<
"<li> <h3>Search " <<
search <<
" - bpp=" <<
bpp <<
" (cWB version: " <<
watversion(
'r') <<
")</h3>" << endl;
328 ofile <<
"<li> <h3><font color=\"red\">Thresholds: ρ = " <<
T_cut <<
", netcc = " <<
T_cor <<
", neted/ecor = " <<
T_vED <<
" </font> (Dt_inj [" << 2*
T_win <<
",-" <<
T_win <<
"] s)</h3>" << endl;
330 ofile <<
"<li> <h3><a href=\"" << HTML_DATA_DIR <<
"/user_parameters.C.html\">cWB user parameters</a></h3>" << endl;
331 ofile <<
"<li> <h3><a href=\"" << HTML_DATA_DIR <<
"/CWB_configPlugin.C.html\">Plugin config (LALSimulation parameters)</a></h3>" << endl;
332 ofile <<
"<li> <h3><a href=\"" << PP_DATA_DIR <<
"\">All figures</a> , <a href=\"" << HTML_DATA_DIR <<
"\">All configuration files </a></h3>" << endl;
342 ofile <<
"</ul>" << endl;
343 ofile <<
"</b>" << endl;
344 ofile <<
"</div>" << endl;
345 ofile <<
"</td>" << endl;
346 ofile <<
"</tr>" << endl;
347 ofile <<
"</table>" << endl;
350 ofile <<
"<hr>" << endl;
351 ofile <<
"<hr>" << endl;
358 ofile <<
"<div style=\"color:#0000FF\">" << endl;
359 ofile <<
"<h2>MAIN PLOTS </h2>" << endl;
367 ofile <<
"<a href=\"data/Effective_radius.png\"" <<
SHBOX <<
"\"><img src=\"data/Effective_radius.png\" " <<
DIM <<
" /></a>" << endl;
369 ofile <<
"<a href=\"data/Productivity.png\"" <<
SHBOX <<
"\"><img src=\"data/Productivity.png\" " <<
DIM <<
" /></a>" << endl;
370 ofile <<
"<a href=\"data/FAD.png\"" <<
SHBOX <<
"\"><img src=\"data/FAD.png\" " <<
DIM <<
" /></a>" << endl;
371 ofile <<
"<a href=\"data/MU.png\"" <<
SHBOX <<
"\"><img src=\"data/MU.png\" " <<
DIM <<
" /></a>" << endl;
374 ofile <<
"</div>" << endl;
377 ofile <<
"<hr>" << endl;
378 ofile <<
"<hr>" << endl;
386 ofile <<
"<div style=\"color:#0000FF\">" << endl;
387 ofile <<
"<h2>DISTANCE PLOTS</h2>" << endl;
388 ofile <<
"<a href=\"data/Distance_vs_total_mass.png\"" <<
SHBOX <<
"\"><img src=\"data/Distance_vs_total_mass.png\" " <<
DIM <<
" /></a>" << endl;
389 ofile <<
"<a href=\"data/Distance_vs_chirp_mass.png\"" <<
SHBOX <<
"\"><img src=\"data/Distance_vs_chirp_mass.png\" " <<
DIM <<
" /></a>" << endl;
390 ofile <<
"<a href=\"data/Distance_vs_mass_ratio.png\"" <<
SHBOX <<
"\"><img src=\"data/Distance_vs_mass_ratio.png\" " <<
DIM <<
" /></a>" << endl;
393 ofile <<
"<a href=\"data/Distance_vs_spin.png\"" <<
SHBOX <<
"\"><img src=\"data/Distance_vs_spin.png\" " <<
DIM <<
" /></a>" << endl;
395 ofile <<
"</div>" << endl;
398 ofile <<
"<hr>" << endl;
399 ofile <<
"<hr>" << endl;
407 ofile <<
"<div style=\"color:#0000FF\">" << endl;
408 ofile <<
"<h2>SAMPLED PARAMETERS SPACE</h2>" << endl;
409 ofile <<
"<a href=\"data/Injected_distances_distribution.png\"" <<
SHBOX <<
"\"><img src=\"data/Injected_distances_distribution.png\" " <<
DIM <<
" /></a>" << endl;
410 ofile <<
"<a href=\"data/Total_mass_distribution.png\"" <<
SHBOX <<
"\"><img src=\"data/Total_mass_distribution.png\" " <<
DIM <<
" /></a>" << endl;
411 ofile <<
"<a href=\"data/Chirp_mass_distribution.png\"" <<
SHBOX <<
"\"><img src=\"data/Chirp_mass_distribution.png\" " <<
DIM <<
" /></a>" << endl;
412 ofile <<
"<a href=\"data/Mass_ratio_distribution.png\"" <<
SHBOX <<
"\"><img src=\"data/Mass_ratio_distribution.png\" " <<
DIM <<
" /></a>" << endl;
414 ofile <<
"<a href=\"data/Chi_distribution.png\"" <<
SHBOX <<
"\"><img src=\"data/Chi_distribution.png\" " <<
DIM <<
" /></a>" << endl;
416 ofile <<
"</div>" << endl;
419 ofile <<
"<hr>" << endl;
420 ofile <<
"<hr>" << endl;
428 ofile <<
"<div style=\"color:#0000FF\">" << endl;
429 ofile <<
"<h2>DETECTION EFFICIENCY (MASS 1 vs MASS 2)</h2>" << endl;
433 ofile <<
"<a href=\"data/Efficiency_mass1_mass2_chi_-0.800000_0.800000.png\"" <<
SHBOX <<
"\"><img src=\"data/Efficiency_mass1_mass2_chi_-0.800000_0.800000.png\" " <<
DIM <<
" /></a>" << endl;
434 ofile <<
"<a href=\"data/Efficiency_chirp_mass_chi.png\"" <<
SHBOX <<
"\"><img src=\"data/Efficiency_chirp_mass_chi.png\" " <<
DIM <<
" /></a>" << endl;
436 ofile <<
"<a href=\"data/Efficiency_mass1_mass2.png\"" <<
SHBOX <<
"\"><img src=\"data/Efficiency_mass1_mass2.png\" " <<
DIM <<
" /></a>" << endl;
440 ofile <<
"<hr>" << endl;
441 ofile <<
"<hr>" << endl;
449 ofile <<
"</body>" << endl;
450 ofile <<
"</html>" << endl;
TString cwb_upparameters_file
TString cwb_pparameters_file
char * watversion(char c='s')
vector< int > merge_jobList
char condor_job_list_str[64]
TString cwb_parameters_file
char condor_dag_file[256]
strcpy(cfg->tmp_dir,"tmp")
char merge_job_list_str[64]
TString cwb_uparameters_file
vector< TString > epsList
vector< int > condor_jobList
sprintf(odir,"%s/html", pp_dir)
detectorParams detParms[4]
char full_condor_dir[512]