6 TB.
checkFile(gSystem->Getenv(
"CWB_ROOTLOGON_FILE"));
7 TB.
checkFile(gSystem->Getenv(
"CWB_PARAMETERS_FILE"));
9 TB.
checkFile(gSystem->Getenv(
"CWB_NETC_FILE"));
12 if(gSystem->Getenv(
"CWB_BATCH")!=NULL) {
13 cwb_batch=
TString(gSystem->Getenv(
"CWB_BATCH"));
20 if(gSystem->Getenv(
"CWB_JOBID")==NULL) {
21 cout <<
"Error : environment CWB_JOBID is not defined!!!" << endl;
exit(1);
23 if(
TString(gSystem->Getenv(
"CWB_JOBID")).IsDigit()) {
24 cwb_jobid=
TString(gSystem->Getenv(
"CWB_JOBID")).Atoi();
26 cout <<
"Error : environment CWB_JOBID is not defined!!!" << endl;
exit(1);
30 if(gSystem->Getenv(
"CWB_CED_DIR")!=NULL) {
32 if(cwb_ced_dir.Sizeof()>1) {
38 TString cwb_inet_options=
TString(gSystem->Getenv(
"CWB_INET_OPTIONS"));
39 if(cwb_inet_options.CompareTo(
"")!=0) {
40 TString inet_options = cwb_inet_options;
42 if(!inet_options.Contains(
"--")) {
45 for(
int j=0;
j<token->GetEntries();
j++){
47 TObjString* tok = (TObjString*)token->At(
j);
48 TString stok = tok->GetString();
50 if(stok==
"true")
cedDump =
true;
52 if(stok==
"false")
cedDump =
false;
53 if(stok==
"root")
cedDump =
true;
54 if(stok.Contains(
"cedDump=")) {
56 cedDump_par.Remove(0,cedDump_par.Last(
'=')+1);
57 if(cedDump_par==
"true")
cedDump=
true;
58 if(cedDump_par==
"false")
cedDump=
false;
61 if(stok.Contains(
"gps=")) {
63 gps_par.Remove(0,gps_par.Last(
'=')+1);
64 if(gps_par.IsFloat()) gSystem->Setenv(
"CWB_GPS_EVENT",gps_par);
66 if(stok.Contains(
"iwindow=")) {
68 iwindow_par.Remove(0,iwindow_par.Last(
'=')+1);
69 if(iwindow_par.IsFloat())
gap=iwindow_par.Atof();
71 if(stok.Contains(
"netCC=")) {
73 netCC_par.Remove(0,netCC_par.Last(
'=')+1);
74 if(netCC_par.IsFloat())
netCC=netCC_par.Atof();
76 if(stok.Contains(
"Acore=")) {
78 Acore_par.Remove(0,Acore_par.Last(
'=')+1);
79 if(Acore_par.IsFloat())
Acore=Acore_par.Atof();
81 if(stok.Contains(
"dump=")) {
83 dump_par.Remove(0,dump_par.Last(
'=')+1);
84 if(dump_par==
"true")
dump=
true;
85 if(dump_par==
"false")
dump=
false;
87 if(stok.Contains(
"plugin=")) {
89 plugin_par.Remove(0,plugin_par.Last(
'=')+1);
90 if(plugin_par.EndsWith(
".C"))
plugin=TMacro(plugin_par);
92 if(stok.Contains(
"search=")) {
94 search_par.Remove(0,search_par.Last(
'=')+1);
95 if(search_par==
"r")
SEARCH()=
'r';
96 if(search_par==
"i")
SEARCH()=
'i';
97 if(search_par==
"p")
SEARCH()=
'p';
98 if(search_par==
"l")
SEARCH()=
'l';
99 if(search_par==
"c")
SEARCH()=
'c';
100 if(search_par==
"e")
SEARCH()=
'e';
101 if(search_par==
"s")
SEARCH()=
's';
102 if(search_par==
"g")
SEARCH()=
'g';
103 if(search_par==
"b")
SEARCH()=
'b';
105 if(stok.Contains(
"optim=")) {
107 optim_par.Remove(0,optim_par.Last(
'=')+1);
108 if(optim_par==
"true")
optim=
true;
109 if(optim_par==
"false")
optim=
false;
117 TMacro cwb_inet_plugin = gSystem->ExpandPathName(
"$HOME_WAT/tools/cwb/plugins/CWB_Plugin_cwb_inet.C");
119 char fpluginName[1024];
120 unsigned int Pid = gSystem->GetPid();
121 sprintf(fpluginName,
"%s/CWB_Plugin_cwb_inet_%s_%d_job%d.XXXXXX",
127 if(!out.good()) {cout <<
"cwb_inet.C - Error : Opening File : " << fpluginName << endl;gSystem->Exit(1);}
129 TList* fLines =
plugin.GetListOfLines();
132 out <<
"// --> BEGIN USER PLUGIN CODE" << endl;
133 while ((obj = (TObjString*)
next())) {
135 line.ReplaceAll(
"CWB_Plugin(",
"CWB_UserPlugin(");
136 out << line.Data() << endl;
138 out <<
"// --> END USER PLUGIN CODE" << endl << endl;
141 TList* fLines = cwb_inet_plugin.GetListOfLines();
144 out <<
"// --> BEGIN CWB_INET PLUGIN CODE" << endl;
145 while ((obj = (TObjString*)
next())) {
147 out << line.Data() << endl;
149 if((
TString(
plugin.GetName())!=
"")&&(line.Contains(
"CWB_Plugin("))) {
151 out <<
" CWB_UserPlugin(jfile, cfg, net, x, ifo, type); // CALL USER PLUGIN CODE" << endl;
155 out <<
"// --> END CWB_INET PLUGIN CODE" << endl;
158 if(cwb_inet_options.Contains(
"frdisplay"))
plugin = fpluginName;
159 if(cwb_inet_options.Contains(
"psd"))
plugin = fpluginName;
160 if(cwb_inet_options.Contains(
"inj"))
plugin = fpluginName;
161 if(cwb_inet_options.Contains(
"wdm"))
plugin = fpluginName;
162 if(cwb_inet_options.Contains(
"nrms"))
plugin = fpluginName;
163 if(cwb_inet_options.Contains(
"emax"))
plugin = fpluginName;
164 if(cwb_inet_options.Contains(
"sparse"))
plugin = fpluginName;
165 if(cwb_inet_options.Contains(
"ced"))
plugin = fpluginName;
166 plugin.SetName(fpluginName);
172 if(cwb_gps_event.CompareTo(
"")!=0) {
173 if(!cwb_gps_event.IsFloat()) {cout<<
"Error : CWB_GPS_EVENT is not a number" << endl;
exit(1);}
174 if(cwb_gps_event.Atoi()>0) gps_event=cwb_gps_event.Atoi();
184 TString cwb_mdc_factor=
TString(gSystem->Getenv(
"CWB_MDC_FACTOR"));
185 if(cwb_mdc_factor.CompareTo(
"")!=0) {
186 if(!cwb_mdc_factor.IsFloat()) {cout<<
"Error : CWB_MDC_FACTOR is not a number" << endl;
exit(1);}
187 if(cwb_mdc_factor.Atof()>0) mdc_factor=cwb_mdc_factor.Atof();
196 if(cwb_job_lag.CompareTo(
"")!=0) {
197 if(!cwb_job_lag.IsFloat()) {cout<<
"Error : CWB_JOB_LAG is not a number" << endl;
exit(1);}
198 job_lag=cwb_job_lag.Atoi();
222 cout<<
"lag step: "<<
lagStep<<endl;
223 cout<<
"number of time lags_ced : " << lags_ced << endl;
230 for(
int n=0;
n<
nIFO;
n++)
printf(
"%14.5f",pD_CED[
n]->lagShift.data[0]);
236 if(gps_event==0)
return;
256 cout <<
"Write file : " <<
DQF[
nDQF-1].
file << endl;
257 if (!out.good()) {cout <<
"Error Opening File : " <<
DQF[
nDQF-1].
file << endl;
exit(1);}
260 int istart =
int(gps_event)-
gap;
261 int istop =
int(gps_event)+
gap;
262 out <<
"1 " << istart <<
" " << istop <<
" " << 2*
gap << endl;
268 cout <<
"cwb_inet gps_event>1 is not implemented with : !!!" << endl;
269 cout <<
"if slagSize=1 -> slagMin=slagMax=slagOff=0, slagFile=NULL "<<endl;
273 cout <<
"cwb_inet gps_event>1 is not implemented with slagSize>1 !!!" << endl;
280 jobSegLen = jobList[cwb_jobid-1].stop-jobList[cwb_jobid-1].start;
284 if(tShift<0) tShift=jobSegLen-
fabs(tShift);
286 int istart =
int(gps_event+tShift)-
gap;
287 int istop =
int(gps_event+tShift)+
gap;
288 out << n+1 <<
" " << istart <<
" " << istop <<
" " << 2*
gap << endl;
294 for(
int n=0; n<
nIFO; n++)
if(pD_CED[n]!=NULL)
delete pD_CED[
n];
detector * getifo(size_t n)
param: detector index
virtual void resize(unsigned int)
size_t add(detector *)
param: detector structure return number of detectors in the network
printf("total live time: non-zero lags = %10.1f \n", liveTot)
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
TIter next(twave->GetListOfBranches())
vector< waveSegment > cat1List
wavearray< double > lagShift
double fabs(const Complex &x)
strcpy(RunLabel, RUN_LABEL)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
detectorParams detParms[4]
int setTimeShifts(size_t=1, double=1., size_t=0, size_t=0, const char *=NULL, const char *="w", size_t *=NULL)
param number of time lags param time shift step in seconds param first lag ID param maximum lag ID pa...
detector * pD_CED[NIFO_MAX]