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"
28 #define LIVE_TIME_FILE "/home/vedovato/O1/ER8b_12Sep20Oct_C0101/ER8b_12Sep20Oct_C0101_BKG_LF_rMRA_run1ato10a/merge/live_ER8b_12Sep20Oct_C0101_BKG_LF_rMRA_run1ato10a.M1.root"
55 cout <<
"CreateSymbolicLinksC01 - Error : File " <<
LIVE_TIME_FILE <<
" not exist !!!" << endl;
60 TTree*
tree = (TTree *) gROOT->FindObject(
"liveTime");
62 cout <<
"CheckCAT2 - Error : liveTime tree not found !!!" << endl;
66 long int isize = tree->GetEntries();
68 cout <<
"isize : " << isize << endl;
69 tree->SetEstimate(isize);
71 tree->Draw(
"start[0]:start[1]",
"lag[2]==0",
"goff",isize);
72 long int nseg = (Int_t)tree->GetSelectedRows();
73 cout <<
"nseg : " << nseg << endl;
74 double* start_l1 = tree->GetV1();
75 double* start_h1 = tree->GetV2();
77 double mintime_h1=1e20;
78 for(
long int i=0;
i<nseg;
i++)
if(start_h1[
i]<mintime_h1) mintime_h1=start_h1[
i];
80 for(
long int i=0;i<nseg;i++) if(start_h1[i]>maxtime_h1) maxtime_h1=start_h1[
i];
82 cout <<
"h1 size : " << size << endl;
85 for(
long int i=0;
i<nseg;
i++) {
86 double start=start_h1[
i]-mintime_h1;
92 double mintime_l1=1e20;
93 for(
long int i=0;
i<nseg;
i++)
if(start_l1[
i]<mintime_l1) mintime_l1=start_l1[
i];
95 for(
long int i=0;i<nseg;i++) if(start_l1[i]>maxtime_l1) maxtime_l1=start_l1[
i];
96 size=(maxtime_l1-mintime_l1)/
SEGLEN;
97 cout <<
"l1 size : " << size << endl;
100 for(
long int i=0;
i<nseg;
i++) {
101 double start=start_l1[
i]-mintime_l1;
113 cout <<
"h1_time_cat0 : " << (
int)h1_time_cat0 << endl;
115 cout <<
"l1_time_cat0 : " << (
int)l1_time_cat0 << endl;
119 cout <<
"l1h1_time_cat0 : " << (
int)l1h1_time_cat0 <<
" " << l1h1_time_cat0/(24.*3600.) << endl;
128 cout <<
"h1_time_cat1 : " << (
int)h1_time_cat1 << endl;
130 cout <<
"l1_time_cat1 : " << (
int)l1_time_cat1 << endl;
137 cout <<
"h1_time_cat0_cat1 : " << (
int)h1_time_cat0_cat1 << endl;
141 cout <<
"l1_time_cat0_cat1 : " << (
int)l1_time_cat0_cat1 << endl;
145 cout <<
"l1h1_time_cat0_cat1 : " << (
int)l1h1_time_cat0_cat1 <<
" " << l1h1_time_cat0_cat1/(24.*3600.) << endl;
151 vector<waveSegment> L1_jobs = L1_cat0_and_cat1;
152 vector<waveSegment> H1_jobs = H1_cat0_and_cat1;
155 cout <<
"l1_live_time " << (
int)l1_live_time <<
" " << l1_live_time/(24.*3600.) <<
" days" << endl;
157 cout <<
"h1_live_time " << (
int)h1_live_time <<
" " << l1_live_time/(24.*3600.) <<
" days" << endl;
161 cout <<
"l1h1_live_time : " << (
int)l1h1_live_time <<
" " << l1h1_live_time/(24.*3600.) <<
" days" << endl;
170 cout <<
"h1_time_cat2 : " << (
int)h1_time_cat2 << endl;
172 cout <<
"l1_time_cat2 : " << (
int)l1_time_cat2 << endl;
179 cout <<
"h1_time_job_cat2 : " << (
int)h1_time_job_cat2
180 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat2)/h1_live_time << endl;
184 cout <<
"l1_time_job_cat2 : " << (
int)l1_time_job_cat2
185 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat2)/l1_live_time << endl;
189 cout <<
"l1h1_time_job_cat2 : " << (
int)l1h1_time_job_cat2 <<
" " << l1h1_time_job_cat2/(24.*3600.) <<
" days" << endl;
191 cout <<
"CAT2 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat2) <<
"/" << (
int)l1h1_live_time
192 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat2)/l1h1_live_time << endl;
201 cout <<
"h1_time_cat3 : " << (
int)h1_time_cat3 << endl;
203 cout <<
"l1_time_cat3 : " << (
int)l1_time_cat3 << endl;
210 cout <<
"h1_time_job_cat3 : " << (
int)h1_time_job_cat3
211 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat3)/h1_live_time << endl;
215 cout <<
"l1_time_job_cat3 : " << (
int)l1_time_job_cat3
216 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat3)/l1_live_time << endl;
220 cout <<
"l1h1_time_job_cat3 : " << (
int)l1h1_time_job_cat3 <<
" " << l1h1_time_job_cat3/(24.*3600.) <<
" days" << endl;
222 cout <<
"CAT3 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat3) <<
"/" << (
int)l1h1_live_time
223 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat3)/l1h1_live_time << endl;
232 cout <<
"h1_time_cat4 : " << (
int)h1_time_cat4 << endl;
234 cout <<
"l1_time_cat4 : " << (
int)l1_time_cat4 << endl;
241 cout <<
"h1_time_job_cat4 : " << (
int)h1_time_job_cat4
242 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat4)/h1_live_time << endl;
246 cout <<
"l1_time_job_cat4 : " << (
int)l1_time_job_cat4
247 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat4)/l1_live_time << endl;
251 cout <<
"l1h1_time_job_cat4 : " << (
int)l1h1_time_job_cat4 <<
" " << l1h1_time_job_cat4/(24.*3600.) <<
" days" << endl;
253 cout <<
"CAT4 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat4) <<
"/" << (
int)l1h1_live_time
254 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat4)/l1h1_live_time << endl;
262 cout <<
"l1_time_job_cat234 : " << (
int)l1_time_job_cat234 <<
" " << l1_time_job_cat234/(24.*3600.) <<
" days" << endl;
264 cout <<
"L1 CAT234 vetoed time : " << (
int)(l1_live_time-l1_time_job_cat234) <<
"/" << (
int)l1_live_time
265 <<
" Vetoed (%) : " << 100*(l1_live_time-l1_time_job_cat234)/l1_live_time << endl;
274 cout <<
"h1_time_job_cat234 : " << (
int)h1_time_job_cat234 <<
" " << h1_time_job_cat234/(24.*3600.) <<
" days" << endl;
276 cout <<
"H1 CAT234 vetoed time : " << (
int)(h1_live_time-h1_time_job_cat234) <<
"/" << (
int)h1_live_time
277 <<
" Vetoed (%) : " << 100*(h1_live_time-h1_time_job_cat234)/h1_live_time << endl;
286 cout <<
"l1h1_time_job_cat234 : " << (
int)l1h1_time_job_cat234 <<
" " << l1h1_time_job_cat234/(24.*3600.) <<
" days" << endl;
288 cout <<
"L1H1 CAT234 vetoed time : " << (
int)(l1h1_live_time-l1h1_time_job_cat234) <<
"/" << (
int)l1h1_live_time
289 <<
" Vetoed (%) : " << 100*(l1h1_live_time-l1h1_time_job_cat234)/l1h1_live_time << endl;
295 vector<waveSegment>
seg(1);
298 double l1_tot_time=0;
299 double l1_tot_time_after_dq=0;
300 for(
long int i=0;
i<seg_l1.
size();
i++) {
301 if(seg_l1[
i]==0)
continue;
303 seg[0].start=mintime_l1+
i*
SEGLEN; seg[0].stop=seg[0].start+
SEGLEN;
307 l1_tot_time_after_dq+=seg_l1[
i]*segs_time;
309 cout <<
"L1 CAT234 vetoed time (ALL) : " << (l1_tot_time-l1_tot_time_after_dq) <<
"/" << l1_tot_time
310 <<
" Vetoed (%) : " << 100*(l1_tot_time-l1_tot_time_after_dq)/l1_tot_time << endl;
317 double h1_tot_time=0;
318 double h1_tot_time_after_dq=0;
319 for(
long int i=0;
i<seg_h1.
size();
i++) {
320 if(seg_h1[
i]==0)
continue;
322 seg[0].start=mintime_h1+
i*
SEGLEN; seg[0].stop=seg[0].start+
SEGLEN;
326 h1_tot_time_after_dq+=seg_h1[
i]*segs_time;
328 cout <<
"H1 CAT234 vetoed time (ALL) : " << (h1_tot_time-h1_tot_time_after_dq) <<
"/" << h1_tot_time
329 <<
" Vetoed (%) : " << 100*(h1_tot_time-h1_tot_time_after_dq)/h1_tot_time << endl;
341 if (!in.good()) {cout <<
"Error Opening File : " << ifile << endl;gSystem->Exit(1);}
342 cout <<
"input file list : " << ifile << endl;
350 vector<waveSegment>
iseg;
353 in.getline(str,1024);
354 if(str[0] ==
'#')
continue;
355 in.seekg(fpos, ios::beg);
359 if (!in.good())
break;
virtual size_t size() const
void GetLiveTime_BKG_AFTER_PP_DQ()
vector< waveSegment > iseg
vector< waveSegment > readSegment(TString ifile)