Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
cwb_mkhtml_prod.C File Reference
#include "wat.hh"
Include dependency graph for cwb_mkhtml_prod.C:

Macros

#define NEPS   28
 
#define NEPS2   19
 

Functions

TString cc3 (c3)
 
cout<< fileliv<< endl;int
countlag=0;double OLIVETIME=GetLiveTime(fileliv,
0, 0, countlag);double
LIVETIME=GetLiveTime(fileliv,-1,-1,
countlag);LIVETIME-=OLIVETIME;countlag-=1;cout.precision(14);cout
<< OLIVETIME<< " "<< LIVETIME
<< endl;ifstream bkgin;bkgin.open(html_body_prod_template,
ios::in);if(!bkgin.good()){cout
<< "Error Opening File : "
<< html_body_prod_template
<< endl;exit(1);}char exec[1024];char
istring[1024];while(1){bkgin.getline(istring,
256);if(!bkgin.good()) break;TString
ostringa(istring);if(bcat3||bhveto){ostringa.ReplaceAll("
<!--VETO","");ostringa.ReplaceAll("VETO-->
","");}else{ostringa.ReplaceAll("
<!--NOVETO","");ostringa.ReplaceAll("VETONO-->
","");}if(TString(analysis)=="1G"){ostringa.ReplaceAll("<!--RHO_PF","");ostringa.ReplaceAll("RHO_PF-->","");}else{ostringa.ReplaceAll("<!--RHO_SUBNET","");ostringa.ReplaceAll("RHO_SUBNET-->","");}if(pp_rho_vs_rate_no_multiplicity){ostringa.ReplaceAll("<!--MULTI","");ostringa.ReplaceAll("MULTI-->","");}ostringa.ReplaceAll("FLOW", sfLow);ostringa.ReplaceAll("FHIGH", sfHigh);ostringa.ReplaceAll("PP_RHO_MIN", spp_rho_min);ostringa.ReplaceAll("PP_RHO_MAX", spp_rho_max);ostringa.ReplaceAll("PP_DATA_DIR", PP_DATA_DIR);ostringa.ReplaceAll("NETCC", NetCC);ostringa.ReplaceAll("RHO", Rho);ostringa.ReplaceAll("RH_OUT", RhOut);ostringa.ReplaceAll("RH_ACOR", RhAcor);ostringa.ReplaceAll("svED", svED);TString Rate="rate = "+RATEBACKGROUND;ostringa.ReplaceAll("RATEBACKGROUND", Rate);ostringa.ReplaceAll("SUBTITLE", subtitle);ostringa.ReplaceAll("TITLE", title);char ltime[1024];sprintf(ltime,"zero lag : <font color=\"red\"> %.2f sec = %.2f days</font>", OLIVETIME, OLIVETIME/86400.);ostringa.ReplaceAll("LIVETIME", ltime);sprintf(ltime,"non-zero lags : <font color=\"red\"> %i lags - %.2f sec = %.2f days = %.1f years </fonts>", countlag, LIVETIME, LIVETIME/(float) 86400., LIVETIME/86400./365.);ostringa.ReplaceAll("LIVETIM2", ltime);ostringa.ReplaceAll("PLOT_LIST", pp_data_dir);if(cwb_doc_url!=""){ostringa.ReplaceAll("<!--CWB_DOC_URL","");ostringa.ReplaceAll("CWB_DOC_URL-->","");ostringa.ReplaceAll("XCWB_DOC_URL", cwb_doc_url.Data());}ostringa.ReplaceAll("</html>","");out<< ostringa.Data()<< endl;}bkgin.close();char _ifo[NIFO_MAX][8];for(int n=0;n< nIFO;n++){if(strlen(ifo[n])>0) strcpy(_ifo[n], ifo[n]);else strcpy(_ifo[n], detParms[n].name);}char file_ev[1024];sprintf(file_ev,"%s/events.txt", PP_DATA_PATH.Data());ifstream for_ev(file_ev);char file_header[1024];sprintf(file_header,"%s/events_header.txt", PP_DATA_PATH.Data());ofstream for_header(file_header);char file_notsorted[1024];sprintf(file_notsorted,"%s/events_notsorted.txt", PP_DATA_PATH.Data());ofstream for_notsorted(file_notsorted);char in_ev[100000];while(1){for_ev.getline(in_ev, 100000);if(!for_ev.good()) break;TString sin_ev(in_ev);if(sin_ev.Contains("#")) for_header<< sin_ev.Data()<< endl;else for_notsorted<< sin_ev.Data()<< endl;}for_header.close();for_notsorted.close();char file_sorted[1024];sprintf(file_sorted,"%s/events_sorted.txt", PP_DATA_PATH.Data());sprintf(exec,"sort -g -r --key=3 %s > %s", file_notsorted, file_sorted);gSystem-> 
Exec (exec)
 
ifstream f_ev (file_sorted)
 
 for ()
 
 if (nIFO==1)
 
 if (gSystem->Getenv("CWB_DOC_URL")!=NULL)
 
 if (!f_ev.good()) break
 
 if (ppm.Contains("+"))
 
TString ppm (pm)
 
 sprintf (netdir,"%s/%s", pp_dir, pp_data_dir)
 
 sprintf (netdir,"%s", pp_data_dir)
 
 sprintf (fileliv,"%s/live.txt", PP_DATA_PATH.Data())
 
 sprintf (exec,"cat %s %s > %s/EVENTS.txt", file_header, file_sorted, PP_DATA_PATH.Data())
 
 sprintf (file_notsorted,"%s/events_notsorted.txt", PP_DATA_PATH.Data())
 

Variables

bool bcat2 = false
 
bool bcat3 = false
 
bool bhveto = false
 
char c3 [2]
 
TString cwb_doc_url =""
 
int ecount =0
 
 else
 
vector< TStringepsList = CWB::Toolbox::getFileListFromDir(PP_DATA_PATH, ".eps")
 
char fileliv [1024]
 
float hrss0
 
float hrss1
 
float hrss2
 
float hrss3
 
float iacor
 
int iband
 
float icc
 
float icc2
 
float icc3
 
float icHH
 
float idur
 
int ifreq
 
float ilag
 
float ilik
 
float ipen
 
int irate
 
float irho
 
int irun
 
int isize
 
float islag
 
float ivED
 
float ivHH
 
char os [1024]
 
float phi
 
char pm [2]
 
TString PP_DATA_DIR =netdir
 
TString PP_DATA_PATH =netdir
 
float psi
 
TString RATEBACKGROUND
 
bool singleDetector =false
 
float SNR0
 
float SNR1
 
float SNR2
 
float SNR3
 
float theta
 
double time0
 
double time1
 
double time2
 
double time3
 

Macro Definition Documentation

#define NEPS   28
#define NEPS2   19

Function Documentation

TString cc3 ( c3  )
cout<< fileliv << endl; int countlag=0; double OLIVETIME = GetLiveTime(fileliv,0,0,countlag); double LIVETIME = GetLiveTime(fileliv,-1,-1,countlag); LIVETIME-=OLIVETIME; countlag-=1; cout.precision(14); cout << OLIVETIME << " " << LIVETIME << endl; ifstream bkgin; bkgin.open(html_body_prod_template,ios::in); if (!bkgin.good()) {cout << "Error Opening File : " << html_body_prod_template << endl;exit(1);} char exec[1024]; char istring[1024]; while (1) { bkgin.getline(istring,256); if (!bkgin.good()) break; TString ostringa(istring); if(bcat3||bhveto) { ostringa.ReplaceAll("<!--VETO",""); ostringa.ReplaceAll("VETO-->",""); } else { ostringa.ReplaceAll("<!--NOVETO",""); ostringa.ReplaceAll("VETONO-->",""); } if(TString(analysis)=="1G") { ostringa.ReplaceAll("<!--RHO_PF",""); ostringa.ReplaceAll("RHO_PF-->",""); } else { ostringa.ReplaceAll("<!--RHO_SUBNET",""); ostringa.ReplaceAll("RHO_SUBNET-->",""); } if(pp_rho_vs_rate_no_multiplicity) { ostringa.ReplaceAll("<!--MULTI",""); ostringa.ReplaceAll("MULTI-->",""); } ostringa.ReplaceAll("FLOW",sfLow); ostringa.ReplaceAll("FHIGH",sfHigh); ostringa.ReplaceAll("PP_RHO_MIN",spp_rho_min); ostringa.ReplaceAll("PP_RHO_MAX",spp_rho_max); ostringa.ReplaceAll("PP_DATA_DIR",PP_DATA_DIR); ostringa.ReplaceAll("NETCC",NetCC); ostringa.ReplaceAll("RHO",Rho); ostringa.ReplaceAll("RH_OUT",RhOut); ostringa.ReplaceAll("RH_ACOR",RhAcor); ostringa.ReplaceAll("svED",svED); TString Rate= "rate = " + RATEBACKGROUND; ostringa.ReplaceAll("RATEBACKGROUND",Rate); ostringa.ReplaceAll("SUBTITLE",subtitle); ostringa.ReplaceAll("TITLE",title); char ltime[1024]; sprintf(ltime, "zero lag : <font color=\"red\"> %.2f sec = %.2f days</font>", OLIVETIME,OLIVETIME/86400.); ostringa.ReplaceAll("LIVETIME",ltime); sprintf(ltime, "non-zero lags : <font color=\"red\"> %i lags - %.2f sec = %.2f days = %.1f years </fonts>", countlag,LIVETIME,LIVETIME/(float)86400.,LIVETIME/86400./365.); ostringa.ReplaceAll("LIVETIM2",ltime); ostringa.ReplaceAll("PLOT_LIST",pp_data_dir); if(cwb_doc_url!="") { ostringa.ReplaceAll("<!--CWB_DOC_URL",""); ostringa.ReplaceAll("CWB_DOC_URL-->",""); ostringa.ReplaceAll("XCWB_DOC_URL",cwb_doc_url.Data()); } ostringa.ReplaceAll("</html>",""); out << ostringa.Data() << endl; } bkgin.close(); char _ifo[NIFO_MAX][8]; for(int n=0;n<nIFO;n++) { if(strlen(ifo[n])>0) strcpy(_ifo[n],ifo[n]); else strcpy(_ifo[n],detParms[n].name); } char file_ev[1024]; sprintf(file_ev,"%s/events.txt",PP_DATA_PATH.Data()); ifstream for_ev(file_ev); char file_header[1024]; sprintf(file_header,"%s/events_header.txt",PP_DATA_PATH.Data()); ofstream for_header(file_header); char file_notsorted[1024]; sprintf(file_notsorted,"%s/events_notsorted.txt",PP_DATA_PATH.Data()); ofstream for_notsorted(file_notsorted); char in_ev[100000]; while(1) { for_ev.getline(in_ev,100000); if (!for_ev.good()) break; TString sin_ev(in_ev); if (sin_ev.Contains("#")) for_header << sin_ev.Data() << endl; else for_notsorted << sin_ev.Data() << endl; } for_header.close(); for_notsorted.close(); char file_sorted[1024]; sprintf(file_sorted,"%s/events_sorted.txt",PP_DATA_PATH.Data()); sprintf(exec,"sort -g -r --key=3 %s > %s",file_notsorted, file_sorted); gSystem-> Exec ( exec  )
ifstream f_ev ( file_sorted  )
for ( )

Definition at line 39 of file cwb_mkhtml_prod.C.

if ( nIFO  = =1)

Definition at line 17 of file cwb_mkhtml_prod.C.

if ( gSystem->Getenv("CWB_DOC_URL")!  = NULL)

Definition at line 30 of file cwb_mkhtml_prod.C.

if ( !f_ev.  good())
if ( ppm.  Contains"+")

Definition at line 256 of file cwb_mkhtml_prod.C.

TString ppm ( pm  )
sprintf ( netdir  ,
"%s/%s ,
pp_dir  ,
pp_data_dir   
)
sprintf ( netdir  ,
"%s"  ,
pp_data_dir   
)
sprintf ( fileliv  ,
"%s/live.txt"  ,
PP_DATA_PATH.  Data() 
)
sprintf ( exec  ,
"cat %s s,
%s/EVENTS.txt"  ,
file_header  ,
file_sorted  ,
PP_DATA_PATH.  Data() 
)
sprintf ( file_notsorted  ,
"%s/events_notsorted.txt"  ,
PP_DATA_PATH.  Data() 
)

Variable Documentation

bool bcat2 = false

Definition at line 35 of file cwb_mkhtml_prod.C.

bool bcat3 = false

Definition at line 37 of file cwb_mkhtml_prod.C.

bool bhveto = false

Definition at line 36 of file cwb_mkhtml_prod.C.

char c3[2]

Definition at line 202 of file cwb_mkhtml_prod.C.

TString cwb_doc_url =""

Definition at line 29 of file cwb_mkhtml_prod.C.

int ecount =0

Definition at line 210 of file cwb_mkhtml_prod.C.

else
Initial value:
{
float SNR1
float SNR0
double time1
float idur
float irho
float ilik
float icc2
int ifreq
int iband
char c3[2]
float psi
float ilag
float theta
float hrss1
float iacor
float icHH
double time0
float ipen
ifstream f_ev(file_sorted)
float hrss0
float icc
int isize
float icc3
int irate
float islag
float phi
int irun
char pm[2]

Definition at line 250 of file cwb_mkhtml_prod.C.

Definition at line 80 of file cwb_mkhtml_prod.C.

char fileliv[1024]

Definition at line 94 of file cwb_mkhtml_prod.C.

float hrss0

Definition at line 207 of file cwb_mkhtml_prod.C.

float hrss1

Definition at line 207 of file cwb_mkhtml_prod.C.

float hrss2

Definition at line 207 of file cwb_mkhtml_prod.C.

float hrss3

Definition at line 207 of file cwb_mkhtml_prod.C.

float iacor

Definition at line 203 of file cwb_mkhtml_prod.C.

int iband

Definition at line 204 of file cwb_mkhtml_prod.C.

float icc

Definition at line 203 of file cwb_mkhtml_prod.C.

float icc2

Definition at line 203 of file cwb_mkhtml_prod.C.

float icc3

Definition at line 203 of file cwb_mkhtml_prod.C.

float icHH

Definition at line 203 of file cwb_mkhtml_prod.C.

float idur

Definition at line 205 of file cwb_mkhtml_prod.C.

int ifreq

Definition at line 204 of file cwb_mkhtml_prod.C.

float ilag

Definition at line 203 of file cwb_mkhtml_prod.C.

float ilik

Definition at line 203 of file cwb_mkhtml_prod.C.

float ipen

Definition at line 203 of file cwb_mkhtml_prod.C.

int irate

Definition at line 206 of file cwb_mkhtml_prod.C.

float irho

Definition at line 203 of file cwb_mkhtml_prod.C.

int irun

Definition at line 206 of file cwb_mkhtml_prod.C.

int isize

Definition at line 206 of file cwb_mkhtml_prod.C.

float islag

Definition at line 203 of file cwb_mkhtml_prod.C.

float ivED

Definition at line 203 of file cwb_mkhtml_prod.C.

float ivHH

Definition at line 203 of file cwb_mkhtml_prod.C.

char os[1024]

Definition at line 212 of file cwb_mkhtml_prod.C.

float phi

Definition at line 209 of file cwb_mkhtml_prod.C.

char pm[2]

Definition at line 201 of file cwb_mkhtml_prod.C.

PP_DATA_DIR =netdir

Definition at line 71 of file cwb_mkhtml_prod.C.

PP_DATA_PATH =netdir

Definition at line 71 of file cwb_mkhtml_prod.C.

out<< "<table border=0 cellpadding=2 class=\"datagrid\"><<endl;out<<"<tralign=\"center\">"<<endl;out<<"<td>ID</td>"<<endl;if(bhveto)out<<"<td>KW</td>"<<endl;if(bcat3)out<<"<td>cat3</td>"<<endl;out<<"<td>rho["<<pp_irho<<"]</td>"<<endl;out<<"<td>cc["<<pp_inetcc<<"]</td>"<<endl;if(TString(analysis)=="2G")out<<"<td>subnet</td>"<<endl;out<<"<td>lag</td>"<<endl;out<<"<td>slag</td>"<<endl;out<<"<td>SNRnet</td>"<<endl;if(TString(analysis)=="1G")out<<"<td>pf</td>"<<endl;if(TString(analysis)=="1G")out<<"<td>vED</td>"<<endl;out<<"<td>freq</td>"<<endl;out<<"<td>bw</td>"<<endl;out<<"<td>dur</td>"<<endl;out<<"<td>size</td>"<<endl;if(optim==true)out<<"<td>res</td>"<<endl;out<<"<td>run</td>"<<endl;for(intnn=0;nn<nIFO;nn++)out<<"<td>GPS"<<_ifo[nn]<<"</td>"<<endl;for(intnn=0;nn<nIFO;nn++)out<<"<td>SNR"<<_ifo[nn]<<"</td>"<<endl;out<<"</tr>"<<endl;doublestart[5];while(ecount<pp_max_nloudest_list){if(nIFO>3){f_ev>>pm>>c3>>irho>>icc>>icc2>>icc3>>iacor>>ilag>>islag>>ilik>>ipen>>icHH>>ifreq>>iband>>idur>>isize>>irate>>irun>>time0>>time1>>time2>>time3>>SNR0>>SNR1>>SNR2>>SNR3>>hrss0>>hrss1>>hrss2>>hrss3>>phi>>theta>>psi;}elseif(nIFO>2){f_ev>>pm>>c3>>irho>>icc>>icc2>>icc3>>iacor>>ilag>>islag>>ilik>>ipen>>icHH>>ifreq>>iband>>idur>>isize>>irate>> irun time0 time1 time2 SNR0 SNR1 SNR2 hrss0 hrss1 hrss2 phi theta psi

Definition at line 209 of file cwb_mkhtml_prod.C.

TString RATEBACKGROUND

Definition at line 77 of file cwb_mkhtml_prod.C.

bool singleDetector =false

Definition at line 16 of file cwb_mkhtml_prod.C.

float SNR0

Definition at line 207 of file cwb_mkhtml_prod.C.

float SNR1

Definition at line 207 of file cwb_mkhtml_prod.C.

float SNR2

Definition at line 207 of file cwb_mkhtml_prod.C.

float SNR3

Definition at line 207 of file cwb_mkhtml_prod.C.

float theta

Definition at line 209 of file cwb_mkhtml_prod.C.

double time0

Definition at line 208 of file cwb_mkhtml_prod.C.

double time1

Definition at line 208 of file cwb_mkhtml_prod.C.

double time2

Definition at line 208 of file cwb_mkhtml_prod.C.

double time3

Definition at line 208 of file cwb_mkhtml_prod.C.