Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cwb_dump_job.C
Go to the documentation of this file.
1 // list the standard jobs (variable length) : used by the cwb_dump command
2 
3 {
5 
6  TB.checkFile(gSystem->Getenv("CWB_ROOTLOGON_FILE"));
7  TB.checkFile(gSystem->Getenv("CWB_PARAMETERS_FILE"));
8  TB.checkFile(gSystem->Getenv("CWB_UPARAMETERS_FILE"));
9 
10  // output job list file
11  char ojobListFile[256];
12  sprintf(ojobListFile,"%s/%s.job",dump_dir,data_label);
13 
14  cout<<endl<<"-------------------------------------------------------------------------------------"<< endl<<endl;
15 
16  vector<waveSegment> cat1List=TB.readSegList(nDQF, DQF, CWB_CAT1);
17  double cat1_time=TB.getTimeSegList(cat1List);
18  cout << "total cat1 livetime : " << int(cat1_time) << " sec "
19  << cat1_time/3600. << " h " << cat1_time/86400. << " day" << endl;
20  cout << endl;
21 
22  vector<waveSegment> cat2List=TB.readSegList(nDQF, DQF, CWB_CAT2);
23  double cat2_time=TB.getTimeSegList(cat2List);
24 
25  vector<waveSegment> jobList=TB.getJobList(cat1List, cat2List, segLen, segMLS, segTHR, segEdge);
26  double job_time=TB.getTimeSegList(jobList);
27 
28  cout << endl;
29  cout << "cat1 livetime (zero lag) of the standard job list : " << int(job_time) << " sec "
30  << job_time/3600. << " h " << job_time/86400. << " day" << endl;
31 
32  double job_time_cat2 = TB.getLiveTime(jobList,cat2List);
33  cout << "cat1+cat2 livetime (zero lag) of the standard job list : " << int(job_time_cat2) << " sec "
34  << job_time_cat2/3600. << " h " << job_time_cat2/86400. << " day" << endl;
35 
36  cout<<endl<<"-------------------------------------------------------------------------------------"<< endl<<endl;
37 
38  cout<<"Final number of standard jobs : " << jobList.size() <<endl<<endl;
39  cout<<"Dump job list : includes jobs discarted by the condition livetime<segTHR"<<endl;
40  TB.dumpJobList(cat1List, ojobListFile, segLen, segMLS, segEdge);
41  cout << endl;
42 
43  exit(0);
44 }
double segMLS
Definition: test_config1.C:47
sprintf(ojobListFile,"%s/%s.job", dump_dir, data_label)
vector< waveSegment > jobList
Definition: cwb_dump_job.C:25
static double getLiveTime(vector< waveSegment > &jobList, vector< waveSegment > &dqList)
Definition: Toolbox.cc:2074
static double getTimeSegList(vector< waveSegment > list)
Definition: Toolbox.cc:592
double segEdge
Definition: test_config1.C:49
static bool checkFile(TString fName, bool question=false, TString message="")
Definition: Toolbox.cc:3956
CWB::Toolbox TB
Definition: ComputeSNR.C:5
nDQF
Definition: cwb_eced.C:92
double segTHR
Definition: test_config1.C:48
char data_label[512]
Definition: test_config1.C:160
i() int(T_cor *100))
dqfile DQF[12]
Definition: test_config1.C:171
segLen
Definition: cwb_eced.C:7
double job_time
Definition: cwb_dump_job.C:26
char ojobListFile[256]
Definition: cwb_dump_job.C:11
double cat2_time
Definition: cwb_dump_job.C:23
static vector< waveSegment > getJobList(vector< waveSegment > ilist, double segLen=600., double segMLS=300., double segEdge=8.)
Definition: Toolbox.cc:627
cout<< endl<<"-------------------------------------------------------------------------------------"<< endl<< endl;vector< waveSegment > cat1List
Definition: cwb_dump_job.C:16
static void dumpJobList(vector< waveSegment > ilist, TString fName, double segLen=600., double segMLS=300., double segEdge=8.)
Definition: Toolbox.cc:606
static vector< waveSegment > readSegList(dqfile DQF)
Definition: Toolbox.cc:391
char dump_dir[512]
Definition: test_config1.C:156
cout<< "total cat1 livetime : "<< int(cat1_time)<< " sec "<< cat1_time/3600.<< " h "<< cat1_time/86400.<< " day"<< endl;cout<< endl;vector< waveSegment > cat2List
Definition: cwb_dump_job.C:22
double cat1_time
Definition: cwb_dump_job.C:17
exit(0)