18 TPaveText *
UpdateText =
new TPaveText(0.1, 0.0, 0.5, 0.05,
"NDC");
19 TPaveText *
WarningText =
new TPaveText(0.15, 0.15, 0.9, 0.3,
"NDC");
23 float *zoom, UInt_t timeago, UInt_t XNow,
int mode,
char *saveme,
int timeperiod)
27 TDatime
now,nowlocal,tstart,tend;
28 now.Set(now.Convert(kTRUE));
29 nowlocal.Set(nowlocal.Convert(kFALSE));
30 int houroffset = now.GetHour()-nowlocal.GetHour();
31 if (houroffset < -12 ) houroffset+=24;
32 cout <<
"using houroffset " << houroffset <<
endl ;
35 TGaxis *
axis,*zoomaxis;
41 TGraph *
g =
new TGraph();
48 TCanvas *c0 =
new TCanvas(
"c0",
"c0",1200,800);
50 cout <<
"Plotting with_zoom branchname = " << branchname <<
endl;
52 sprintf(drawme,
"%s:Time_%s.Convert(kFALSE)-2*60*60*%d", branchname, branchname,houroffset);
56 if ( t->GetBranch(branchname) == 0 )
58 cout <<
"Branch " << branchname <<
" does not exist " <<
endl;
61 int nentries = t->GetBranch(branchname)->GetEntries();
63 double *
v = t->GetV1();
65 if(*(std::min_element(v, v+nentries)) < zoom[0]) zoom[0] = *(std::min_element(v, v+nentries));
66 if(*(std::max_element(v, v+nentries)) > zoom[1]) zoom[1] = *(std::max_element(v, v+nentries));
68 double *
times = t->GetV2();
69 g =
new TGraph(nentries,times,v);
71 if(color==10)color=95;
72 if(color==12)color=50;
73 g->SetMarkerColor(color);
74 g->SetLineColor(color);
75 g->SetMarkerStyle(marker);
77 if(mode==0 || mode==3)
80 g->SetMinimum(ylimit[0]);
81 g->SetMaximum(ylimit[1]);
84 g->GetXaxis()->SetTimeDisplay(1);
85 g->GetXaxis()->SetTimeOffset(0,
"gmt");
86 g->GetXaxis()->SetLabelSize(0.03);
90 if(timeperiod == 0) g->GetXaxis()->SetTimeFormat(
"%H:%M");
91 else g->GetXaxis()->SetTimeFormat(
"%m/%d");
92 g->GetXaxis()->SetLimits(timeago-houroffset*60*60,XNow-houroffset*60*60);
93 g->GetYaxis()->SetTitleOffset(1.5);
108 int goodNEntries = 0;
110 if(timeperiod == 0) goodNEntries = 23;
111 else if(timeperiod == 1) goodNEntries = 23*7;
112 else if(timeperiod == 2) goodNEntries = 23*7*30;
114 if(timeperiod == 0) goodNEntries = 1;
115 else if(timeperiod == 1) goodNEntries = 1;
116 else if(timeperiod == 2) goodNEntries = 1;
117 if(nentries < goodNEntries && mode != 3)
128 sprintf(buff1,
"Warning: check for missing entries in:");
132 sprintf(buff2,
"%s", branchname);
137 if(mode==2 || mode==3)
144 if(timeperiod == 0) sprintf(savename,
"%sDay.png", saveme);
145 if(timeperiod == 1) sprintf(savename,
"%sWeek.png", saveme);
146 if(timeperiod == 2) sprintf(savename,
"%sMonth.png", saveme);
149 TGraph *g1 =
new TGraph();
150 g1 = (TGraph*)gPad->GetPrimitive(
"Graph");
152 char*
newtitle = strrchr(title,
';');
154 if(title[strlen(title)-2] ==
'C' || title[strlen(title)-2] ==
'F')
159 newtitle = newtitle+1;
162 if(title[strlen(title)-2] ==
'F')
164 axis =
new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),gPad->GetUxmax(),gPad->GetUymax(),(gPad->GetUymin()-32)/1.8,(gPad->GetUymax()-32)/1.8,510,
"+L");
167 newtitle[strlen(newtitle)-2] =
'C';
169 else if(title[strlen(title)-2] ==
'C')
171 axis =
new TGaxis(gPad->GetUxmax(),gPad->GetUymin(),gPad->GetUxmax(),gPad->GetUymax(),(gPad->GetUymin()*1.8)+32,(gPad->GetUymax()*1.8)+32,510,
"+L");
175 newtitle[strlen(newtitle)-2] =
'F';
178 axis->SetTitle(newtitle);
179 axis->SetTitleSize(g->GetYaxis()->GetTitleSize());
180 axis->SetLabelSize(g->GetYaxis()->GetLabelSize());
181 axis->SetTitleFont(g->GetYaxis()->GetTitleFont());
182 axis->SetLabelFont(g->GetYaxis()->GetTitleFont());
183 axis->SetTitleOffset(1.5);
187 c1->SaveAs(savename);
191 g1->SetMinimum(zoom[0] - (zoom[1]-zoom[0])*0.10);
192 g1->SetMaximum(zoom[1] + (zoom[1]-zoom[0])*0.10);
198 if(title[strlen(title)-2] ==
'C' || title[strlen(title)-2] ==
'F')
202 if(newtitle[strlen(newtitle)-2] ==
'C')
203 zoomaxis =
new TGaxis( gPad->GetUxmax(),g1->GetMinimum(),gPad->GetUxmax(),g1->GetMaximum(),(g1->GetMinimum()-32)/1.8,(g1->GetMaximum()-32)/1.8,510,
"+L");
204 else if(newtitle[strlen(newtitle)-2] ==
'F')
205 zoomaxis =
new TGaxis( gPad->GetUxmax(),g1->GetMinimum(),gPad->GetUxmax(), g1->GetMaximum(),(g1->GetMinimum()*1.8)+32,(g1->GetMaximum()*1.8)+32,510,
"+L");
206 zoomaxis->SetTitle(newtitle);
207 zoomaxis->SetTitleSize(g->GetYaxis()->GetTitleSize());
208 zoomaxis->SetLabelSize(g->GetYaxis()->GetLabelSize());
209 zoomaxis->SetTitleFont(g->GetYaxis()->GetTitleFont());
210 zoomaxis->SetLabelFont(g->GetYaxis()->GetLabelFont());
212 zoomaxis->SetTitleOffset(1.5);
222 if(timeperiod == 0) sprintf(savename,
"%szoomDay.png", saveme);
223 else if(timeperiod == 1) sprintf(savename,
"%szoomWeek.png", saveme);
224 else if(timeperiod == 2) sprintf(savename,
"%szoomMonth.png", saveme);
226 c1->SaveAs(savename);
239 void plot_strain_with_zoom(TTree *
t,
char *branchname,
int x,
int y,
int marker, TCanvas *
c1,
char *
title,
float *ylimit,
float *zoom,
int timeago,
int XNow,
int mode,
char *saveme,
int timeperiod)
242 TDatime
now,nowlocal;
243 now.Set(now.Convert(kTRUE));
244 nowlocal.Set(nowlocal.Convert(kFALSE));
245 int houroffset = now.GetHour()-nowlocal.GetHour();
246 if (houroffset < -12 ) houroffset+=24;
255 TCanvas *c0 =
new TCanvas(
"c0");
257 cout <<
"Plotting strain branchname = " << branchname <<
endl;
260 sprintf(drawme,
"%s1:Time_%s1.Convert(kFALSE)-60*60*%d", branchname, branchname,houroffset);
263 char realbranchname[20];
264 sprintf(realbranchname,
"%s1",branchname);
265 int nentries = t->GetBranch(realbranchname)->GetEntries();
266 double *v1 = t->GetV1();
267 double *
times = t->GetV2();
269 sprintf(drawme,
"%s2:Time_%s2.Convert(kFALSE)-60*60*%d", branchname, branchname,houroffset);
272 double *v2 = t->GetV1();
274 sprintf(drawme,
"%s3:Time_%s3.Convert(kFALSE)-60*60*%d", branchname, branchname,houroffset);
277 double *v3 = t->GetV1();
283 if(v1[entry] < zoom[0]) zoom[0] = v1[
entry];
284 if(v1[entry] > zoom[1]) zoom[1] = v1[
entry];
288 TGraph *
g =
new TGraph(nentries, times, v1);
291 if(branchname[2] ==
'N')
293 if(x==1)g->SetMarkerColor(
kGreen+y-1);
294 if(x==2)g->SetMarkerColor(
kRed+y-1);
295 if(x==3)g->SetMarkerColor(kGray+y-1);
296 if(x==4)g->SetMarkerColor(kCyan+y-1);
297 if(x==5)g->SetMarkerColor(
kBlue+y-1);
298 if(x==6)g->SetMarkerColor(kMagenta+y-1);
302 if(y==1)g->SetMarkerColor(
kRed+3*(x-1));
303 if(y==2)g->SetMarkerColor(
kGreen+3*(x-1));
304 if(y==3)g->SetMarkerColor(
kBlue+3*(x-1));
306 g->SetLineColor(g->GetMarkerColor());
307 g->SetMarkerStyle(marker);
312 g->SetMinimum(ylimit[0]);
313 g->SetMaximum(ylimit[1]);
316 g->GetXaxis()->SetTimeDisplay(1);
317 g->GetXaxis()->SetLabelSize(0.03);
318 if(timeperiod == 0) g->GetXaxis()->SetTimeFormat(
"%H:%M");
319 else g->GetXaxis()->SetTimeFormat(
"%m/%d");
320 g->GetXaxis()->SetLimits(timeago,XNow);
321 g->GetYaxis()->SetTitleOffset(1.5);
334 if(timeperiod == 0) sprintf(savename,
"%sDay.png", saveme);
335 else if(timeperiod == 1) sprintf(savename,
"%sWeek.png", saveme);
336 else if(timeperiod == 2) sprintf(savename,
"%sMonth.png", saveme);
340 TGraph *g1 =
new TGraph();
341 g1 = (TGraph*)gPad->GetPrimitive(
"Graph");
343 c1->SaveAs(savename);
347 g1->SetMinimum(zoom[0] - (zoom[1]-zoom[0])*0.1);
348 g1->SetMaximum(zoom[1] + (zoom[1]-zoom[0])*0.1);
356 if(timeperiod == 0) sprintf(savename,
"%szoomDay.png", saveme);
357 else if(timeperiod == 1) sprintf(savename,
"%szoomWeek.png", saveme);
358 else if(timeperiod == 2) sprintf(savename,
"%szoomMonth.png", saveme);
359 c1->SaveAs(savename);
376 if(timeperiodname.compare(
"day") == 0) {
379 }
else if(timeperiodname.compare(
"week") == 0) {
382 }
else if(timeperiodname.compare(
"month") == 0) {
386 std::cout <<
"Macro should take input of 'day', 'week', or 'month'. \n" 387 <<
"You have input '" << timeperiodname
388 <<
"'\nSomething's wrong. Abort.";
392 if(detectorname.compare(
"ND") == 0) {
395 }
else if(detectorname.compare(
"FD") == 0) {
399 std::cout <<
"Macro should take input of 1 for ND, 2 for FD" 400 <<
"You have input " << detector
401 <<
"... Something's wrong. Abort.";
405 gStyle->SetPalette(55);
406 gStyle->SetMarkerStyle(7);
407 gStyle->SetFillStyle(0);
413 if(timeperiod == 0) f =
new TFile(
"trees/dcs_db_readout_multichan_day_ND.root",
"read");
414 else if(timeperiod == 1) f =
new TFile(
"trees/dcs_db_readout_multichan_week_ND.root",
"read");
415 else if(timeperiod == 2) f =
new TFile(
"trees/dcs_db_readout_multichan_month_ND.root",
"read");
416 }
else if(detector == 2) {
417 if(timeperiod == 0) f =
new TFile(
"trees/dcs_db_readout_multichan_day_FD.root",
"read");
418 else if(timeperiod == 1) f =
new TFile(
"trees/dcs_db_readout_multichan_week_FD.root",
"read");
419 else if(timeperiod == 2) f =
new TFile(
"trees/dcs_db_readout_multichan_month_FD.root",
"read");
422 TTree *
t = (TTree*)f->Get(
"dcs_db_tree");
423 TCanvas *
c1 =
new TCanvas(
"c1",
"c1",1200,800);
424 TCanvas *
c2 =
new TCanvas(
"c2",
"c2",1200,800);
437 if(timeperiod == 0) filepath =
"dayplots/NearDet-";
438 else if(timeperiod == 1) filepath =
"weekplots/NearDet-";
439 else if(timeperiod == 2) filepath =
"monthplots/NearDet-";
440 }
else if(detector == 2){
442 if(timeperiod == 0) filepath =
"dayplots/FarDet-";
443 else if(timeperiod == 1) filepath =
"weekplots/FarDet-";
444 else if(timeperiod == 2) filepath =
"monthplots/FarDet-";
452 float zoom[2] = {99999, -99999};
453 float zoom2[2] = {99999, -99999};
456 t->UseCurrentStyle();
462 TDatime *
TNow =
new TDatime;
466 TNow->Set(TNow->GetYear(),TNow->GetMonth(),TNow->GetDay(),TNow->GetHour()+1,0,0);
470 UInt_t XNow = TNow->Convert(kFALSE);
478 if(timeperiod == 0) timeago = XNow - 60*60*24;
479 else if(timeperiod == 1) timeago = XNow - 60*60*24*7;
480 else if(timeperiod == 2) timeago = XNow - 60*60*24*30;
491 TDatime *Tfinish =
new TDatime;
499 sprintf(buff1,
"Last updated on: %s (central time)", Tfinish->AsString());
504 if(detector == 1) ndiblocks = 4;
505 else if(detector == 2) ndiblocks = 14;
510 if(detector == 1) ndevices = 4;
511 else if(detector == 2) ndevices = 12;
518 for(
int meas = 0;meas<nmeas;meas++)
520 if(meas == 0)strcpy(measstr,
"");
521 if(meas == 1)strcpy(measstr,
"MC");
522 if(meas == 2)strcpy(measstr,
"MV");
523 if(meas == 3)strcpy(measstr,
"TP");
525 for(
int ps = 0;
ps<nps;
ps++)
530 if(detector == 1 &&
diblock == 4)
537 else sprintf(name,
"%c%i", lmh[ps],
diblock);
544 sprintf(title,
"Low V power supply, diblock %i: Voltage at device;;Voltage (V)",
diblock);
545 sprintf(title2,
"Low V power supply: Voltage at device;;Voltage (V)",
diblock);
550 sprintf(title,
"Medium V power supply, diblock %i: Voltage at device;;Voltage (V)",
diblock);
551 sprintf(title2,
"Medium V power supply: Voltage at device;;Voltage (V)",
diblock);
556 sprintf(title,
"High V power supply, diblock %i: Voltage at device;;Voltage (V)",
diblock);
557 sprintf(title2,
"High V power supply: Voltage at device;;Voltage (V)",
diblock);
566 sprintf(title,
"Low V power supply, diblock %i: Current;;Current (mA)",
diblock);
567 sprintf(title2,
"Low V power supply: Current;;Current (mA)",
diblock);
572 sprintf(title,
"Medium V power supply, diblock %i: Current;;Current (mA)",
diblock);
573 sprintf(title2,
"Medium V power supply: Current;;Current (mA)",
diblock);
578 sprintf(title,
"High V power supply, diblock %i: Current;;Current (A)",
diblock);
579 sprintf(title2,
"High V power supply: Current;;Current (A)",
diblock);
588 sprintf(title,
"Low V power supply, diblock %i: Voltage at source;;Voltage (V)",
diblock);
589 sprintf(title2,
"Low V power supply: Voltage at source;;Voltage (V)",
diblock);
594 sprintf(title,
"Medium V power supply, diblock %i: Voltage at source;;Voltage (V)",
diblock);
595 sprintf(title2,
"Medium V power supply: Voltage at source;;Voltage (V)",
diblock);
600 sprintf(title,
"High V power supply, diblock %i: Voltage at source;;Voltage (V)",
diblock);
601 sprintf(title2,
"High V power supply: Voltage at source;;Voltage (V)",
diblock);
610 sprintf(title,
"Low V power supply, diblock %i: Temperature;;Temperature (C)",
diblock);
611 sprintf(title2,
"Low V power supply: Temperature;;Temperature (C)",
diblock);
616 sprintf(title,
"Medium V power supply, diblock %i: Temperature;;Temperature (C)",
diblock);
617 sprintf(title2,
"Medium V power supply: Temperature;;Temperature (C)",
diblock);
622 sprintf(title,
"High V power supply, diblock %i: Temperature;;Temperature (C)",
diblock);
623 sprintf(title2,
"High V power supply: Temperature;;Temperature (C)",
diblock);
629 sprintf(saveme,
"%s%s%s", filepath, name, measstr);
630 sprintf(saveme2,
"%s%c%s", filepath, lmh[ps], measstr);
632 for(
int device=1;device<ndevices+1;device++)
639 if(device<10) sprintf(branchname,
"%s0%i%s", name, device, measstr);
640 else sprintf(branchname,
"%s%i%s", name, device, measstr);
642 plot_with_zoom(t, branchname, device, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
644 plot_with_zoom(t, branchname, device, 19+
diblock, c2, title2, ylimit, zoom2, timeago, XNow, mode2, saveme2, timeperiod);
653 if(detector == 1) ndevices = 4;
654 else if(detector == 2) ndevices = 12;
707 sprintf(title,
"Rack Air Flow");
710 sprintf(saveme,
"%sAirFlow", filepath);
712 sprintf(branchname,
"ENNALV1");
714 plot_with_zoom(t, branchname, 1, 20, c1, title, ylimit, zoom, timeago, XNow, 0, saveme, timeperiod);
715 sprintf(branchname,
"ENNALV2");
717 plot_with_zoom(t, branchname, 2, 20, c1, title, ylimit, zoom, timeago, XNow, 1, saveme, timeperiod);
718 sprintf(branchname,
"ENNAHV1");
720 plot_with_zoom(t, branchname, 3, 20, c1, title, ylimit, zoom, timeago, XNow, 2, saveme, timeperiod);
732 for(
int iter=0;iter<nmeas;iter++)
736 sprintf(title,
"Dewpoint;;Dewpoint (C)");
739 sprintf(saveme,
"%sDewPoint", filepath);
743 sprintf(title,
"Humidity;;Humidity (%)");
746 sprintf(saveme,
"%sHumidity", filepath);
749 sprintf(branchname,
"ENN%cDB1", dh[iter]);
751 plot_with_zoom(t, branchname, 1, 20, c1, title, ylimit, zoom, timeago, XNow, 0, saveme, timeperiod);
752 sprintf(branchname,
"ENN%cDB2", dh[iter]);
754 plot_with_zoom(t, branchname, 2, 20, c1, title, ylimit, zoom, timeago, XNow, 1, saveme, timeperiod);
755 sprintf(branchname,
"ENN%cDB3", dh[iter]);
757 plot_with_zoom(t, branchname, 3, 20, c1, title, ylimit, zoom, timeago, XNow, 1, saveme, timeperiod);
758 sprintf(branchname,
"ENN%cDME", dh[iter]);
760 plot_with_zoom(t, branchname, 4, 20, c1, title, ylimit, zoom, timeago, XNow, 1, saveme, timeperiod);
761 sprintf(branchname,
"ENN%cDMN", dh[iter]);
763 plot_with_zoom(t, branchname, 5, 20, c1, title, ylimit, zoom, timeago, XNow, 2, saveme, timeperiod);
769 else if(detector == 2){
770 sprintf(measstr,
"HT");
773 for(
int iter = 0;iter<nmeas;iter++)
779 sprintf(title,
"Dewpoint;;Dewpoint (F)");
785 sprintf(title,
"Temperature;;Temperature (F)");
787 sprintf(name,
"E%cL", measstr[iter]);
789 if(iter==0)sprintf(saveme,
"%sDewPoint", filepath);
790 else sprintf(saveme,
"%sTemperature", filepath);
792 sprintf(branchname,
"%s101", name);
793 plot_with_zoom(t, branchname, 1, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
795 sprintf(branchname,
"%s102", name);
796 plot_with_zoom(t, branchname, 2, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
797 sprintf(branchname,
"%s103", name);
798 plot_with_zoom(t, branchname, 3, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
802 sprintf(branchname,
"%sL0ME", name);
803 plot_with_zoom(t, branchname, 95, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
804 sprintf(branchname,
"%sL0NE", name);
805 plot_with_zoom(t, branchname, 11, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
806 sprintf(branchname,
"%sL0SE", name);
807 plot_with_zoom(t, branchname, 14, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
810 sprintf(branchname,
"%sL0MW", name);
811 plot_with_zoom(t, branchname, 4, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
812 sprintf(branchname,
"%sL0NW", name);
813 plot_with_zoom(t, branchname, 5, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
814 sprintf(branchname,
"%sL0SW", name);
815 plot_with_zoom(t, branchname, 6, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
845 sprintf(branchname,
"%sL4MW", name);
846 plot_with_zoom(t, branchname, 7, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
847 sprintf(branchname,
"%sL4NW", name);
848 plot_with_zoom(t, branchname, 8, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
849 sprintf(branchname,
"%sL4SW", name);
851 plot_with_zoom(t, branchname, 9, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
859 sprintf(title,
"Status of systems");
862 sprintf(saveme,
"%sStatuses", filepath);
865 for(
int dastatus=1;dastatus<ndastatuses+1;dastatus++)
868 sprintf(branchname,
"ENNDAS%i",dastatus);
869 if(dastatus==ndastatuses)mode = 2;
870 plot_with_zoom(t, branchname, dastatus, 20, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
880 char side[4] =
"WNS";
888 for(
int iter=0;iter<nsides;iter++)
900 if(
block == 0)sprintf(realblock,
"00");
901 if(
block == 1)sprintf(realblock,
"01");
902 if(
block == 2)sprintf(realblock,
"08");
903 if(
block == 3)sprintf(realblock,
"09");
904 if(
block == 4)sprintf(realblock,
"18");
905 if(
block == 5)sprintf(realblock,
"19");
906 if(
block == 6)sprintf(realblock,
"26");
907 if(
block == 7)sprintf(realblock,
"27");
909 if(iter==0)sprintf(title,
"Strain measured on West side of blocks;;Micro strain");
910 if(iter==1)sprintf(title,
"Strain measured on North side of blocks;;Micro strain");
928 for(
int x=1;
x<xmax+1;
x++)
931 for(
int y=1;
y<ymax+1;
y++)
933 if(
x==xmax &&
y==ymax) mode = 2;
936 sprintf(branchname,
"%s%i%c%i%i",name,
block,side[iter],
x,
y);
937 sprintf(saveme,
"%s%s%c",filepath, name,side[iter]);
939 plot_strain_with_zoom(t, branchname,
x,
y, marker, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
949 gStyle->SetMarkerSize(2);
956 gStyle->SetMarkerSize(1);
965 sprintf(saveme,
"%sDist%c", filepath, side[iter+1]);
970 if((
block==0 && iter==1) || (
block==27 && iter==0) || (
block==28 && iter==1))
continue;
972 if(iter==0) sprintf(title,
"Distance from original position (North side of blocks);;Distance (inches)");
973 if(iter==1) sprintf(title,
"Distance from original position (South side of blocks);;Distance (inches)");
976 else if (
block < 28) sprintf(name,
"ED%i",
block);
977 else sprintf(name,
"EDSB");
983 for(
int x=1;
x<xmax+1;
x++)
985 if(iter == 1 &&
x == 2)
988 if(
block==nblocks-2)mode = 2;
991 sprintf(branchname,
"%s%c%i1", name, side[iter+1],
x);
992 plot_with_zoom(t, branchname, col2, marker, c2, title, ylimit, zoom2, timeago, XNow, mode, saveme, timeperiod);
995 if(col2==910)col2=920;
999 if(
block!=28)sprintf(branchname,
"%s%c%i9",name, side[iter+1],
x);
1002 sprintf(branchname,
"%s%c%i6",name, side[iter+1],
x);
1003 if(
x==xmax &&
block==nblocks-1)mode = 2;
1005 plot_with_zoom(t, branchname, col2, marker, c2, title, ylimit, zoom2, timeago, XNow, mode, saveme, timeperiod);
1007 if(col2==910)col2=920;
1014 gStyle->SetMarkerSize(2);
1020 gStyle->SetMarkerSize(1);
1024 gStyle->SetMarkerSize(1);
1033 sprintf(title,
"Internal temperature;;Temperature (C)");
1034 sprintf(saveme,
"%sIntTemp", filepath);
1036 for(
int s=0;
s<nsides;
s++)
1038 if(
s==0) sprintf(name,
"ETN");
1039 else if(
s==1) sprintf(name,
"ETW");
1043 for(
int x=1;
x<xmax+1;
x++)
1045 if(
s==nsides-1 &&
block==nblocks-1 &&
x==xmax) mode = 2;
1047 sprintf(branchname,
"ET%i%c%i1",
block, side[s],
x);
1048 plot_with_zoom(t, branchname, col, 20+
block, c1, title, ylimit, zoom, timeago, XNow, mode, saveme, timeperiod);
1057 sprintf(title,
"Outside air temperature;;Temperature (F)");
1058 sprintf(saveme,
"%sOAT", filepath);
1059 sprintf(branchname,
"EOAT");
1062 plot_with_zoom(t, branchname, 1, 7, c1, title, ylimit, zoom, timeago, XNow, 3, saveme, timeperiod);
1064 sprintf(title,
"Cooling liquid temperature;;Temperature (F)");
1065 sprintf(saveme,
"%sGLYCOT", filepath);
1066 sprintf(branchname,
"EGLYCOT");
1069 plot_with_zoom(t, branchname, 1, 7, c1, title, ylimit, zoom, timeago, XNow, 3, saveme, timeperiod);
1071 sprintf(title,
"High Temperature warning status");
1072 sprintf(saveme,
"%sHTWarn", filepath);
1073 sprintf(branchname,
"EHTWARN");
1076 plot_with_zoom(t, branchname, 1, 7, c1, title, ylimit, zoom, timeago, XNow, 3, saveme, timeperiod);
diblock
print "ROW IS " print row
std::map< std::string, double > xmax
void DCSPlotMaker(string timeperiodname, string detectorname)
void plot_strain_with_zoom(TTree *t, char *branchname, int x, int y, int marker, TCanvas *c1, char *title, float *ylimit, float *zoom, int timeago, int XNow, int mode, char *saveme, int timeperiod)
block
print "ROW IS " print row
void plot_with_zoom(TTree *t, char *branchname, int color, int marker, TCanvas *c1, char *title, float *ylimit, float *zoom, UInt_t timeago, UInt_t XNow, int mode, char *saveme, int timeperiod)