19 #include "TObjArray.h"
20 #include "TObjString.h"
21 #include "TSystemDirectory.h"
23 #include "TApplication.h"
30 #include "TGraphSmooth.h"
52 #define LST_TREE_NAME "frl"
118 static vector<waveSegment>
120 static vector<waveSegment>
121 unionSegments(vector<waveSegment>& ilist);
122 static vector<waveSegment>
123 sortSegments(vector<waveSegment>& ilist);
124 static vector<waveSegment>
125 invertSegments(vector<waveSegment>& ilist);
126 static vector<waveSegment>
127 mergeSegLists(vector<waveSegment>& ilist1, vector<waveSegment>& ilist2);
129 getMaxSeg(vector<waveSegment>
list);
131 getTimeSegList(vector<waveSegment> list);
134 static vector<waveSegment>
135 getSlagJobList(vector<waveSegment> ilist,
int seglen=600);
141 static vector<waveSegment>
143 static vector<waveSegment>
152 static vector<waveSegment>
153 getJobList(vector<waveSegment> ilist,
double segLen=600.,
155 static vector<waveSegment>
159 dumpJobList(vector<waveSegment> ilist,
TString fName,
double segLen=600.,
161 static vector<waveSegment>
163 vector<waveSegment> dqList);
165 getLiveTime(vector<waveSegment>&
jobList, vector<waveSegment>& dqList);
167 getLiveTime(vector<waveSegment>& jobList, vector<waveSegment>& dqList,
168 vector<double> shiftList);
181 getSlag(vector<slag> slagList,
int jobid);
183 getSlagList(vector<slag> slagList, vector<TString> ifos,
double segLen,
184 double segMin,
double segEdge,
int nDQF,
dqfile* iDQF,
CWB_CAT dqcat);
186 getSlagList(vector<slag>& slagList,
int slagSize,
187 int slagRank,
int nifo, vector<int>&
id);
188 static vector<waveSegment>
189 getSegList(
slag SLAG, vector<waveSegment> jobList,
double segLen,
190 double segMLS,
double segEdge, vector<waveSegment> dqList);
199 shiftBurstMDCLog(std::vector<std::string>& mdcList,
204 SetMDCLog(
TString log,
int pos,
double val);
206 GetMDCLog(
TString log,
int pos);
237 getJobBenchmark(
TString ifName,
int stageID,
int resID,
int factorID,
TString bench);
246 static vector<TString>
248 TString label,
bool brms=
false,
bool bvar=
false,
bool bpsm=
false);
251 TString label,
bool brms=
false,
bool bvar=
false,
bool bpsm=
false);
252 static vector<TString>
253 mergeCWBTrees(
int nthreads,
TString dir_name,
bool simulation,
TString odir,
254 TString label,
bool brms=
false,
bool bvar=
false,
bool bpsm=
false);
256 mergeCWBTrees(
int nthreads, vector<TString> fileList,
bool simulation,
TString odir,
257 TString label,
bool brms=
false,
bool bvar=
false,
bool bpsm=
false);
260 static vector<TString>
263 dumpFileList(vector<TString> fileList,
TString ofName);
267 getMergeJobList(
TString ifname, vector<TString>& jobFileList);
269 getMergeJobList(
TString ifname);
286 double scratchlen=0,
bool oneside=
true);
289 double scratchlen=0,
bool oneside=
true);
304 static vector<TString>
306 TString beginString=
"",
TString containString=
"",
bool fast=
false);
307 static std::map<int,TString>
309 TString beginString=
"",
TString containString=
"",
bool fast=
false);
315 mkDir(
TString dir,
bool question=
false,
bool remove=
true);
317 rmDir(
TString dir,
bool question=
true);
321 getTemporaryFileName(
TString label=
"temporary",
TString extension=
"tmp");
323 mksTemp(
char *fTemplate) {
return mkstemp(fTemplate);}
324 static vector<TString>
325 sortStrings(vector<TString> ilist);
334 double segMLS,
double segEdge);
350 getZeroLiveTime(
int nIFO, TChain& liv,
int dummy=0);
361 static int GetStepFunction(
TString fName, vector<double>& x, vector<double>&
y,
362 vector<double>& ex = DEFAULT_DOUBLE_VECTOR, vector<double>& ey = DEFAULT_DOUBLE_VECTOR);
363 static double GetStepFunction(
TString option,
TString fName,
double V=0,
364 vector<double>& x = DEFAULT_DOUBLE_VECTOR, vector<double>&
y = DEFAULT_DOUBLE_VECTOR,
365 vector<double>& ex = DEFAULT_DOUBLE_VECTOR, vector<double>& ey = DEFAULT_DOUBLE_VECTOR);
378 getFileName(FILE* fp);
404 getSineFittingParams(
double a,
double b,
double c,
double rate,
410 blackmanharris (
double* window,
int n);
TB createDagFile(rslagList, full_condor_dir, data_label, jobFiles, cwb_stage_name)
wavearray< double > a(hp.size())
wavearray< double > Trun(500000)
cout<< "slagList size : "<< slagList.size()<< endl;cout<< endl<< "Start segments selection from dq cat1 list ..."<< endl<< endl;rslagList=TB.getSlagList(slagList, ifos, segLen, segMLS, segEdge, nDQF, DQF, CWB_CAT1);cout<< "Number of selected jobs after cat1 : "<< rslagList.size()<< endl;cout<< endl<< "Start segments selection from dq cat2 list ..."<< endl<< endl;rslagList=TB.getSlagList(rslagList, ifos, segLen, segTHR, segEdge, nDQF, DQF, CWB_CAT2);cout<< "Number of selected jobs after cat2 : "<< rslagList.size()<< endl;vector< TString > jobFiles
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
wavearray< double > psd(33)
TB createSubFile(data_label, full_condor_dir, full_condor_out_dir, full_condor_err_dir, condor_log, extention, condor_tag)
wavearray< int > Wsel(ntrg)
TB mergeTrees(fileList, TREE_NAME, OUTPUT_MERGE_DIR, OFILE_NAME, false)
TB dumpSegList(dq1List, dq1ListFile, false)
wavearray< double > Tdlag
vector< TString > getFileListFromDir(TString dir_name, TString endString="", TString beginString="")
vector< waveSegment > cat1List
TB mkDir(eced_dir, check, remove)
cout<< "Starting reading output directory ..."<< endl;vector< TString > fileList
cout<< "total cat1 livetime : "<< int(cat1_time)<< " sec "<< cat1_time/3600.<< " h "<< cat1_time/86400.<< " day"<< endl;cout<< endl;vector< waveSegment > cat2List
wavearray< double > Wlag[NIFO_MAX+1]
void getUniqueFileList(TString ifile, TString ofile)
TString frLabel[NIFO_MAX]
TB checkFile(gSystem->Getenv("CWB_ROOTLOGON_FILE"))
wavearray< double > Wslag[NIFO_MAX+1]