8 #define JOB_CSTRAIN_FILE "data/cstrain_XXXX_jobYY.root" // define cstrain root file 11 #define SCRATCH_TIME 10 // is the segEdge parameter (sec) 22 TFile*
jfile =
new TFile(jname);
23 if(jfile==NULL||!jfile->IsOpen())
24 {cout <<
"Error : file " << jname <<
" not found" << endl;
exit(1);}
30 if(px==NULL) {cout<<
"Error : "<<cstrain_dir<<
" not present"<<endl;
exit(1);}
31 hot[
i] = *
px;
delete px;
34 cout << hot[
i].
size() <<
" " << hot[
i].
rate() <<
" " << hot[
i].
start() << endl;
37 int jE = hot[
i].
size()-jS;
38 cout <<
"DEB SIZE " << hot[
i].
size() <<
" " << hot[
i].
rate() <<
" " <<
int(hot[i].
start()) << endl;
41 for(
int j=jS;
j<jE;
j++) {
43 rms+=pow(hot[i].data[
j],2);
46 cout <<
"DEB RMS = " << sqrt(rms) << endl;
50 #if defined (DISPLAY_TIME) || defined (DISPLAY_PSD) 52 watplot plot(const_cast<char*>(
"plot"),200,20,800,500);
56 if(
n==0)
sprintf(gtitle,
"%s %s (black) ", gtitle, ifo[
n].Data());
57 if(
n==1)
sprintf(gtitle,
"%s %s (red) ", gtitle, ifo[
n].Data());
58 if(
n==2)
sprintf(gtitle,
"%s %s (green) ", gtitle, ifo[
n].Data());
62 plot.
gtitle(gtitle,
"time (sec)",
"strain");
63 plot.
goptions(const_cast<char*>(
"alp"), 1, 0., 0.);
71 plot.
gtitle(gtitle,
"frequency (Hz)",
"strain/#sqrt{Hz}");
72 plot.
goptions(const_cast<char*>(
"alp logx logy"), 1, tstart, tstop,
true, flow,fhigh,
true, 4);
75 for(
int n=0;n<nIFO;n++) hot[n] >>
plot;
void gtitle(TString title="", TString xtitle="", TString ytitle="")
virtual void rate(double r)
wavearray< double > x
temporary time series
plot gtitle(gtitle,"frequency (Hz)","strain/#sqrt{Hz}")
virtual void start(double s)
virtual size_t size() const
wavearray< double > hot[2]
sprintf(cstrain_dir,"cstrain/cstrain-f%d", FACTOR_INDEX)
void goptions(char *opt=NULL, int col=1, double t1=0., double t2=0., bool fft=false, float f1=0., float f2=0., bool psd=false, float t3=0., bool oneside=false)