Nearline_Watchdog_Plots.C
Go to the documentation of this file.
1 void Nearline_Watchdog_Plots(int FDRunL,int FDRunH,int NDRunL, int NDRunH)
2 
3 {
4 
5  gStyle->SetOptStat(" ");
6  gStyle->SetLabelSize(0.025);
7  gStyle->SetLegendBorderSize(1);
8 
9  //===============================================
10  // Time Stamp for Far Detector
11  //================================================
12 
13  TDatime *TNowGMT = new TDatime; // current GMT time
14  TDatime *TNow = new TDatime; // current local time
15  TDatime *SRtime = new TDatime;
16 
17  int XNowGMT = TNowGMT->Convert(kTRUE);
18  int XNow = TNow ->Convert(kFALSE);
19 
20  int GMToffset = XNowGMT - XNow;
21  XNow = XNow - GMToffset;
22 
23  int XDayAgo = XNow - 60 * 60 * 24;
24  int XWeekAgo = XNow - 60 * 60 * 24 * 7;
25  int XMonthAgo = XNow - 60 * 60 * 24 * 30;
26  int Xsrtime = 0;
27  int time_ago = 0;
28 
29  unsigned int year = 0;
30  unsigned short int month = 0;
31  unsigned short int day = 0;
32  double Hour = 0.0;
33  double Min = 0.0;
34  int hour = 0;
35  int min = 0;
36  int sec = 0;
37 
38  unsigned int run = 0;
39  unsigned int subrun = 0;
40  UInt_t par = 0;
41 
42  unsigned int LastRun = 0;
43  unsigned int LastSR = 0;
44 
45  unsigned int yearEnd = 0;
46  unsigned short int monthEnd = 0;
47  unsigned short int dayEnd = 0;
48  double HourEnd = 0.0;
49  double SRdur = 0;
50 
51  // Root is stupid and you have to make it think that it is in a different time zone so that it will draw any
52  // plots with time on the X-axis correctly.
53  gSystem->Setenv("TZ","UTC");
54  gStyle->SetTimeOffset(0);
55 
56  //======================================
57  // Make time/date stamp for each plot
58  //======================================
59 
60  TDatime *Ttemp = new TDatime; // finish time
61  int Xfin = Ttemp->Convert();
62  TDatime *Tfinish = new TDatime(Xfin); // finish time
63  TPaveText *UpdateTextFD = new TPaveText(0.1, 0.0, 0.5, 0.05, "NDC");
64  UpdateTextFD->SetLineColor(0);
65  UpdateTextFD->SetFillColor(0);
66  UpdateTextFD->SetBorderSize(1);
67  UpdateTextFD->SetMargin(0.0);
68  UpdateTextFD->SetTextAlign(11);
69  // UpdateTextFD->SetTextSize(22);
70 
71  char buff1[256];
72  sprintf(buff1, "Last updated on: %s (central time)", Tfinish->AsString());
73  UpdateTextFD->AddText(buff1);
74  char buff2FD[256];
75  sprintf(buff2FD, "Last run: %d", FDRunH);
76  UpdateTextFD->AddText(buff2FD);
77 
78  //Opening a text file
79 
80  ifstream in;
81  in.open("FDNearline.txt");
82  int Runnum,RawCosmiclarge,OnMon,OnMonSmall,RecoCosmic,RecoCosmicSMALL,NuMIRawbigfile,NumiOnMon,NumiOnMonsmall,NuMIrecofiles,NuMIrecoSMALLfiles,FDSubrun;
83 
84  int fdrun1=FDRunL;
85  int fdrun2=FDRunH+1;
86  int nbin=FDRunH-FDRunL;
87 
88  THStack *CosmisLarplusSmall = new THStack ("CosmisLarplusSmall",";Run Number; Number of Subruns");
89 
90  THStack *CosmisOnMonLarplusSmall = new THStack ("CosmisOnMonLarplusSmall",";Run Number; Number of Subruns");
91 
92  THStack *NuMILarplusSmall = new THStack ("NuMILarplusSmall",";Run Number; Number of Subruns");
93 
94  THStack *NuMIOnMonLarplusSmall = new THStack ("NuMIOnMonLarplusSmall",";Run Number; Number of Subruns");
95 
96  TH1F *CosmicRecofiles = new TH1F("CosmicRecofiles","Nearline FarDet Cosmic Trigger: Last 7 days",nbin,fdrun1,fdrun2);
97 
98  TH1F *DBfdsubrun = new TH1F("DBfdsubrun","", nbin,fdrun1, fdrun2);
99 
100  TH1F *CosmicRecoSMALLfiles = new TH1F("CosmicRecoSMALLfiles","", nbin,fdrun1, fdrun2);
101 
102  TH1F *CosmicOnMonfiles = new TH1F("CosmicOnMonfiles",";Run Number; Number of Subruns", nbin , fdrun1 , fdrun2);
103 
104  TH1F *CosmicOnMonsmallfiles = new TH1F("CosmicOnMonsmallfiles",";Run Number; Number of Subruns", nbin , fdrun1 , fdrun2);
105 
106  TH1F *CosmicRawlargefiles = new TH1F("CosmicRawlargefiles","", nbin , fdrun1 , fdrun2);
107 
108  TH1F *NuMIRecofiles = new TH1F("NuMIRecofiles","Nearline FarDet NuMI Trigger: Last 7 day", nbin , fdrun1 , fdrun2);
109 
110  TH1F *NuMIRecoSMALLfiles = new TH1F("NuMIRecoSMALLfiles","", nbin , fdrun1 , fdrun2);
111 
112  TH1F *NuMIRawlargefiles = new TH1F("NuMIRawlargefiles","", nbin , fdrun1 , fdrun2);
113 
114  TH1F *FDNuMIOnMon = new TH1F("FDNuMIOnMOn",";Run Number;Number of Subruns", nbin , fdrun1 , fdrun2);
115 
116  TH1F *FDNuMIOnMonsmall = new TH1F("FDNuMIOnMOnsmall",";Run Number;Number of Subruns", nbin , fdrun1 , fdrun2);
117 
118  TH1F *DBfdsubrun1 = new TH1F("DBfdsubrun1","", nbin,fdrun1, fdrun2);
119 
120 
121  //Reading the text file
122 
123  while(1)
124  {
125 
126  in>>Runnum>>RawCosmiclarge>>OnMon>>OnMonSmall>>RecoCosmic>>RecoCosmicSMALL>>NuMIRawbigfile>>NumiOnMon>>NumiOnMonsmall>>NuMIrecofiles>>NuMIrecoSMALLfiles>>FDSubrun;
127 
128 
129 
130  if(!in.good())break;
131 
132  //========================================
133  //Filling the histogram by SetBinContent !
134  //========================================
135 
136  CosmicRecofiles->SetBinContent(CosmicRecofiles->FindBin(Runnum),RecoCosmic);
137 
138 
139  CosmicRecoSMALLfiles->SetBinContent(CosmicRecoSMALLfiles->FindBin(Runnum),RecoCosmicSMALL);
140 
141 
142  CosmicOnMonfiles->SetBinContent(CosmicOnMonfiles->FindBin(Runnum),OnMon);
143 
144  CosmicOnMonsmallfiles->SetBinContent(CosmicOnMonsmallfiles->FindBin(Runnum),OnMonSmall);
145 
146 
147  CosmicRawlargefiles->SetBinContent(CosmicRawlargefiles->FindBin(Runnum),RawCosmiclarge);
148 
149 
150  DBfdsubrun->SetBinContent(DBfdsubrun->FindBin(Runnum),FDSubrun);
151 
152  NuMIRecofiles->SetBinContent(NuMIRecofiles->FindBin(Runnum),NuMIrecofiles);
153 
154  FDNuMIOnMon->SetBinContent(FDNuMIOnMon->FindBin(Runnum),NumiOnMon);
155 
156  FDNuMIOnMonsmall->SetBinContent(FDNuMIOnMonsmall->FindBin(Runnum),NumiOnMonsmall);
157 
158  NuMIRecoSMALLfiles->SetBinContent(NuMIRecoSMALLfiles->FindBin(Runnum),NuMIrecoSMALLfiles);
159 
160 
161  NuMIRawlargefiles->SetBinContent(NuMIRawlargefiles->FindBin(Runnum),NuMIRawbigfile);
162 
163 
164  DBfdsubrun1->SetBinContent(DBfdsubrun1->FindBin(Runnum),FDSubrun);
165 
166 
167 
168  }
169 
170  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
171  //Making Canvas for CosmicReco files
172  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173 
174  TCanvas *cosmicreco = new TCanvas ("cosmicreco","",700,700);
175 
176  CosmicRecofiles->SetFillColor(kAzure+1);
177  CosmicRecofiles->SetLineColor(kAzure+1);
178 
179  CosmicRecoSMALLfiles->SetFillStyle(3001);
180  CosmicRecoSMALLfiles->SetFillColor(kAzure+1);
181  CosmicRecoSMALLfiles->SetLineColor(kAzure+1);
182 
183 
184 
185  DBfdsubrun->SetLineColor(kBlack);
186  DBfdsubrun->SetLineWidth(3);
187 
188  CosmicRawlargefiles->SetLineColor(kRed);
189  CosmicRawlargefiles->SetLineWidth(3);
190 
191 
192  CosmisLarplusSmall->Add(CosmicRecofiles);
193  CosmisLarplusSmall->Add(CosmicRecoSMALLfiles);
194 
195  CosmisLarplusSmall->Draw();
196  CosmisLarplusSmall->GetYaxis()->SetTitleOffset(1.4);
197  CosmisLarplusSmall->SetMaximum(120);
198  CosmisLarplusSmall->SetMinimum(0);
199 
200  CosmicRawlargefiles->Draw("SAME");
201  DBfdsubrun->Draw("SAME");
202 
203 
204  auto leg = new TLegend(0.12,0.75,0.45,0.9);
205  leg->SetTextFont(62);
206  leg->SetLineColor(1);
207  leg->SetLineStyle(1);
208  leg->SetLineWidth(3);
209  leg->SetFillColor(0);
210  leg->SetFillStyle(1001);
211  leg->SetShadowColor(0);
212  leg->SetDrawOption(0);
213  leg->SetBorderSize(0);
214  leg->SetTextSize(0.02);
215  leg->SetHeader("");
216  leg->AddEntry("CosmicRecofiles","Cosmic Reco Files","f");
217  leg->AddEntry("CosmicRecoSMALLfiles","Cosmic Reco SMALL files","f");
218  leg->AddEntry("CosmicRawlargefiles","Cosmic Raw files","l");
219  leg->AddEntry("DBfdsubrun","DB Subrun","l");
220  leg->Draw();
221  UpdateTextFD->Draw();
222 
223  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
224  //Making Canvas and Drawing for FarDet CosmicOnMon files
225  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
226 
227  TCanvas *FDCosmicsOnMon = new TCanvas("FDCosmicsOnMon","",700,700);
228 
229  CosmicOnMonfiles->SetFillColor(kOrange-2);
230  CosmicOnMonfiles->SetLineColor(kOrange-2);
231 
232  CosmicOnMonsmallfiles->SetFillStyle(3001);
233  CosmicOnMonsmallfiles->SetFillColor(kOrange-2);
234  CosmicOnMonsmallfiles->SetLineColor(kOrange-2);
235 
236  DBfdsubrun->SetLineColor(kBlack);
237  DBfdsubrun->SetLineWidth(3);
238 
239  CosmicRawlargefiles->SetLineColor(kRed);
240  CosmicRawlargefiles->SetLineWidth(3);
241 
242  CosmisOnMonLarplusSmall->Add(CosmicOnMonfiles);
243  CosmisOnMonLarplusSmall->Add(CosmicOnMonsmallfiles);
244  CosmisOnMonLarplusSmall->Draw();
245  CosmisOnMonLarplusSmall->GetYaxis()->SetTitleOffset(1.4);
246  CosmisOnMonLarplusSmall->SetMaximum(120);
247  CosmisOnMonLarplusSmall->SetMinimum(0);
248  CosmicRawlargefiles->Draw("same");
249  DBfdsubrun->Draw("same");
250 
251 
252  auto leg5 = new TLegend(0.12,0.75,0.45,0.9);
253  leg5->SetTextFont(62);
254  leg5->SetLineColor(1);
255  leg5->SetLineStyle(1);
256  leg5->SetLineWidth(3);
257  leg5->SetFillColor(0);
258  leg5->SetFillStyle(1001);
259  leg5->SetShadowColor(0);
260  leg5->SetDrawOption(0);
261  leg5->SetBorderSize(0);
262  leg5->SetTextSize(0.02);
263  leg5->SetHeader("");
264  leg5->AddEntry("CosmicOnMonfiles","Cosmic OnMon files","f");
265  leg5->AddEntry("CosmicOnMonsmallfiles","Cosmic OnMon SMALL files","f");
266  leg5->AddEntry("CosmicRawlargefiles","Cosmic Raw files","l");
267  leg5->AddEntry("DBfdsubrun","DB Subrun","l");
268  leg5->Draw();
269 
270  UpdateTextFD->Draw();
271 
272  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
273 
274  //Making Canvas and Drawing for FarDet NuMIReco files
275 
276  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277 
278  TCanvas *numireco = new TCanvas ("numireco","",700,700);
279 
280 
281  NuMIRecofiles->SetFillColor(kAzure+1);
282  NuMIRecofiles->SetLineColor(kAzure+1);
283 
284  NuMIRecoSMALLfiles->SetFillStyle(3001);
285  NuMIRecoSMALLfiles->SetFillColor(kAzure+1);
286  NuMIRecoSMALLfiles->SetLineColor(kAzure+1);
287 
288 
289  DBfdsubrun1->SetLineColor(kBlack);
290  DBfdsubrun1->SetLineWidth(3);
291 
292  NuMIRawlargefiles->SetLineColor(kRed);
293  NuMIRawlargefiles->SetLineWidth(3);
294 
295 
296  NuMILarplusSmall->Add(NuMIRecofiles);
297  NuMILarplusSmall->Add(NuMIRecoSMALLfiles);
298  NuMILarplusSmall->Draw();
299  NuMILarplusSmall->SetMaximum(90);
300  NuMILarplusSmall->SetMinimum(0);
301  NuMIRawlargefiles->Draw("SAME");
302  DBfdsubrun1->Draw("SAME");
303 
304  auto leg1 = new TLegend(0.12,0.75,0.45,0.9);
305  leg1->SetTextFont(62);
306  leg1->SetLineColor(1);
307  leg1->SetLineStyle(1);
308  leg1->SetLineWidth(3);
309  leg1->SetFillColor(0);
310  leg1->SetFillStyle(1001);
311  leg1->SetShadowColor(0);
312  leg1->SetDrawOption(0);
313  leg1->SetBorderSize(0);
314  leg1->SetTextSize(0.02);
315  leg1->AddEntry("NuMIRecofiles","NuMI Reco files","f");
316  leg1->AddEntry("NuMIRecoSMALLfiles","NuMI Reco SMALL files","f");
317  leg1->AddEntry("NuMIRawlargefiles","NuMI Raw files","l");
318  leg1->AddEntry("DBfdsubrun1","DB Subrun","l");
319  leg1->Draw();
320 
321  UpdateTextFD->Draw();
322 
323  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
324 
325  //Making Canvas and Drawing for FarDet NuMIOnMon files
326 
327  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
328 
329 
330  TCanvas *FDNuMIOnmon = new TCanvas("FDNuMIOnmon","",700,700);
331 
332 
333  FDNuMIOnMon->SetFillColor(kOrange-2);
334  FDNuMIOnMon->SetLineColor(kOrange-2);
335 
336  FDNuMIOnMonsmall->SetFillStyle(3001);
337  FDNuMIOnMonsmall->SetFillColor(kOrange-2);
338  FDNuMIOnMonsmall->SetLineColor(kOrange-2);
339 
340 
341  DBfdsubrun1->SetLineColor(kBlack);
342  DBfdsubrun1->SetLineWidth(3);
343 
344  NuMIRawlargefiles->SetLineColor(kRed);
345  NuMIRawlargefiles->SetLineWidth(3);
346 
347  NuMIOnMonLarplusSmall->Add(FDNuMIOnMon);
348  NuMIOnMonLarplusSmall->Add(FDNuMIOnMonsmall);
349  NuMIOnMonLarplusSmall->Draw();
350  NuMIOnMonLarplusSmall->SetMaximum(90);
351  NuMIOnMonLarplusSmall->SetMinimum(0);
352  NuMIRawlargefiles->Draw("SAME");
353  DBfdsubrun1->Draw("SAME");
354 
355 
356  auto leg4 = new TLegend(0.12,0.75,0.45,0.9);
357  leg4->SetTextFont(62);
358  leg4->SetLineColor(1);
359  leg4->SetLineStyle(1);
360  leg4->SetLineWidth(3);
361  leg4->SetFillColor(0);
362  leg4->SetFillStyle(1001);
363  leg4->SetShadowColor(0);
364  leg4->SetDrawOption(0);
365  leg4->SetBorderSize(0);
366  leg4->SetTextSize(0.02);
367  leg4->AddEntry(FDNuMIOnMon,"NuMI OnMon files","f");
368  leg4->AddEntry(FDNuMIOnMonsmall,"NuMI OnMon SMALL files","f");
369  leg4->AddEntry("NuMIRawlargefiles","NuMI Raw files","l");
370  leg4->AddEntry("DBfdsubrun1","DB Subrun","l");
371  leg4->Draw("same");
372 
373  // When you generate your plot, make sure you add the following line \
374  //before saving the png file
375  UpdateTextFD->Draw();
376 
377  //~~~~~~~~~~~~~~~~~~~~~~~~
378  // Making .png plots
379  //~~~~~~~~~~~~~~~~~~~~~~~~
380 
381  FDCosmicsOnMon->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/FarDet-t02-P1NearlineOnMonFilesDay.png");
382  FDNuMIOnmon->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/FarDet-t00-P1NearlineOnMonFilesDay.png");
383  cosmicreco->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/FarDet-t02-P1NearlineRecoFilesDay.png");
384  numireco->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/FarDet-t00-P1NearlineRecoFilesDay.png");
385 
386 
387 
388  in.close();
389 
390  //============================
391  //Time Stamp for NearDetector
392  //============================
393 
394  gSystem->Setenv("TZ","UTC");
395  gStyle->SetTimeOffset(0);
396 
397  TPaveText *UpdateTextND = new TPaveText(0.1, 0.0, 0.5, 0.05, "NDC");
398  UpdateTextND->SetLineColor(0);
399  UpdateTextND->SetFillColor(0);
400  UpdateTextND->SetBorderSize(1);
401  UpdateTextND->SetMargin(0.0);
402  UpdateTextND->SetTextAlign(11);
403 
404  UpdateTextND->AddText(buff1);
405  char buff2ND[256];
406  sprintf(buff2ND, "Last run: %d", NDRunH);
407  UpdateTextND->AddText(buff2ND);
408 
409  ifstream ND;
410  ND.open("NDNearline.txt");
411  int NDRunnum,RAWDDAlargefiles,DDAOnMon,DDAOnMonsmall,RecoDDAfiles,RecoDDAsmall,NDNuMIRawlargefiles,NDNuMIOnMonfiles,NDNuMIOnMonsmall,NDRecofiles,NDNuMIRecoSMALLfiles,NDSubrun;
412 
413 
414  int run1=NDRunL;
415  int run2=NDRunH+1;
416  int nbins=NDRunH-NDRunL;
417 
418  THStack *DDALarplusSmall = new THStack ("DDALarplusSmall",";Run Number; Number of Subruns");
419 
420  THStack *DDAOnMonLarplusSmall = new THStack ("DDAOnMonLarplusSmall",";Run Number; Number of Subruns");
421 
422  THStack *NDNuMILarplusSmall = new THStack ("NDNuMILarplusSmall",";Run Number; Number of Subruns");
423 
424  THStack *NDNuMIOnMonLarplusSmall = new THStack ("NDNuMIOnMonLarplusSmall",";Run Number; Number of Subruns");
425 
426  TH1F *DDActivity1Recofiles = new TH1F("DDActivity1Recofiles","Nearline NearDet DDActivity1 Trigger: Last 7 days",nbins,run1,run2);
427 
428  TH1F *RecoDDActivity1smallfiles = new TH1F("RecoDDActivity1smallfiles"," ",nbins,run1,run2);
429 
430 
431  TH1F *DBndsubrun = new TH1F("DBndsubrun","", nbins,run1, run2);
432 
433  TH1F *DDActivity1OnMonfiles = new TH1F("DDActivity1OnMonfiles",";Run Number; Number of Subruns",nbins,run1,run2);
434 
435  TH1F *DDActivity1OnMonsmallfiles = new TH1F("DDActivity1OnMonsmallfiles",";Run Number; Number of Subruns",nbins,run1,run2);
436 
437  TH1F *DDActivity1Rawlargefiles = new TH1F("DDActivity1Rawlargefiles","",nbins,run1,run2);
438 
439 
440  TH1F *NDNuMIRecofiles = new TH1F("NDNuMIRecofiles","Nearline NearDet NuMI Trigger: Last 7 days",nbins,run1,run2);
441 
442  TH1F *NearNuMIRecoSMALLfiles = new TH1F("NearNuMIRecoSMALLfiles","", nbins,run1,run2);
443 
444  TH1F *NuMIOnMonfiles = new TH1F("NuMIOnMonfiles",";Run Number; Number of Subruns",nbins,run1,run2);
445 
446  TH1F *NuMIOnMonsmallfiles = new TH1F("NuMIOnMonsmallfiles",";Run Number; Number of Subruns",nbins,run1,run2);
447 
448  TH1F *NearNuMIRawlargefiles = new TH1F("NearNuMIRawlargefiles","",nbins,run1,run2);
449 
450 
451 
452  TH1F *DBndsubrun1 = new TH1F("DBndsubrun1","", nbins,run1, run2);
453 
454 
455  while(1)
456  {
457  ND>>NDRunnum>>RAWDDAlargefiles>>DDAOnMon>>DDAOnMonsmall>>RecoDDAfiles>>RecoDDAsmall>>NDNuMIRawlargefiles>>NDNuMIOnMonfiles>>NDNuMIOnMonsmall>>NDRecofiles>>NDNuMIRecoSMALLfiles>>NDSubrun;
458 
459  if(!ND.good())break;
460 
461  DDActivity1Recofiles->SetBinContent(DDActivity1Recofiles->FindBin(NDRunnum),RecoDDAfiles);
462  RecoDDActivity1smallfiles->SetBinContent(RecoDDActivity1smallfiles->FindBin(NDRunnum),RecoDDAsmall);
463 
464  DDActivity1OnMonfiles->SetBinContent(DDActivity1OnMonfiles->FindBin(NDRunnum),DDAOnMon);
465 
466  DDActivity1OnMonsmallfiles->SetBinContent(DDActivity1OnMonsmallfiles->FindBin(NDRunnum),DDAOnMonsmall);
467 
468 
469  DDActivity1Rawlargefiles->SetBinContent(DDActivity1Rawlargefiles->FindBin(NDRunnum),RAWDDAlargefiles);
470 
471 
472  DBndsubrun->SetBinContent(DBndsubrun->FindBin(NDRunnum),NDSubrun);
473 
474  NDNuMIRecofiles->SetBinContent(NDNuMIRecofiles->FindBin(NDRunnum),NDRecofiles);
475 
476 
477  NearNuMIRecoSMALLfiles->SetBinContent(NearNuMIRecoSMALLfiles->FindBin(NDRunnum),NDNuMIRecoSMALLfiles);
478 
479 
480  NuMIOnMonfiles->SetBinContent(NuMIOnMonfiles->FindBin(NDRunnum),NDNuMIOnMonfiles);
481 
482  NuMIOnMonsmallfiles->SetBinContent(NuMIOnMonsmallfiles->FindBin(NDRunnum),NDNuMIOnMonsmall);
483 
484 
485  NearNuMIRawlargefiles->SetBinContent(NearNuMIRawlargefiles->FindBin(NDRunnum),NDNuMIRawlargefiles);
486 
487 
488 
489 
490  DBndsubrun1->SetBinContent(DBndsubrun1->FindBin(NDRunnum),NDSubrun);
491 
492 
493  }
494 
495  TCanvas *ddareco = new TCanvas ("ddareco","",700,700);
496 
497 
498  DDActivity1Recofiles->SetFillColor(kAzure+1);
499  DDActivity1Recofiles->SetLineColor(kAzure+1);
500 
501  RecoDDActivity1smallfiles->SetFillStyle(3001);
502  RecoDDActivity1smallfiles->SetFillColor(kAzure+1);
503  RecoDDActivity1smallfiles->SetLineColor(kAzure+1);
504 
505 
506  DBndsubrun->SetLineColor(kBlack);
507  DBndsubrun->SetLineWidth(3);
508  DDActivity1Rawlargefiles->SetLineColor(kRed);
509  DDActivity1Rawlargefiles->SetLineWidth(3);
510 
511 
512  DDALarplusSmall->Add(DDActivity1Recofiles);
513  DDALarplusSmall->Add(RecoDDActivity1smallfiles);
514  DDALarplusSmall->Draw();
515  DDALarplusSmall->SetMaximum(40);
516  DDALarplusSmall->SetMinimum(0);
517  DDActivity1Rawlargefiles->Draw("SAME");
518  DBndsubrun->Draw("SAME");
519 
520  auto leg2 = new TLegend(0.12,0.75,0.45,0.9);
521  leg2->SetTextFont(62);
522  leg2->SetLineColor(1);
523  leg2->SetLineStyle(1);
524  leg2->SetLineWidth(3);
525  leg2->SetFillColor(0);
526  leg2->SetFillStyle(1001);
527  leg2->SetShadowColor(0);
528  leg2->SetDrawOption(0);
529  leg2->SetBorderSize(0);
530  leg2->SetTextSize(0.02);
531  leg2->AddEntry("DDActivity1Recofiles","DDActivity1 Reco files","f");
532  leg2->AddEntry("RecoDDActivity1smallfiles","DDActivity1 Reco smallfiles","f");
533  leg2->AddEntry("DDActivity1Rawlargefiles","DDActivity1 Raw files","l");
534 
535  leg2->AddEntry("DBndsubrun","DB Subrun","l");
536  leg2->Draw("SAME");
537 
538  UpdateTextND->Draw();
539 
540  TCanvas *DDAOnmonfiles = new TCanvas ("DDAOnmonfiles","",700,700);
541 
542 
543  DDActivity1OnMonfiles->SetFillColor(kOrange-2);
544  DDActivity1OnMonfiles->SetLineColor(kOrange-2);
545 
546  DDActivity1OnMonsmallfiles->SetFillStyle(3001);
547  DDActivity1OnMonsmallfiles->SetFillColor(kOrange-2);
548  DDActivity1OnMonsmallfiles->SetLineColor(kOrange-2);
549 
550  DBndsubrun->SetLineColor(kBlack);
551  DBndsubrun->SetLineWidth(3);
552  DDActivity1Rawlargefiles->SetLineColor(kRed);
553  DDActivity1Rawlargefiles->SetLineWidth(3);
554 
555  DDAOnMonLarplusSmall->Add(DDActivity1OnMonfiles);
556  DDAOnMonLarplusSmall->Add(DDActivity1OnMonsmallfiles);
557  DDAOnMonLarplusSmall->Draw();
558 
559 
560  DDAOnMonLarplusSmall->SetMaximum(40);
561  DDAOnMonLarplusSmall->SetMinimum(0);
562  DDActivity1Rawlargefiles->Draw("SAME");
563  DBndsubrun->Draw("SAME");
564 
565 
566  auto leg6 = new TLegend(0.12,0.75,0.45,0.9);
567  leg6->SetTextFont(62);
568  leg6->SetLineColor(1);
569  leg6->SetLineStyle(1);
570  leg6->SetLineWidth(3);
571  leg6->SetFillColor(0);
572  leg6->SetFillStyle(1001);
573  leg6->SetShadowColor(0);
574  leg6->SetDrawOption(0);
575  leg6->SetBorderSize(0);
576  leg6->SetTextSize(0.02);
577  leg6->AddEntry("DDActivity1OnMonfiles","DDActivity1 OnMon files","f");
578  leg6->AddEntry("DDActivity1OnMonsmallfiles","DDActivity1 OnMon SMALL files","f");
579  leg6->AddEntry("DDActivity1Rawlargefiles","DDActivity1 Raw files","l");
580  leg6->AddEntry("DBndsubrun","DB Subrun","l");
581  leg6->Draw();
582 
583  UpdateTextND->Draw();
584 
585  TCanvas *ndnumireco = new TCanvas ("ndnumireco","",700,700);
586 
587  NDNuMIRecofiles->SetFillColor(kAzure+1);
588  NDNuMIRecofiles->SetLineColor(kAzure+1);
589 
590  NearNuMIRecoSMALLfiles->SetFillStyle(3001);
591  NearNuMIRecoSMALLfiles->SetFillColor(kAzure+1);
592  NearNuMIRecoSMALLfiles->SetLineColor(kAzure+1);
593 
594 
595  DBndsubrun1->SetLineColor(kBlack);
596  DBndsubrun1->SetLineWidth(3);
597  NearNuMIRawlargefiles->SetLineColor(kRed);
598  NearNuMIRawlargefiles->SetLineWidth(3);
599 
600  NDNuMILarplusSmall->Add(NDNuMIRecofiles);
601  NDNuMILarplusSmall->Add(NearNuMIRecoSMALLfiles);
602  NDNuMILarplusSmall->Draw();
603  NDNuMILarplusSmall->SetMaximum(40);
604  NDNuMILarplusSmall->SetMinimum(0);
605 
606  NearNuMIRawlargefiles->Draw("SAME");
607  DBndsubrun1->Draw("SAME");
608 
609  auto leg3 = new TLegend(0.12,0.75,0.45,0.9);
610  leg3->SetTextFont(62);
611  leg3->SetLineColor(1);
612  leg3->SetLineStyle(1);
613  leg3->SetLineWidth(3);
614  leg3->SetFillColor(0);
615  leg3->SetFillStyle(1001);
616  leg3->SetShadowColor(0);
617  leg3->SetDrawOption(0);
618  leg3->SetBorderSize(0);
619  leg3->SetTextSize(0.02);
620  leg3->AddEntry("NDNuMIRecofiles","NuMI Reco files","f");
621  leg3->AddEntry("NearNuMIRecoSMALLfiles","NuMI Reco SMALL files","f");
622  leg3->AddEntry("NearNuMIRawlargefiles","NuMI Raw files","l");
623  leg3->AddEntry("DBndsubrun1","DB Subrun","l");
624  leg3->Draw();
625 
626  UpdateTextND->Draw();
627 
628  TCanvas *NDNuMIOnmon = new TCanvas("NDNuMIOnmon","",700,700);
629 
630  NuMIOnMonfiles->SetFillColor(kOrange-2);
631  NuMIOnMonfiles->SetLineColor(kOrange-2);
632 
633  NuMIOnMonsmallfiles->SetFillStyle(3001);
634  NuMIOnMonsmallfiles->SetFillColor(kOrange-2);
635  NuMIOnMonsmallfiles->SetLineColor(kOrange-2);
636 
637  DBndsubrun1->SetLineColor(kBlack);
638  DBndsubrun1->SetLineWidth(3);
639  NearNuMIRawlargefiles->SetLineColor(kRed);
640  NearNuMIRawlargefiles->SetLineWidth(3);
641 
642  NDNuMIOnMonLarplusSmall->Add(NuMIOnMonfiles);
643  NDNuMIOnMonLarplusSmall->Add(NuMIOnMonsmallfiles);
644  NDNuMIOnMonLarplusSmall->Draw();
645 
646 
647  NDNuMIOnMonLarplusSmall->SetMaximum(40);
648  NDNuMIOnMonLarplusSmall->SetMinimum(0);
649  NearNuMIRawlargefiles->Draw("SAME");
650  DBndsubrun1->Draw("same");
651 
652 
653  auto leg7 = new TLegend(0.12,0.75,0.45,0.9);
654  leg7->SetTextFont(62);
655  leg7->SetLineColor(1);
656  leg7->SetLineStyle(1);
657  leg7->SetLineWidth(3);
658  leg7->SetFillColor(0);
659  leg7->SetFillStyle(1001);
660  leg7->SetShadowColor(0);
661  leg7->SetDrawOption(0);
662  leg7->SetBorderSize(0);
663  leg7->SetTextSize(0.02);
664  leg7->AddEntry("NuMIOnMonfiles","NuMI OnMon files","f");
665  leg7->AddEntry("NuMIOnMonsmallfiles","NuMI OnMon SMALL files","f");
666  leg7->AddEntry("NearNuMIRawlargefiles","NuMI Raw files","l");
667  leg7->AddEntry("DBndsubrun1","DB Subrun","l");
668  leg7->Draw();
669 
670  UpdateTextND->Draw();
671 
672  DDAOnmonfiles->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/NearDet-DDA-P1NearlineOnMonFilesDay.png");
673  NDNuMIOnmon->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/NearDet-t00-P1NearlineOnMonFilesDay.png");
674  ddareco->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/NearDet-DDA-P1NearlineRecoFilesDay.png");
675  ndnumireco->Print("/nusoft/app/web/htdoc/nova/datacheck/nearline/plots/NearDet-t00-P1NearlineRecoFilesDay.png");
676 
677  ND.close();
678 
679 }
680 
681 
enum BeamMode kOrange
UInt_t LastSR
Definition: AnaPlotMaker.h:50
enum BeamMode kRed
TDatime * TNow
Definition: AnaPlotMaker.h:41
Int_t par
Definition: SimpleIterate.C:24
TLegend * leg1
Definition: plot_hist.C:105
TDatime * SRtime
Definition: AnaPlotMaker.h:42
const int nbins
Definition: cellShifts.C:15
UInt_t LastRun
Definition: AnaPlotMaker.h:49
void Nearline_Watchdog_Plots(int FDRunL, int FDRunH, int NDRunL, int NDRunH)
Definition: run.py:1
TDatime * TNowGMT
Definition: AnaPlotMaker.h:40
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
ifstream in
Definition: comparison.C:7
Int_t GMToffset
Definition: AnaPlotMaker.h:43
static constexpr Double_t year
Definition: Munits.h:185