1 #define L1_FILE_CAT0 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/L1Cat0.txt"
2 #define H1_FILE_CAT0 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/H1Cat0.txt"
4 #define L1_FILE_CAT1 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/L1Cat1.txt"
5 #define H1_FILE_CAT1 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/H1Cat1.txt"
7 #define L1_FILE_CAT2 "/home/vedovato/O1/DQvetos/ER8b_12Sep20Oct_C0101/L1Cat2.txt"
8 #define H1_FILE_CAT2 "/home/vedovato/O1/DQvetos/ER8b_12Sep20Oct_C0101/H1Cat2.txt"
13 #define L1_FILE_CAT3 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/HVETO_L1_SEP12OCT20_MERGED.txt"
14 #define H1_FILE_CAT3 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/HVETO_H1_SEP12OCT20_MERGED.txt"
19 #define L1_FILE_CAT4 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/L1Cat4.txt"
20 #define H1_FILE_CAT4 "/home/vedovato/O1//DQvetos/ER8b_12Sep20Oct_C0101/H1Cat4.txt"
25 #define LIVE_TIME_FILE "/home/vedovato/O1/ER8b_12Sep20Oct_C0101/ER8b_12Sep20Oct_C0101_BKG_LF_rMRA_run0a/merge/live_ER8b_12Sep20Oct_C0101_BKG_LF_rMRA_run0a.M1.root"
27 #define ZERO_LAG_LIVETIME_JOBS // get live time using only the job segments (600sec)
35 cout <<
"CreateSymbolicLinksC01 - Error : File " <<
LIVE_TIME_FILE <<
" not exist !!!" << endl;
40 TTree*
tree = (TTree *) gROOT->FindObject(
"liveTime");
42 cout <<
"CheckCAT2 - Error : liveTime tree not found !!!" << endl;
45 tree->Draw(
"start[0]:stop[0]:start[1]:stop[1]",
"lag[2]==0 && slag[2]==0",
"goff");
46 int nseg = (Int_t)tree->GetSelectedRows();
47 cout <<
"nseg : " << nseg << endl;
48 double* start_l1 = tree->GetV1();
49 double* stop_l1 = tree->GetV2();
50 double* start_h1 = tree->GetV3();
51 double* stop_h1 = tree->GetV4();
53 vector<waveSegment> L1_jobs;
56 for(
int i=0;
i<nseg;
i++) {
57 seg.
index=index++; seg.
start=start_l1[
i]; seg.
stop=stop_l1[
i]; L1_jobs.push_back(seg);
60 vector<waveSegment> H1_jobs;
62 for(
int i=0;
i<nseg;
i++) {
63 seg.
index=index++; seg.
start=start_h1[
i]; seg.
stop=stop_h1[
i]; H1_jobs.push_back(seg);
67 cout <<
"L1_jobs : " << L1_jobs.size() << endl;
68 cout <<
"H1_jobs : " << H1_jobs.size() << endl;
71 cout <<
"l1_live_time " << (
int)l1_live_time << endl;
73 cout <<
"h1_live_time " << (
int)h1_live_time << endl;
75 double l1h1_live_time = l1_live_time;
84 cout <<
"h1_time_cat0 : " << (
int)h1_time_cat0 << endl;
86 cout <<
"l1_time_cat0 : " << (
int)l1_time_cat0 << endl;
90 cout <<
"l1h1_time_cat0 : " << (
int)l1h1_time_cat0 <<
" " << l1h1_time_cat0/(24.*3600.) << endl;
99 cout <<
"h1_time_cat1 : " << (
int)h1_time_cat1 << endl;
101 cout <<
"l1_time_cat1 : " << (
int)l1_time_cat1 << endl;
108 cout <<
"h1_time_cat0_cat1 : " << (
int)h1_time_cat0_cat1 << endl;
112 cout <<
"l1_time_cat0_cat1 : " << (
int)l1_time_cat0_cat1 << endl;
116 cout <<
"l1h1_time_cat0_cat1 : " << (
int)l1h1_time_cat0_cat1 <<
" " << l1h1_time_cat0_cat1/(24.*3600.) << endl;
122 #ifndef ZERO_LAG_LIVETIME_JOBS
123 L1_jobs = L1_cat0_and_cat1;
124 H1_jobs = H1_cat0_and_cat1;
128 cout <<
"l1_live_time " << (
int)l1_live_time <<
" " << l1_live_time/(24.*3600.) <<
" days" << endl;
130 cout <<
"h1_live_time " << (
int)h1_live_time <<
" " << l1_live_time/(24.*3600.) <<
" days" << endl;
134 cout <<
"----> BEFORE PP DQ : l1h1_live_time : " << (
int)l1h1_live_time <<
" " << l1h1_live_time/(24.*3600.) <<
" days" << endl;
143 cout <<
"h1_time_cat2 : " << (
int)h1_time_cat2 << endl;
145 cout <<
"l1_time_cat2 : " << (
int)l1_time_cat2 << endl;
152 cout <<
"h1_time_job_cat2 : " << (
int)h1_time_job_cat2
153 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat2)/h1_live_time << endl;
157 cout <<
"l1_time_job_cat2 : " << (
int)l1_time_job_cat2
158 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat2)/l1_live_time << endl;
162 cout <<
"l1h1_time_job_cat2 : " << (
int)l1h1_time_job_cat2 <<
" " << l1h1_time_job_cat2/(24.*3600.) <<
" days" << endl;
164 cout <<
"CAT2 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat2) <<
"/" << (
int)l1h1_live_time
165 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat2)/l1h1_live_time << endl;
174 cout <<
"h1_time_cat3 : " << (
int)h1_time_cat3 << endl;
176 cout <<
"l1_time_cat3 : " << (
int)l1_time_cat3 << endl;
183 cout <<
"h1_time_job_cat3 : " << (
int)h1_time_job_cat3
184 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat3)/h1_live_time << endl;
188 cout <<
"l1_time_job_cat3 : " << (
int)l1_time_job_cat3
189 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat3)/l1_live_time << endl;
193 cout <<
"l1h1_time_job_cat3 : " << (
int)l1h1_time_job_cat3 <<
" " << l1h1_time_job_cat3/(24.*3600.) <<
" days" << endl;
195 cout <<
"CAT3 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat3) <<
"/" << (
int)l1h1_live_time
196 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat3)/l1h1_live_time << endl;
205 cout <<
"h1_time_cat4 : " << (
int)h1_time_cat4 << endl;
207 cout <<
"l1_time_cat4 : " << (
int)l1_time_cat4 << endl;
214 cout <<
"h1_time_job_cat4 : " << (
int)h1_time_job_cat4
215 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat4)/h1_live_time << endl;
219 cout <<
"l1_time_job_cat4 : " << (
int)l1_time_job_cat4
220 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat4)/l1_live_time << endl;
224 cout <<
"l1h1_time_job_cat4 : " << (
int)l1h1_time_job_cat4 <<
" " << l1h1_time_job_cat4/(24.*3600.) <<
" days" << endl;
226 cout <<
"CAT4 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat4) <<
"/" << (
int)l1h1_live_time
227 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat4)/l1h1_live_time << endl;
235 cout <<
"l1_time_job_cat234 : " << (
int)l1_time_job_cat234 <<
" " << l1_time_job_cat234/(24.*3600.) <<
" days" << endl;
237 cout <<
"L1 CAT234 vetoed time : " << (
int)(l1_live_time-l1_time_job_cat234) <<
"/" << (
int)l1_live_time
238 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat234)/l1_live_time << endl;
247 cout <<
"h1_time_job_cat234 : " << (
int)h1_time_job_cat234 <<
" " << h1_time_job_cat234/(24.*3600.) <<
" days" << endl;
249 cout <<
"H1 CAT234 vetoed time : " << (
int)(h1_live_time-h1_time_job_cat234) <<
"/" << (
int)h1_live_time
250 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat234)/h1_live_time << endl;
259 cout <<
"----> AFTER PP DQ : l1h1_time_job_cat234 : " << (
int)l1h1_time_job_cat234 <<
" " << l1h1_time_job_cat234/(24.*3600.) <<
" days" << endl;
261 cout <<
"L1H1 CAT234 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat234) <<
"/" << (
int)l1h1_live_time
262 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat234)/l1h1_live_time << endl;
274 if (!in.good()) {cout <<
"Error Opening File : " << ifile << endl;gSystem->Exit(1);}
275 cout <<
"input file list : " << ifile << endl;
283 vector<waveSegment>
iseg;
286 in.getline(str,1024);
287 if(str[0] ==
'#')
continue;
288 in.seekg(fpos, ios::beg);
292 if (!in.good())
break;
vector< waveSegment > readSegment(TString ifile)
void GetLiveTime_ZeroLag_AFTER_PP_DQ()
vector< waveSegment > iseg