3 #pragma GCC system_header
10 #include "TObjArray.h"
11 #include "TObjString.h"
81 cout <<
"-----> CWB_Plugin_Recolor.C" << endl;
82 cout <<
"ifo " << ifo.Data() << endl;
83 cout <<
"type " << type << endl;
100 if(
id<0) {cout <<
"Plugin : Error - bad ifo id" << endl; gSystem->Exit(1);}
110 if(
id<0) {cout <<
"Plugin : Error - bad ifo id" << endl; gSystem->Exit(1);}
138 sprintf(frFile,
"%s/%s_%s-%d-%d.gwf",
147 cout <<
"CWB_Plugin_Recolor.C : write " << frFile << endl;
152 if(
TString(ifo).CompareTo(net->
ifoName[nIFO-1])==0) gSystem->Exit(0);
180 if(options.CompareTo(
"")!=0) {
181 cout << options << endl;
182 if(!options.Contains(
"--")) {
185 for(
int j=0;
j<token->GetEntries();
j++){
187 TObjString* tok = (TObjString*)token->At(
j);
188 TString stok = tok->GetString();
190 if(stok.Contains(
"frDir=")) {
192 frDir[n_frDir].Remove(0,
frDir[n_frDir].Last(
'=')+1);
193 frDir[n_frDir]=gSystem->ExpandPathName(
frDir[n_frDir].Data());
197 if(stok.Contains(
"frName=")) {
199 frName[n_frName].Remove(0,
frName[n_frName].Last(
'=')+1);
200 if(n_frName<(
NIFO_MAX-1)) n_frName++;
203 if(stok.Contains(
"frLabel=")) {
206 if(n_frLabel<(
NIFO_MAX-1)) n_frLabel++;
209 if(stok.Contains(
"chName=")) {
211 chName[n_chName].Remove(0,
chName[n_chName].Last(
'=')+1);
212 if(n_chName<(
NIFO_MAX-1)) n_chName++;
215 if(stok.Contains(
"padFreq=")) {
217 opt.Remove(0,opt.Last(
'=')+1);
218 if(opt.IsDigit())
padFreq[n_padFreq]=opt.Atoi();
220 if(n_padFreq<(
NIFO_MAX-1)) n_padFreq++;
223 if(stok.Contains(
"padFactor=")) {
225 opt.Remove(0,opt.Last(
'=')+1);
226 if(opt.IsDigit())
padFactor[n_padFactor]=opt.Atoi();
228 if(n_padFactor<(
NIFO_MAX-1)) n_padFactor++;
231 if(stok.Contains(
"psdFile=")) {
234 psdFile[n_psdFile]=gSystem->ExpandPathName(
psdFile[n_psdFile].Data());
235 if(n_psdFile<(
NIFO_MAX-1)) n_psdFile++;
238 if(stok.Contains(
"gausNoise=")) {
240 opt.Remove(0,opt.Last(
'=')+1);
241 if(opt==
"false")
gausNoise[n_gausNoise]=
false;
242 if(opt==
"true")
gausNoise[n_gausNoise]=
true;
243 if(n_gausNoise<(
NIFO_MAX-1)) n_gausNoise++;
250 if(
frDir[
i]==
"") {cout <<
"CWB_Plugin_Recolor : Error - frDir["<<cfg->
ifo[
i]<<
"] not defined" << endl; gSystem->Exit(1);}
251 if(
frName[
i]==
"") {cout <<
"CWB_Plugin_Recolor : Error - frName["<<cfg->
ifo[
i]<<
"] not defined" << endl; gSystem->Exit(1);}
252 if(
chName[
i]==
"") {cout <<
"CWB_Plugin_Recolor : Error - chName["<<cfg->
ifo[
i]<<
"] not defined" << endl; gSystem->Exit(1);}
253 if(
frLabel[
i]==
"") {cout <<
"CWB_Plugin_Recolor : Error - frLabel["<<cfg->
ifo[
i]<<
"] not defined" << endl; gSystem->Exit(1);}
254 if(
psdFile[
i]==
"") {cout <<
"CWB_Plugin_Recolor : Error - psdFile["<<cfg->
ifo[
i]<<
"] not defined" << endl; gSystem->Exit(1);}
255 if(
i>=n_gausNoise) {cout <<
"CWB_Plugin_Recolor : Error - gausNoise["<<cfg->
ifo[
i]<<
"] not defined" << endl; gSystem->Exit(1);}
261 cout <<
"-----------------------------------------" << endl;
262 cout <<
"Recolor config options : ifo = " << cfg->
ifo[ifoId] << endl;
263 cout <<
"-----------------------------------------" << endl << endl;
265 cout <<
"frDir : " <<
frDir[ifoId] << endl;
266 cout <<
"chName : " <<
chName[ifoId] << endl;
267 cout <<
"frName : " <<
frName[ifoId] << endl;
268 cout <<
"frLabel : " <<
frLabel[ifoId] << endl;
269 cout <<
"psdFile : " <<
psdFile[ifoId] << endl;
270 cout <<
"padFreq : " <<
padFreq[ifoId] << endl;
271 cout <<
"padFactor : " <<
padFactor[ifoId] << endl;
272 cout <<
"gausNoise : " <<
gausNoise[ifoId] << endl;
std::vector< char * > ifoName
virtual void resize(unsigned int)
virtual size_t size() const
virtual void rate(double r)
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
CWB::frame fr(FRLIST_NAME)
void writeFrame(wavearray< double > x, TString frName, TString chName)
virtual void start(double s)
network ** net
NOISE_MDC_SIMULATION.
TString psdFile[NIFO_MAX]
void CWB_Plugin(TFile *jfile, CWB::config *cfg, network *net, WSeries< double > *x, TString ifo, int type)
COHERENCE.
virtual void stop(double s)
void PrintUserOptions(CWB::config *cfg, int ifoId)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
void ReadUserOptions(CWB::config *cfg)
virtual void resize(unsigned int)
TString frLabel[NIFO_MAX]