1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Raquel de los Reyes, 01/2004 <mailto:reyes@gae.ucm.es>
|
---|
19 | !
|
---|
20 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
21 | !
|
---|
22 | !
|
---|
23 | \* ======================================================================== *//////////////////////////////////////////////////////////////////////////////
|
---|
24 | //
|
---|
25 | // This macro made the check of the central control files (.rep files).
|
---|
26 | // It displays 5 tabs:
|
---|
27 | // - Drive system
|
---|
28 | // - HV power supplies
|
---|
29 | // - LV power supplies
|
---|
30 | // - Cooling system
|
---|
31 | // - Trigger
|
---|
32 | // - Weather station
|
---|
33 | //
|
---|
34 | ////////////////////////////////////////////////////////////////////////////
|
---|
35 |
|
---|
36 | void CCDataCheck(const TString filename="CC_2003_11_30_20_29_20.root", const TString directory="../rootfiles/2003_12_01/")
|
---|
37 | {
|
---|
38 | //
|
---|
39 | // Check of the raw files
|
---|
40 | //
|
---|
41 | MStatusDisplay *d = new MStatusDisplay;
|
---|
42 | d->SetLogStream(&gLog, kTRUE); // Disables output to stdout
|
---|
43 |
|
---|
44 | //
|
---|
45 | // Create a empty Parameter List and an empty Task List
|
---|
46 | // The tasklist is identified in the eventloop by its name
|
---|
47 | //
|
---|
48 | MParList plist;
|
---|
49 |
|
---|
50 | MTaskList tlist;
|
---|
51 | plist.AddToList(&tlist);
|
---|
52 |
|
---|
53 | //
|
---|
54 | // Now setup the tasks and tasklist:
|
---|
55 | // ---------------------------------
|
---|
56 | //
|
---|
57 |
|
---|
58 | // Set all the MHVsTime classes:
|
---|
59 | // Drive system
|
---|
60 | MHVsTime hZd("MReportDrive.fNominalZd");
|
---|
61 | hZd.SetName("Zd");
|
---|
62 | MHVsTime hAz("MReportDrive.fNominalAz");
|
---|
63 | hAz.SetName("Az");
|
---|
64 | MHVsTime hDState("MReportDrive.fState");
|
---|
65 | hDState.SetName("State");
|
---|
66 | // HV power supplies
|
---|
67 | MHVsTime hHVA("MCameraHV.fVoltageA");
|
---|
68 | hHVA.SetName("HVA");
|
---|
69 | MHVsTime hHVB("MCameraHV.fVoltageB");
|
---|
70 | hHVB.SetName("HVB");
|
---|
71 | MHVsTime hCA("MCameraHV.fCurrentA");
|
---|
72 | hCA.SetName("CA");
|
---|
73 | MHVsTime hCB("MCameraHV.fCurrentB");
|
---|
74 | hCB.SetName("CB");
|
---|
75 | // LV power supplies
|
---|
76 | MHVsTime hLVTemp("MCameraLV.fTemp");
|
---|
77 | hLVTemp.SetName("LVTemp");
|
---|
78 | MHVsTime hLVHum("MCameraLV.fHumidity");
|
---|
79 | hLVHum.SetName("LVHum");
|
---|
80 | MHVsTime hLVStatus("MCameraHV.fStatus");
|
---|
81 | hLVStatus.SetName("LVStatus");
|
---|
82 | MHVsTime hLVRPS("MCameraLV.fRequestPowerSupply");
|
---|
83 | hLVRPS.SetName("LVRPS");
|
---|
84 | // Cooling system
|
---|
85 | MHVsTime hTCenter("MCameraCooling.fTempCenter");
|
---|
86 | hTCenter.SetName("TCenter");
|
---|
87 | MHVsTime hTWall("MCameraCooling.fTempWall");
|
---|
88 | hTWall.SetName("TWall");
|
---|
89 | MHVsTime hTWater("MCameraCooling.fTempWater");
|
---|
90 | hTWater.SetName("TWater");
|
---|
91 | MHVsTime hTOptLink("MCameraCooling.fTempOptLink");
|
---|
92 | hTOptLink.SetName("TOptLink");
|
---|
93 | MHVsTime hHWall("MCameraCooling.fHumWall");
|
---|
94 | hHWall.SetName("HWall");
|
---|
95 | MHVsTime hHCenter("MCameraCooling.fHumCenter");
|
---|
96 | hHCenter.SetName("HCenter");
|
---|
97 | // Weather station
|
---|
98 | MHVsTime hCCHum("MReportCC.fHumidity");
|
---|
99 | hCCHum.SetName("CCHum");
|
---|
100 | MHVsTime hCCTemp("MReportCC.fTemperature");
|
---|
101 | hCCTemp.SetName("CCTemp");
|
---|
102 | MHVsTime hCCWS("MReportCC.fWindSpeed");
|
---|
103 | hCCWS.SetName("CCWS");
|
---|
104 | MHVsTime hCCSR("MReportCC.fSolarRadiation");
|
---|
105 | hCCSR.SetName("CCSR");
|
---|
106 | // Trigger system
|
---|
107 | MHVsTime hTrigBL2("MReportTrigger.fL2BeforePrescaler");
|
---|
108 | hTrigBL2.SetName("TrigBL2");
|
---|
109 | MHVsTime hTrigAL2("MReportTrigger.fL2AfterPrescaler");
|
---|
110 | hTrigAL2.SetName("TrigAL2");
|
---|
111 |
|
---|
112 | // Reads the trees of the root file and the analysed branches
|
---|
113 | MReadReports read;
|
---|
114 | read.AddTree("Drive");
|
---|
115 | read.AddTree("Camera");
|
---|
116 | read.AddTree("CC");
|
---|
117 | read.AddTree("Trigger");
|
---|
118 | read.AddFile(directory+filename); // after the reading of the trees!!!
|
---|
119 | read.AddToBranchList("MReportDrive.*");
|
---|
120 | read.AddToBranchList("MCameraHV.*");
|
---|
121 | read.AddToBranchList("MCameraLV.*");
|
---|
122 | read.AddToBranchList("MCameraCooling.*");
|
---|
123 | read.AddToBranchList("MReportCC.*");
|
---|
124 | read.AddToBranchList("MReportTrigger.*");
|
---|
125 |
|
---|
126 | // Set of MH3 classes
|
---|
127 | MH3 hError("MReportDrive.GetAbsError*60");
|
---|
128 | hError.SetName("DeltaH");
|
---|
129 | MBinning bins("BinningDeltaH");
|
---|
130 | bins.SetEdges(18, 0, 3.6);
|
---|
131 | plist.AddToList(&bins);
|
---|
132 | MH3 hError2("MReportDrive.fNominalZd","MReportDrive.GetAbsError*60");
|
---|
133 | hError2.SetName("DeltaHvsZd");
|
---|
134 | MBinning bins2("BinningDeltaHvsZdX");
|
---|
135 | MBinning bins3("BinningDeltaHvsZdY");
|
---|
136 | bins2.SetEdges(90, 0, 90);
|
---|
137 | bins3.SetEdges(18, 0, 3.6);
|
---|
138 | plist.AddToList(&bins2);
|
---|
139 | plist.AddToList(&bins3);
|
---|
140 | MH3 hTempOptLink("MCameraCooling.fTempOptLink");
|
---|
141 | hTempOptLink.SetName("TOptLink");
|
---|
142 | MBinning bins4("BinningTOptLinkX");
|
---|
143 | bins4.SetEdges(50, 0, 50);
|
---|
144 | plist.AddToList(&bins4);
|
---|
145 |
|
---|
146 | // Fill all the MH classes defined before
|
---|
147 | MFillH fillZd(&hZd, "MTimeDrive");
|
---|
148 | MFillH fillAz(&hAz, "MTimeDrive");
|
---|
149 | MFillH fillError(&hError);
|
---|
150 | MFillH fillDState(&hDState, "MTimeDrive");
|
---|
151 | MFillH fillError2(&hError2);
|
---|
152 | MFillH fillHVA(&hHVA, "MTimeCamera");
|
---|
153 | MFillH fillHVB(&hHVB, "MTimeCamera");
|
---|
154 | MFillH fillCA(&hCA, "MTimeCamera");
|
---|
155 | MFillH fillCB(&hCB, "MTimeCamera");
|
---|
156 | MFillH fillLVTemp(&hLVTemp, "MTimeCamera");
|
---|
157 | MFillH fillLVHum(&hLVHum, "MTimeCamera");
|
---|
158 | MFillH fillLVStatus(&hLVStatus, "MTimeCamera");
|
---|
159 | MFillH fillLVRPS(&hLVRPS, "MTimeCamera");
|
---|
160 | MFillH fillTCenter(&hTCenter, "MTimeCamera");
|
---|
161 | MFillH fillTWall(&hTWall, "MTimeCamera");
|
---|
162 | MFillH fillTWater(&hTWater, "MTimeCamera");
|
---|
163 | MFillH fillTOptLink(&hTOptLink, "MTimeCamera");
|
---|
164 | MFillH fillTempOptLink(&hTempOptLink);
|
---|
165 | MFillH fillHWall(&hHWall, "MTimeCamera");
|
---|
166 | MFillH fillHCenter(&hHCenter, "MTimeCamera");
|
---|
167 | MFillH fillCCHum(&hCCHum, "MTimeCC");
|
---|
168 | MFillH fillCCTemp(&hCCTemp, "MTimeCC");
|
---|
169 | MFillH fillCCWS(&hCCWS, "MTimeCC");
|
---|
170 | MFillH fillCCSR(&hCCSR, "MTimeCC");
|
---|
171 | MFillH fillTrigBL2(&hTrigBL2, "MTimeTrigger");
|
---|
172 | MFillH fillTrigAL2(&hTrigAL2, "MTimeTrigger");
|
---|
173 |
|
---|
174 | // Do not display the result given by the default draw function
|
---|
175 | fillZd.SetBit(MFillH::kDoNotDisplay);
|
---|
176 | fillAz.SetBit(MFillH::kDoNotDisplay);
|
---|
177 | fillError.SetBit(MFillH::kDoNotDisplay);
|
---|
178 | fillDState.SetBit(MFillH::kDoNotDisplay);
|
---|
179 | fillError2.SetBit(MFillH::kDoNotDisplay);
|
---|
180 | fillHVA.SetBit(MFillH::kDoNotDisplay);
|
---|
181 | fillHVB.SetBit(MFillH::kDoNotDisplay);
|
---|
182 | fillCA.SetBit(MFillH::kDoNotDisplay);
|
---|
183 | fillCB.SetBit(MFillH::kDoNotDisplay);
|
---|
184 | fillLVTemp.SetBit(MFillH::kDoNotDisplay);
|
---|
185 | fillLVHum.SetBit(MFillH::kDoNotDisplay);
|
---|
186 | fillLVStatus.SetBit(MFillH::kDoNotDisplay);
|
---|
187 | fillLVRPS.SetBit(MFillH::kDoNotDisplay);
|
---|
188 | fillTCenter.SetBit(MFillH::kDoNotDisplay);
|
---|
189 | fillTWall.SetBit(MFillH::kDoNotDisplay);
|
---|
190 | fillTWater.SetBit(MFillH::kDoNotDisplay);
|
---|
191 | fillTOptLink.SetBit(MFillH::kDoNotDisplay);
|
---|
192 | fillTempOptLink.SetBit(MFillH::kDoNotDisplay);
|
---|
193 | fillHWall.SetBit(MFillH::kDoNotDisplay);
|
---|
194 | fillHCenter.SetBit(MFillH::kDoNotDisplay);
|
---|
195 | fillCCHum.SetBit(MFillH::kDoNotDisplay);
|
---|
196 | fillCCTemp.SetBit(MFillH::kDoNotDisplay);
|
---|
197 | fillCCWS.SetBit(MFillH::kDoNotDisplay);
|
---|
198 | fillCCSR.SetBit(MFillH::kDoNotDisplay);
|
---|
199 | fillTrigBL2.SetBit(MFillH::kDoNotDisplay);
|
---|
200 | fillTrigAL2.SetBit(MFillH::kDoNotDisplay);
|
---|
201 |
|
---|
202 | // Add all the task to the task list
|
---|
203 | tlist.AddToList(&read);
|
---|
204 | tlist.AddToList(&fillZd, "Drive");
|
---|
205 | tlist.AddToList(&fillAz, "Drive");
|
---|
206 | tlist.AddToList(&fillError, "Drive");
|
---|
207 | tlist.AddToList(&fillDState, "Drive");
|
---|
208 | tlist.AddToList(&fillError2, "Drive");
|
---|
209 | tlist.AddToList(&fillHVA, "Camera");
|
---|
210 | tlist.AddToList(&fillHVB, "Camera");
|
---|
211 | tlist.AddToList(&fillCA, "Camera");
|
---|
212 | tlist.AddToList(&fillCB, "Camera");
|
---|
213 | tlist.AddToList(&fillLVTemp, "Camera");
|
---|
214 | tlist.AddToList(&fillLVHum, "Camera");
|
---|
215 | tlist.AddToList(&fillLVStatus, "Camera");
|
---|
216 | tlist.AddToList(&fillLVRPS, "Camera");
|
---|
217 | tlist.AddToList(&fillTCenter, "Camera");
|
---|
218 | tlist.AddToList(&fillTWall, "Camera");
|
---|
219 | tlist.AddToList(&fillTWater, "Camera");
|
---|
220 | tlist.AddToList(&fillTOptLink, "Camera");
|
---|
221 | tlist.AddToList(&fillTempOptLink, "Camera");
|
---|
222 | tlist.AddToList(&fillHWall, "Camera");
|
---|
223 | tlist.AddToList(&fillHCenter, "Camera");
|
---|
224 | tlist.AddToList(&fillCCHum, "CC");
|
---|
225 | tlist.AddToList(&fillCCTemp, "CC");
|
---|
226 | tlist.AddToList(&fillCCWS, "CC");
|
---|
227 | tlist.AddToList(&fillCCSR, "CC");
|
---|
228 | tlist.AddToList(&fillTrigBL2, "Trigger");
|
---|
229 | tlist.AddToList(&fillTrigAL2, "Trigger");
|
---|
230 |
|
---|
231 | //
|
---|
232 | // Create and setup the eventloop
|
---|
233 | //
|
---|
234 | MEvtLoop evtloop;
|
---|
235 | evtloop.SetParList(&plist);
|
---|
236 | evtloop.SetDisplay(d);
|
---|
237 |
|
---|
238 | //
|
---|
239 | // Execute your analysis
|
---|
240 | //
|
---|
241 | if (!evtloop.Eventloop())
|
---|
242 | return;
|
---|
243 |
|
---|
244 | tlist.PrintStatistics();
|
---|
245 |
|
---|
246 | gStyle->SetPadGridX(kTRUE);
|
---|
247 | gStyle->SetPadGridY(kTRUE);
|
---|
248 |
|
---|
249 | //
|
---|
250 | // Drive report (pointing.C from T. Bretz)
|
---|
251 | //
|
---|
252 | TCanvas &c1 = d->AddTab("Drive");
|
---|
253 | // Plot the telescope tracking positions on the sky
|
---|
254 | TGraph *g1 = hZd.GetGraph();
|
---|
255 | TGraph *g2 = hAz.GetGraph();
|
---|
256 | TPad *p = new TPad("", "",0,0.05,0.6,0.95);
|
---|
257 | p->Draw();
|
---|
258 | p->cd();
|
---|
259 | gPad->SetTheta(-90);
|
---|
260 | gPad->SetPhi(90);
|
---|
261 | gPad->SetBorderMode(0);
|
---|
262 | gStyle->SetOptStat(0);
|
---|
263 | TH2F h("pol", "Telescope Tracking Positions on the Sky", 16, 0, 1, 9, 0, 1);
|
---|
264 | h.DrawClone("surf1pol");
|
---|
265 | gPad->Modified();
|
---|
266 | gPad->Update();
|
---|
267 | TView *view = gPad->GetView();
|
---|
268 | if (!view)
|
---|
269 | {
|
---|
270 | cout << "No View!" << endl;
|
---|
271 | return;
|
---|
272 | }
|
---|
273 | Double_t *zd=g1->GetY();
|
---|
274 | Double_t *az=g2->GetY();
|
---|
275 | Double_t old[2] = {0,0};
|
---|
276 | for (int i=0; i<g1->GetN(); i++)
|
---|
277 | {
|
---|
278 | az[i] += 180;
|
---|
279 | az[i] *= TMath::Pi()/180;
|
---|
280 | Double_t x[3] = { zd[i]*cos(az[i])/90, zd[i]*sin(az[i])/90, 0};
|
---|
281 | Double_t y[3];
|
---|
282 | view->WCtoNDC(x, y);
|
---|
283 | if (old[0]!=0 && old[1]!=1)
|
---|
284 | {
|
---|
285 | TLine *l = new TLine(y[0], y[1], old[0], old[1]);
|
---|
286 | l->SetLineColor(kBlue);
|
---|
287 | l->Draw();
|
---|
288 | }
|
---|
289 | TMarker *m = new TMarker(y[0], y[1], kFullDotMedium);
|
---|
290 | m->SetMarkerColor(i==g1->GetN()-1 ? kGreen : kRed);
|
---|
291 | m->Draw();
|
---|
292 | old[0] = y[0];
|
---|
293 | old[1] = y[1];
|
---|
294 | }
|
---|
295 | // Control deviation of the motors
|
---|
296 | c1.cd();
|
---|
297 | p = new TPad("", "", 0.6, 0, 1, 0.29);
|
---|
298 | p->Draw();
|
---|
299 | p->cd();
|
---|
300 | gStyle->SetOptStat(1110);
|
---|
301 | gStyle->SetStatFormat(".2g");
|
---|
302 | MH3 *mh3 = (MH3*)hError.DrawClone("nonew");
|
---|
303 | mh3->GetHist()->SetXTitle("\\Delta [arcmin]");
|
---|
304 | mh3->GetHist()->SetYTitle("");
|
---|
305 | mh3->GetHist()->SetTitle("Control deviation of the motors");
|
---|
306 | mh3->GetHist()->SetStats(1);
|
---|
307 | TLine ln;
|
---|
308 | ln.SetLineColor(kGreen);
|
---|
309 | ln.DrawLine(0.5*360*60/16384., 0, 0.5*360*60/16384., hError.GetHist()->GetMaximum());
|
---|
310 | ln.SetLineColor(kYellow);
|
---|
311 | ln.DrawLine(1.0*360*60/16384., 0, 1.0*360*60/16384., hError.GetHist()->GetMaximum());
|
---|
312 | ln.SetLineColor(kRed);
|
---|
313 | ln.DrawLine(2.0*360*60/16384., 0, 2.0*360*60/16384., hError.GetHist()->GetMaximum());
|
---|
314 | // Plot the drive status vs time
|
---|
315 | c1.cd();
|
---|
316 | p = new TPad("", "", 0.6, 0.29, 1, 0.42);
|
---|
317 | p->Draw();
|
---|
318 | p->cd();
|
---|
319 | hvt = (MHVsTime*)hDState.DrawClone("nonew");
|
---|
320 | hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
|
---|
321 | TH1 *hist = hvt->GetGraph()->GetHistogram();
|
---|
322 | TAxis *axey = hist->GetYaxis();
|
---|
323 | TAxis *axex = hist->GetXaxis();
|
---|
324 | hist->SetXTitle("Time");
|
---|
325 | hist->SetYTitle("");
|
---|
326 | hist->SetTitle("");//Drive Status vs. Time");
|
---|
327 | hist->SetStats(0);
|
---|
328 | hist->SetMinimum(-0.5);
|
---|
329 | hist->SetMaximum(4.5);
|
---|
330 | axey->Set(5, -0.5, 4.5);
|
---|
331 | axey->SetBinLabel(axey->FindFixBin(0), "Error");
|
---|
332 | axey->SetBinLabel(axey->FindFixBin(1), "Stopped");
|
---|
333 | axey->SetBinLabel(axey->FindFixBin(3), "Moving");
|
---|
334 | axey->SetBinLabel(axey->FindFixBin(4), "Tracking");
|
---|
335 | axey->SetLabelSize(0.15);
|
---|
336 | axex->SetLabelSize(0.08);
|
---|
337 | axex->SetTitleSize(0.09);
|
---|
338 | axex->SetTitleOffset(0.45);
|
---|
339 | // Control deviation of the motors vs zenith angle
|
---|
340 | c1.cd();
|
---|
341 | p = new TPad("", "", 0.6, 0.71, 1, 1);
|
---|
342 | p->Draw();
|
---|
343 | p->cd();
|
---|
344 | gStyle->SetOptStat(1110);
|
---|
345 | gStyle->SetStatFormat(".2g");
|
---|
346 | mh3 = (MH3*)hError2.DrawClone("nonew");
|
---|
347 | mh3->GetHist()->SetXTitle("Zd [\\circ]");
|
---|
348 | mh3->GetHist()->SetYTitle("\\Delta [arcmin]");
|
---|
349 | mh3->GetHist()->SetTitle("Control deviation of the motors");
|
---|
350 | mh3->GetHist()->SetStats(1);
|
---|
351 | mh3->GetHist()->Draw("box");
|
---|
352 | // Zenith angle vs time
|
---|
353 | c1.cd();
|
---|
354 | p = new TPad("", "", 0.6, 0.42, 1, 0.71);
|
---|
355 | p->Draw();
|
---|
356 | p->cd();
|
---|
357 | gPad->SetBorderMode(0);
|
---|
358 | hvt = (MHVsTime*)hZd.DrawClone("nonew");
|
---|
359 | hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
|
---|
360 | if (hvt->GetGraph()->GetN())
|
---|
361 | {
|
---|
362 | hvt->GetGraph()->GetHistogram()->SetXTitle("Time");
|
---|
363 | hvt->GetGraph()->GetHistogram()->SetYTitle("Zd [\\circ]");
|
---|
364 | hvt->GetGraph()->GetHistogram()->SetTitle("Zd vs. Time");
|
---|
365 | hvt->GetGraph()->GetHistogram()->SetStats(0);
|
---|
366 | }
|
---|
367 |
|
---|
368 |
|
---|
369 | //
|
---|
370 | // Camera report
|
---|
371 | //
|
---|
372 | // HV and currents of power supplies
|
---|
373 | TCanvas &c2 = d->AddTab("HV");
|
---|
374 | c2->Divide(1,2);
|
---|
375 | c2->cd(1);
|
---|
376 | // High voltages
|
---|
377 | TLegend *legHV = new TLegend(0.85,0.75,0.99,0.99);
|
---|
378 | TGraph *g = hHVA.GetGraph();
|
---|
379 | g->SetMarkerColor(2);
|
---|
380 | g->SetLineColor(2);
|
---|
381 | g->SetTitle("Voltages of power supplies");
|
---|
382 | legHV->AddEntry(g,"Power supply A (hvps1)","l");
|
---|
383 | g = hHVB.GetGraph();
|
---|
384 | g->SetMarkerColor(3);
|
---|
385 | g->SetLineColor(3);
|
---|
386 | legHV->AddEntry(g,"Power supply B (hvps2)","l");
|
---|
387 | MHVsTime *clone1 = (MHVsTime*)hHVA.DrawClone("nonew");
|
---|
388 | MHVsTime *clone2 = (MHVsTime*)hHVB.DrawClone("nonewsame");
|
---|
389 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
390 | hist->SetXTitle("Time");
|
---|
391 | hist->SetYTitle("High voltage [V]");
|
---|
392 | hist->SetMinimum(0);
|
---|
393 | legHV->DrawClone();
|
---|
394 | c2->cd(2);
|
---|
395 | // Currents
|
---|
396 | TLegend *legC = new TLegend(0.85,0.75,0.99,0.99);
|
---|
397 | TGraph *g = hCA.GetGraph();
|
---|
398 | g->SetMarkerColor(2);
|
---|
399 | g->SetLineColor(2);
|
---|
400 | g->SetTitle("Currents of power supplies");
|
---|
401 | legC->AddEntry(g,"Power supply A (curr1)","l");
|
---|
402 | g = hCB.GetGraph();
|
---|
403 | g->SetMarkerColor(3);
|
---|
404 | g->SetLineColor(3);
|
---|
405 | legC->AddEntry(g,"Power supply B (curr2)","l");
|
---|
406 | MHVsTime *clone1 = (MHVsTime*)hCA.DrawClone("nonew");
|
---|
407 | MHVsTime *clone2 = (MHVsTime*)hCB.DrawClone("nonewsame");
|
---|
408 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
409 | hist->SetXTitle("Time");
|
---|
410 | hist->SetYTitle("Current [mA]");
|
---|
411 | hist->SetMinimum(0);
|
---|
412 | legC->DrawClone();
|
---|
413 |
|
---|
414 | // LV power supplies
|
---|
415 | TCanvas &c3 = d->AddTab("LV");
|
---|
416 | c3->Divide(2,2);
|
---|
417 | c3->cd(1);
|
---|
418 | TGraph *g = hLVTemp.GetGraph();
|
---|
419 | g->SetMarkerColor(2);
|
---|
420 | g->SetLineColor(2);
|
---|
421 | g->SetTitle("LV temperature");
|
---|
422 | MHVsTime *clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew");
|
---|
423 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
424 | hist->SetXTitle("Time");
|
---|
425 | hist->SetYTitle("Temperature [\\circ]");
|
---|
426 | c3->cd(2);
|
---|
427 | TGraph *g = hLVHum.GetGraph();
|
---|
428 | g->SetMarkerColor(4);
|
---|
429 | g->SetLineColor(4);
|
---|
430 | g->SetTitle("LV humidity");
|
---|
431 | MHVsTime *clone1 = (MHVsTime*)hLVHum.DrawClone("nonew");
|
---|
432 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
433 | hist->SetXTitle("Time");
|
---|
434 | hist->SetYTitle("Humidity [%]");
|
---|
435 | c3->cd(3);
|
---|
436 | TGraph *g = hLVStatus.GetGraph();
|
---|
437 | g->SetMarkerColor(8);
|
---|
438 | g->SetLineColor(8);
|
---|
439 | g->SetTitle("LV status");
|
---|
440 | MHVsTime *clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew");
|
---|
441 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
442 | hist->SetXTitle("Time");
|
---|
443 | hist->SetYTitle("Status");
|
---|
444 | c3->cd(4);
|
---|
445 | TGraph *g = hLVRPS.GetGraph();
|
---|
446 | g->SetMarkerColor(3);
|
---|
447 | g->SetLineColor(3);
|
---|
448 | g->SetTitle("LV request power supply");
|
---|
449 | MHVsTime *clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew");
|
---|
450 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
451 | hist->SetXTitle("Time");
|
---|
452 | hist->SetYTitle("Request power supply");
|
---|
453 | TAxis *axey = hist->GetYaxis();
|
---|
454 | axey->Set(2, -0.5, 1.5);
|
---|
455 | axey->SetBinLabel(axey->FindFixBin(0), "OFF");
|
---|
456 | axey->SetBinLabel(axey->FindFixBin(1), "ON");
|
---|
457 | // Cooling
|
---|
458 | TCanvas &c4 = d->AddTab("Cooling");
|
---|
459 | gStyle->SetPadGridX(kTRUE);
|
---|
460 | gStyle->SetPadGridY(kTRUE);
|
---|
461 | c4->Divide(1,2);
|
---|
462 | c4->cd(1);
|
---|
463 | // Camera temperatures
|
---|
464 | TLegend *legtemp = new TLegend(0.85,0.75,0.99,0.99);
|
---|
465 | TGraph *g = hTCenter.GetGraph();
|
---|
466 | g->SetMarkerColor(8);
|
---|
467 | g->SetLineColor(8);
|
---|
468 | g->SetTitle("Camera temperature");
|
---|
469 | legtemp->AddEntry(g,"T at camera center","l");
|
---|
470 | g = hTWall.GetGraph();
|
---|
471 | g->SetMarkerColor(12);
|
---|
472 | g->SetLineColor(12);
|
---|
473 | legtemp->AddEntry(g,"T at camera wall","l");
|
---|
474 | g = hTWater.GetGraph();
|
---|
475 | g->SetMarkerColor(4);
|
---|
476 | g->SetLineColor(4);
|
---|
477 | legtemp->AddEntry(g,"T at water deposit","l");
|
---|
478 | g = hTOptLink.GetGraph();
|
---|
479 | g->SetMarkerColor(2);
|
---|
480 | g->SetLineColor(2);
|
---|
481 | legtemp->AddEntry(g,"T at optical links","l");
|
---|
482 | MHVsTime *clone1 = (MHVsTime*)hTCenter.DrawClone("nonew");
|
---|
483 | MHVsTime *clone2 = (MHVsTime*)hTWall.DrawClone("nonewsame");
|
---|
484 | MHVsTime *clone3 = (MHVsTime*)hTWater.DrawClone("nonewsame");
|
---|
485 | MHVsTime *clone4 = (MHVsTime*)hTOptLink.DrawClone("nonewsame");
|
---|
486 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
487 | hist->SetXTitle("Time");
|
---|
488 | hist->SetYTitle("Temperature [\\circ C]");
|
---|
489 | hist->SetMinimum(0);
|
---|
490 | legtemp->DrawClone();
|
---|
491 | // Camera relative humidity
|
---|
492 | c4->cd(2);
|
---|
493 | gPad->SetBorderMode(0);
|
---|
494 | gPad->Divide(2, 1);
|
---|
495 | TVirtualPad *c = gPad;
|
---|
496 | c->cd(1);
|
---|
497 | TLegend *leghum = new TLegend(0.75,0.75,0.99,0.99);
|
---|
498 | TGraph *g = hHCenter.GetGraph();
|
---|
499 | g->SetMarkerColor(8);
|
---|
500 | g->SetLineColor(8);
|
---|
501 | g->SetTitle("Camera relative humidity");
|
---|
502 | leghum->AddEntry(g,"RH at camera center","l");
|
---|
503 | g = hHWall.GetGraph();
|
---|
504 | g->SetMarkerColor(12);
|
---|
505 | g->SetLineColor(12);
|
---|
506 | leghum->AddEntry(g,"RH at camera wall","l");
|
---|
507 | clone1 = (MHVsTime*)hHCenter.DrawClone("nonew");
|
---|
508 | clone2 = (MHVsTime*)hHWall.DrawClone("nonewsame");
|
---|
509 | hist = clone1->GetGraph()->GetHistogram();
|
---|
510 | hist->SetXTitle("Time");
|
---|
511 | hist->SetYTitle("Relative humidity [%]");
|
---|
512 | hist->SetMaximum(50);
|
---|
513 | hist->SetMinimum(0);
|
---|
514 | leghum->DrawClone();
|
---|
515 | // Temperature distribution
|
---|
516 | c->cd(2);
|
---|
517 | TH1F *h3 = hTempOptLink.GetHistByName("TOptLink");
|
---|
518 | h3->SetXTitle("Temperature [\\circ C]");
|
---|
519 | h3->SetYTitle("");
|
---|
520 | h3->SetLineColor(2);
|
---|
521 | h3->SetTitle("Distribution of opt. links temperature (31.6+/-3.8\\circ)");
|
---|
522 | h3->SetStats(0);
|
---|
523 | MH3 *mh3 = (MH3*)hTempOptLink.DrawClone("nonew");
|
---|
524 |
|
---|
525 | //
|
---|
526 | // Trigger report
|
---|
527 | //
|
---|
528 | TCanvas &c5 = d->AddTab("Trigger");
|
---|
529 | gStyle->SetPadGridX(kTRUE);
|
---|
530 | gStyle->SetPadGridY(kTRUE);
|
---|
531 | TLegend *legtrig = new TLegend(0.75,0.85,0.99,0.99);
|
---|
532 | TGraph *g = hTrigBL2.GetGraph();
|
---|
533 | g->SetMarkerStyle(kFullDotSmall);
|
---|
534 | g->SetMarkerColor(2);
|
---|
535 | g->SetLineColor(2);
|
---|
536 | g->SetTitle("L2 trigger rate");
|
---|
537 | legtrig->AddEntry(g,"Before prescaler","l");
|
---|
538 | g = hTrigAL2.GetGraph();
|
---|
539 | g->SetMarkerColor(4);
|
---|
540 | g->SetLineColor(4);
|
---|
541 | legtrig->AddEntry(g,"After prescaler","l");
|
---|
542 | MHVsTime *clone1 = (MHVsTime*)hTrigBL2.DrawClone("nonew");
|
---|
543 | MHVsTime *clone2 = (MHVsTime*)hTrigAL2.DrawClone("nonewsame");
|
---|
544 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
545 | hist->SetXTitle("Time");
|
---|
546 | hist->SetYTitle("L2 trigger rate [Hz]");
|
---|
547 | legtrig->DrawClone();
|
---|
548 |
|
---|
549 | //
|
---|
550 | // CC report (Weather station)
|
---|
551 | //
|
---|
552 | TCanvas &c6 = d->AddTab("Central Control");
|
---|
553 | c6->Divide(2,2);
|
---|
554 | // Relative humidity
|
---|
555 | c6->cd(1);
|
---|
556 | TGraph *g = hCCHum.GetGraph();
|
---|
557 | g->SetMarkerStyle(kFullDotSmall);
|
---|
558 | g->SetMarkerColor(4);
|
---|
559 | g->SetLineColor(4);
|
---|
560 | g->SetTitle("Relative humidity");
|
---|
561 | MHVsTime *clone1 = (MHVsTime*)hCCHum.DrawClone("nonew");
|
---|
562 | TH1 *hist = clone1->GetGraph()->GetHistogram();
|
---|
563 | hist->SetXTitle("Time");
|
---|
564 | hist->SetYTitle("Humidity [%]");
|
---|
565 | // Temperature
|
---|
566 | c6->cd(2);
|
---|
567 | TGraph *g = hCCTemp.GetGraph();
|
---|
568 | g->SetMarkerStyle(kFullDotSmall);
|
---|
569 | g->SetMarkerColor(2);
|
---|
570 | g->SetLineColor(2);
|
---|
571 | g->SetTitle("Temperature");
|
---|
572 | MHVsTime *clone2 = (MHVsTime*)hCCTemp.DrawClone("nonew");
|
---|
573 | TH1 *hist = clone2->GetGraph()->GetHistogram();
|
---|
574 | hist->SetXTitle("Time");
|
---|
575 | hist->SetYTitle("Temperature [\\circ C]");
|
---|
576 | // Wind speed
|
---|
577 | c6->cd(3);
|
---|
578 | TGraph *g = hCCWS.GetGraph();
|
---|
579 | g->SetMarkerStyle(kFullDotSmall);
|
---|
580 | g->SetMarkerColor(3);
|
---|
581 | g->SetLineColor(3);
|
---|
582 | g->SetTitle("Wind speed");
|
---|
583 | MHVsTime *clone3 = (MHVsTime*)hCCWS.DrawClone("nonew");
|
---|
584 | TH1 *hist = clone3->GetGraph()->GetHistogram();
|
---|
585 | hist->SetXTitle("Time");
|
---|
586 | hist->SetYTitle("Wind speed [km/h]");
|
---|
587 | // Solar radiation
|
---|
588 | c6->cd(4);
|
---|
589 | TGraph *g = hCCSR.GetGraph();
|
---|
590 | g->SetMarkerStyle(kFullDotSmall);
|
---|
591 | g->SetMarkerColor(9);
|
---|
592 | g->SetLineColor(9);
|
---|
593 | g->SetTitle("Solar radiation");
|
---|
594 | MHVsTime *clone4 = (MHVsTime*)hCCSR.DrawClone("nonew");
|
---|
595 | TH1 *hist = clone4->GetGraph()->GetHistogram();
|
---|
596 | hist->SetXTitle("Time");
|
---|
597 | hist->SetYTitle("Solar radiation [W/m^2]");
|
---|
598 |
|
---|
599 | //
|
---|
600 | // Make sure the display hasn't been deleted by the user while the
|
---|
601 | // eventloop was running.
|
---|
602 | //
|
---|
603 | if ((d = evtloop.GetDisplay()))
|
---|
604 | {
|
---|
605 | TString file;
|
---|
606 | if (filename.Last('.')>0)
|
---|
607 | file = filename(0, filename.Last('.'));
|
---|
608 |
|
---|
609 | // TString file = filename.Remove(filename.Index("."),5);
|
---|
610 | // Save data in a postscriptfile (status.ps)
|
---|
611 | d->SaveAsPS(-1,Form("%s.ps",file));
|
---|
612 | }
|
---|
613 | }
|
---|
614 |
|
---|
615 |
|
---|
616 |
|
---|
617 |
|
---|
618 |
|
---|
619 |
|
---|
620 |
|
---|
621 |
|
---|
622 |
|
---|
623 |
|
---|
624 |
|
---|
625 |
|
---|
626 |
|
---|
627 |
|
---|