Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TestFrame2.C
Go to the documentation of this file.
1 //
2 // Test Create FrList
3 // Author : Gabriele Vedovato
4 
5 #define FRLIST_NAME "input/H1_LDAS_C02_L2.frl"
6 #define CHANNEL_NAME "H1:LDAS-STRAIN"
7 
8 using namespace CWB;
9 
10 void TestFrame2() {
11 
13  x.start(942449664);
14  x.stop(x.start()+600);
15 
16  frame ifr(FRLIST_NAME,CHANNEL_NAME,"READ");
17  int nfiles=ifr.getNfiles();
18  cout << "nfiles : " << nfiles << endl;
19 
20  ifr >> x;
21 
22  cout << x.start() << " " << x.rate() << " " << x.size() << endl;
23 
24  frame ofr("TEST.gwf","CHNAME","WRITE");
25 // ofr.setFrName("FRNAME");
26  ofr << x;
27  ofr.close();
28 
29  exit(0);
30 }
int nfiles
Definition: ced.hh:24
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
void close()
Definition: frame.cc:278
virtual void start(double s)
Definition: wavearray.hh:119
#define FRLIST_NAME
Definition: TestFrame2.C:5
int getNfiles()
Definition: frame.hh:92
void TestFrame2()
Definition: TestFrame2.C:10
virtual void stop(double s)
Definition: wavearray.hh:121
#define CHANNEL_NAME
Definition: TestFrame2.C:6
exit(0)