source: trunk/MagicSoft/Mars/macros/CCDataCheck.C@ 2894

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