source: trunk/Mars/macros/CCDataCheck.C@ 19344

Last change on this file since 19344 was 5690, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 51.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, 02/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 9 tabs:
27// - Drive system
28// - Camera status
29// - HV of power supplies and HV settings
30// - DC of power supplies
31// - LV power supplies
32// - Cooling system
33// - Trigger system
34// - Trigger macrocells
35// - Weather station
36//
37////////////////////////////////////////////////////////////////////////////
38
39void CCDataCheck(const TString filename="CC_2004_04_28.root", const TString directory="/home/raquel/")
40{
41
42 //
43 // If you want to run the macro in batch mode, set batchmode to kTRUE
44 //
45 Bool_t batchmode = kFALSE;
46
47 if(!batchmode)
48 {
49 MStatusDisplay *d = new MStatusDisplay;
50 d->SetTitle(filename);
51 d->SetLogStream(&gLog, kTRUE); // Disables output to stdout
52 }
53
54 //
55 // Create a empty Parameter List and an empty Task List
56 // The tasklist is identified in the eventloop by its name
57 //
58 MParList plist;
59
60 MTaskList tlist;
61 plist.AddToList(&tlist);
62
63 //
64 // Now setup the tasks and tasklist:
65 // ---------------------------------
66 //
67
68 // Set all the MHVsTime classes:
69 // Drive system
70 MHVsTime hZd("MReportDrive.fNominalZd");
71 hZd.SetName("Zd");
72 MHVsTime hAz("MReportDrive.fNominalAz");
73 hAz.SetName("Az");
74 MHVsTime hDState("MReportDrive.fState");
75 hDState.SetName("State");
76 // HV power supplies
77 MHVsTime hHVA("MCameraHV.fVoltageA");
78 hHVA.SetName("HVA");
79 MHVsTime hHVB("MCameraHV.fVoltageB");
80 hHVB.SetName("HVB");
81 MHVsTime hCA("MCameraHV.fCurrentA");
82 hCA.SetName("CA");
83 MHVsTime hCB("MCameraHV.fCurrentB");
84 hCB.SetName("CB");
85 // LV power supplies
86 MHVsTime hLVTemp("MCameraLV.fTemp");
87 hLVTemp.SetName("LVTemp");
88 MHVsTime hLVHum("MCameraLV.fHumidity");
89 hLVHum.SetName("LVHum");
90 MHVsTime hLVStatus("MCameraHV.fStatus");
91 hLVStatus.SetName("LVStatus");
92 MHVsTime hLVRPS("MCameraLV.fRequestPowerSupply");
93 hLVRPS.SetName("LVRPS");
94 // Cooling system
95 MHVsTime hTCenter("MCameraCooling.fTempCenter");
96 hTCenter.SetName("TCenter");
97 MHVsTime hTWall("MCameraCooling.fTempWall");
98 hTWall.SetName("TWall");
99 MHVsTime hTWater("MCameraCooling.fTempWater");
100 hTWater.SetName("TWater");
101 MHVsTime hTOptLink("MCameraCooling.fTempOptLink");
102 hTOptLink.SetName("TOptLink");
103 MHVsTime hHWall("MCameraCooling.fHumWall");
104 hHWall.SetName("HWall");
105 MHVsTime hHCenter("MCameraCooling.fHumCenter");
106 hHCenter.SetName("HCenter");
107 // Weather station
108 MHVsTime hCCHum("MReportCC.fHumidity");
109 hCCHum.SetName("CCHum");
110 MHVsTime hCCTemp("MReportCC.fTemperature");
111 hCCTemp.SetName("CCTemp");
112 MHVsTime hCCWS("MReportCC.fWindSpeed");
113 hCCWS.SetName("CCWS");
114 MHVsTime hCCSR("MReportCC.fSolarRadiation");
115 hCCSR.SetName("CCSR");
116 // Trigger system
117 MHVsTime hTrigBL2("MReportTrigger.fL2BeforePrescaler");
118 hTrigBL2.SetName("TrigBL2");
119 MHVsTime hTrigAL2("MReportTrigger.fL2AfterPrescaler");
120 hTrigAL2.SetName("TrigAL2");
121 MHVsTime hTrigStatus("MReportTrigger.fState");
122 hTrigStatus.SetName("TrigStatus");
123 // Camera status
124 MHVsTime hCamStatus("MReportCamera.fState");
125 hCamStatus.SetName("CamStatus");
126 MHVsTime hCamSentStatus("MReportCamera.fStatus");
127 hCamSentStatus.SetName("CamSentStatus");
128 MHVsTime hCamStatusDC("MReportCamera.fStatusDC");
129 hCamStatusDC.SetName("CamDCStatus");
130 MHVsTime hHVStatus("MCameraHV.fStatus");
131 hHVStatus.SetName("HVStatus");
132 MHVsTime hLidsStatus("MCameraLids.fStatus");
133 hLidsStatus.SetName("LidsStatus");
134 MHVsTime hCoolStatus("MCameraCooling.fStatus");
135 hCoolStatus.SetName("CoolingStatus");
136 MHVsTime hCamMean("MCameraHV.fMean");
137 hCamMean.SetName("CameraMean");
138
139 // Reads the trees of the root file and the analysed branches
140 MReadReports read;
141 read.AddTree("Drive");
142 read.AddTree("Camera");
143 read.AddTree("CC");
144 read.AddTree("Trigger");
145 read.AddFile(directory+filename); // after the reading of the trees!!!
146 read.AddToBranchList("MReportDrive.*");
147 read.AddToBranchList("MCameraHV.*");
148 read.AddToBranchList("MCameraLV.*");
149 read.AddToBranchList("MCameraCooling.*");
150 read.AddToBranchList("MReportCC.*");
151 read.AddToBranchList("MReportTrigger.*");
152 read.AddToBranchList("MReportCamera.*");
153 read.AddToBranchList("MCameraLids.*");
154
155 MGeomApply geomapl;
156 tlist.AddToList(&geomapl);
157
158 // Set of MHCamEvents classes
159 MHCamEvent HVdisplay("CamHV","Camera mean HV settings");
160 HVdisplay.SetBit(MHCamera::kVariance);
161 plist.AddToList(&HVdisplay);
162
163 // Set of MHPixVsTime classes (Trigger macroscells)
164 MHPixVsTime htrigmc1(0,"TrigMacrocell1");
165 htrigmc1.SetNameTime("MTimeTrigger");
166 plist.AddToList(&htrigmc1);
167 MHPixVsTime htrigmc2(1,"TrigMacrocell2");
168 htrigmc2.SetNameTime("MTimeTrigger");
169 plist.AddToList(&htrigmc2);
170 MHPixVsTime htrigmc3(2,"TrigMacrocell3");
171 htrigmc3.SetNameTime("MTimeTrigger");
172 plist.AddToList(&htrigmc3);
173 MHPixVsTime htrigmc4(3,"TrigMacrocell4");
174 htrigmc4.SetNameTime("MTimeTrigger");
175 plist.AddToList(&htrigmc4);
176 MHPixVsTime htrigmc5(4,"TrigMacrocell5");
177 htrigmc5.SetNameTime("MTimeTrigger");
178 plist.AddToList(&htrigmc5);
179 MHPixVsTime htrigmc6(5,"TrigMacrocell6");
180 htrigmc6.SetNameTime("MTimeTrigger");
181 plist.AddToList(&htrigmc6);
182 MHPixVsTime htrigmc7(6,"TrigMacrocell7");
183 htrigmc7.SetNameTime("MTimeTrigger");
184 plist.AddToList(&htrigmc7);
185 MHPixVsTime htrigmc8(7,"TrigMacrocell8");
186 htrigmc8.SetNameTime("MTimeTrigger");
187 plist.AddToList(&htrigmc8);
188 MHPixVsTime htrigmc9(8,"TrigMacrocell9");
189 htrigmc9.SetNameTime("MTimeTrigger");
190 plist.AddToList(&htrigmc9);
191 MHPixVsTime htrigmc10(9,"TrigMacrocell10");
192 htrigmc10.SetNameTime("MTimeTrigger");
193 plist.AddToList(&htrigmc10);
194 MHPixVsTime htrigmc11(10,"TrigMacrocell11");
195 htrigmc11.SetNameTime("MTimeTrigger");
196 plist.AddToList(&htrigmc11);
197 MHPixVsTime htrigmc12(11,"TrigMacrocell12");
198 htrigmc12.SetNameTime("MTimeTrigger");
199 plist.AddToList(&htrigmc12);
200 MHPixVsTime htrigmc13(12,"TrigMacrocell13");
201 htrigmc13.SetNameTime("MTimeTrigger");
202 plist.AddToList(&htrigmc13);
203 MHPixVsTime htrigmc14(13,"TrigMacrocell14");
204 htrigmc14.SetNameTime("MTimeTrigger");
205 plist.AddToList(&htrigmc14);
206 MHPixVsTime htrigmc15(14,"TrigMacrocell15");
207 htrigmc15.SetNameTime("MTimeTrigger");
208 plist.AddToList(&htrigmc15);
209 MHPixVsTime htrigmc16(15,"TrigMacrocell16");
210 htrigmc16.SetNameTime("MTimeTrigger");
211 plist.AddToList(&htrigmc16);
212 MHPixVsTime htrigmc17(16,"TrigMacrocell17");
213 htrigmc17.SetNameTime("MTimeTrigger");
214 plist.AddToList(&htrigmc17);
215 MHPixVsTime htrigmc18(17,"TrigMacrocell18");
216 htrigmc18.SetNameTime("MTimeTrigger");
217 plist.AddToList(&htrigmc18);
218 MHPixVsTime htrigmc19(18,"TrigMacrocell19");
219 htrigmc19.SetNameTime("MTimeTrigger");
220 plist.AddToList(&htrigmc19);
221
222 // Set of MH3 classes
223 MH3 hError("MReportDrive.GetAbsError*60");
224 hError.SetName("DeltaH");
225 MBinning bins("BinningDeltaH");
226 bins.SetEdges(18, 0, 3.6);
227 plist.AddToList(&bins);
228 MH3 hError2("MReportDrive.fNominalZd","MReportDrive.GetAbsError*60");
229 hError2.SetName("DeltaHvsZd");
230 MBinning bins2("BinningDeltaHvsZdX");
231 MBinning bins3("BinningDeltaHvsZdY");
232 bins2.SetEdges(90, 0, 90);
233 bins3.SetEdges(18, 0, 3.6);
234 plist.AddToList(&bins2);
235 plist.AddToList(&bins3);
236 MH3 hTempOptLink("MCameraCooling.fTempOptLink");
237 hTempOptLink.SetName("TOptLink");
238 MBinning bins4("BinningTOptLinkX");
239 bins4.SetEdges(50, 0, 50);
240 plist.AddToList(&bins4);
241 MH3 hTrigZd("MReportDrive.fNominalZd","MReportTrigger.fL2AfterPrescaler");
242 hTrigZd.SetName("TrigZd");
243 MBinning bins5("BinningTrigZdX");
244 bins5.SetEdges(90, 0, 90);
245 plist.AddToList(&bins5);
246 MBinning bins6("BinningTrigZdY");
247 bins6.SetEdges(10000, 0, 15000);
248 plist.AddToList(&bins6);
249
250
251 // Fill all the MH classes defined before
252 MFillH fillZd(&hZd, "MTimeDrive");
253 MFillH fillAz(&hAz, "MTimeDrive");
254 MFillH fillError(&hError);
255 MFillH fillDState(&hDState, "MTimeDrive");
256 MFillH fillError2(&hError2);
257 MFillH fillHVA(&hHVA, "MTimeCamera");
258 MFillH fillHVB(&hHVB, "MTimeCamera");
259 MFillH fillCA(&hCA, "MTimeCamera");
260 MFillH fillCB(&hCB, "MTimeCamera");
261 MFillH fillLVTemp(&hLVTemp, "MTimeCamera");
262 MFillH fillLVHum(&hLVHum, "MTimeCamera");
263 MFillH fillLVStatus(&hLVStatus, "MTimeCamera");
264 MFillH fillLVRPS(&hLVRPS, "MTimeCamera");
265 MFillH fillTCenter(&hTCenter, "MTimeCamera");
266 MFillH fillTWall(&hTWall, "MTimeCamera");
267 MFillH fillTWater(&hTWater, "MTimeCamera");
268 MFillH fillTOptLink(&hTOptLink, "MTimeCamera");
269 MFillH fillTempOptLink(&hTempOptLink);
270 MFillH fillHWall(&hHWall, "MTimeCamera");
271 MFillH fillHCenter(&hHCenter, "MTimeCamera");
272 MFillH fillCCHum(&hCCHum, "MTimeCC");
273 MFillH fillCCTemp(&hCCTemp, "MTimeCC");
274 MFillH fillCCWS(&hCCWS, "MTimeCC");
275 MFillH fillCCSR(&hCCSR, "MTimeCC");
276 MFillH fillTrigBL2(&hTrigBL2, "MTimeTrigger");
277 MFillH fillTrigAL2(&hTrigAL2, "MTimeTrigger");
278 MFillH fillTrigStatus(&hTrigStatus, "MTimeTrigger");
279 MFillH fillTrigZd(&hTrigZd);
280 MFillH fillCamStatus(&hCamStatus,"MTimeCamera");
281 MFillH fillCamSentStatus(&hCamSentStatus,"MTimeCamera");
282 MFillH fillCamStatusDC(&hCamStatusDC, "MTimeCamera");
283 MFillH fillHVStatus(&hHVStatus, "MTimeCamera");
284 MFillH fillLidsStatus(&hLidsStatus, "MTimeCamera");
285 MFillH fillCoolStatus(&hCoolStatus, "MTimeCamera");
286 MFillH filltrigmc1("TrigMacrocell1","MReportTrigger");
287 MFillH filltrigmc2("TrigMacrocell2","MReportTrigger");
288 MFillH filltrigmc3("TrigMacrocell3","MReportTrigger");
289 MFillH filltrigmc4("TrigMacrocell4","MReportTrigger");
290 MFillH filltrigmc5("TrigMacrocell5","MReportTrigger");
291 MFillH filltrigmc6("TrigMacrocell6","MReportTrigger");
292 MFillH filltrigmc7("TrigMacrocell7","MReportTrigger");
293 MFillH filltrigmc8("TrigMacrocell8","MReportTrigger");
294 MFillH filltrigmc9("TrigMacrocell9","MReportTrigger");
295 MFillH filltrigmc10("TrigMacrocell10","MReportTrigger");
296 MFillH filltrigmc11("TrigMacrocell11","MReportTrigger");
297 MFillH filltrigmc12("TrigMacrocell12","MReportTrigger");
298 MFillH filltrigmc13("TrigMacrocell13","MReportTrigger");
299 MFillH filltrigmc14("TrigMacrocell14","MReportTrigger");
300 MFillH filltrigmc15("TrigMacrocell15","MReportTrigger");
301 MFillH filltrigmc16("TrigMacrocell16","MReportTrigger");
302 MFillH filltrigmc17("TrigMacrocell17","MReportTrigger");
303 MFillH filltrigmc18("TrigMacrocell18","MReportTrigger");
304 MFillH filltrigmc19("TrigMacrocell19","MReportTrigger");
305 MFillH fillcammean(&hCamMean,"MTimeCamera");
306 MFillH fillHVD(&HVdisplay,"MCameraHV");
307
308 // Do not display the result given by the default draw function
309 fillZd.SetBit(MFillH::kDoNotDisplay);
310 fillAz.SetBit(MFillH::kDoNotDisplay);
311 fillError.SetBit(MFillH::kDoNotDisplay);
312 fillDState.SetBit(MFillH::kDoNotDisplay);
313 fillError2.SetBit(MFillH::kDoNotDisplay);
314 fillHVA.SetBit(MFillH::kDoNotDisplay);
315 fillHVB.SetBit(MFillH::kDoNotDisplay);
316 fillCA.SetBit(MFillH::kDoNotDisplay);
317 fillCB.SetBit(MFillH::kDoNotDisplay);
318 fillLVTemp.SetBit(MFillH::kDoNotDisplay);
319 fillLVHum.SetBit(MFillH::kDoNotDisplay);
320 fillLVStatus.SetBit(MFillH::kDoNotDisplay);
321 fillLVRPS.SetBit(MFillH::kDoNotDisplay);
322 fillTCenter.SetBit(MFillH::kDoNotDisplay);
323 fillTWall.SetBit(MFillH::kDoNotDisplay);
324 fillTWater.SetBit(MFillH::kDoNotDisplay);
325 fillTOptLink.SetBit(MFillH::kDoNotDisplay);
326 fillTempOptLink.SetBit(MFillH::kDoNotDisplay);
327 fillHWall.SetBit(MFillH::kDoNotDisplay);
328 fillHCenter.SetBit(MFillH::kDoNotDisplay);
329 fillCCHum.SetBit(MFillH::kDoNotDisplay);
330 fillCCTemp.SetBit(MFillH::kDoNotDisplay);
331 fillCCWS.SetBit(MFillH::kDoNotDisplay);
332 fillCCSR.SetBit(MFillH::kDoNotDisplay);
333 fillTrigBL2.SetBit(MFillH::kDoNotDisplay);
334 fillTrigAL2.SetBit(MFillH::kDoNotDisplay);
335 fillTrigStatus.SetBit(MFillH::kDoNotDisplay);
336 fillTrigZd.SetBit(MFillH::kDoNotDisplay);
337 fillCamStatus.SetBit(MFillH::kDoNotDisplay);
338 fillCamSentStatus.SetBit(MFillH::kDoNotDisplay);
339 fillCamStatusDC.SetBit(MFillH::kDoNotDisplay);
340 fillHVStatus.SetBit(MFillH::kDoNotDisplay);
341 fillLidsStatus.SetBit(MFillH::kDoNotDisplay);
342 fillCoolStatus.SetBit(MFillH::kDoNotDisplay);
343 filltrigmc1.SetBit(MFillH::kDoNotDisplay);
344 filltrigmc2.SetBit(MFillH::kDoNotDisplay);
345 filltrigmc3.SetBit(MFillH::kDoNotDisplay);
346 filltrigmc4.SetBit(MFillH::kDoNotDisplay);
347 filltrigmc5.SetBit(MFillH::kDoNotDisplay);
348 filltrigmc6.SetBit(MFillH::kDoNotDisplay);
349 filltrigmc7.SetBit(MFillH::kDoNotDisplay);
350 filltrigmc8.SetBit(MFillH::kDoNotDisplay);
351 filltrigmc9.SetBit(MFillH::kDoNotDisplay);
352 filltrigmc10.SetBit(MFillH::kDoNotDisplay);
353 filltrigmc11.SetBit(MFillH::kDoNotDisplay);
354 filltrigmc12.SetBit(MFillH::kDoNotDisplay);
355 filltrigmc13.SetBit(MFillH::kDoNotDisplay);
356 filltrigmc14.SetBit(MFillH::kDoNotDisplay);
357 filltrigmc15.SetBit(MFillH::kDoNotDisplay);
358 filltrigmc16.SetBit(MFillH::kDoNotDisplay);
359 filltrigmc17.SetBit(MFillH::kDoNotDisplay);
360 filltrigmc18.SetBit(MFillH::kDoNotDisplay);
361 filltrigmc19.SetBit(MFillH::kDoNotDisplay);
362 fillcammean.SetBit(MFillH::kDoNotDisplay);
363 fillHVD.SetBit(MFillH::kDoNotDisplay);
364
365 // Skip the fill function is there is no tree entries
366 fillZd.SetBit(MFillH::kCanSkip);
367 fillAz.SetBit(MFillH::kCanSkip);
368 fillError.SetBit(MFillH::kCanSkip);
369 fillDState.SetBit(MFillH::kCanSkip);
370 fillError2.SetBit(MFillH::kCanSkip);
371 fillHVA.SetBit(MFillH::kCanSkip);
372 fillHVB.SetBit(MFillH::kCanSkip);
373 fillCA.SetBit(MFillH::kCanSkip);
374 fillCB.SetBit(MFillH::kCanSkip);
375 fillLVTemp.SetBit(MFillH::kCanSkip);
376 fillLVHum.SetBit(MFillH::kCanSkip);
377 fillLVStatus.SetBit(MFillH::kCanSkip);
378 fillLVRPS.SetBit(MFillH::kCanSkip);
379 fillTCenter.SetBit(MFillH::kCanSkip);
380 fillTWall.SetBit(MFillH::kCanSkip);
381 fillTWater.SetBit(MFillH::kCanSkip);
382 fillTOptLink.SetBit(MFillH::kCanSkip);
383 fillTempOptLink.SetBit(MFillH::kCanSkip);
384 fillHWall.SetBit(MFillH::kCanSkip);
385 fillHCenter.SetBit(MFillH::kCanSkip);
386 fillCCHum.SetBit(MFillH::kCanSkip);
387 fillCCTemp.SetBit(MFillH::kCanSkip);
388 fillCCWS.SetBit(MFillH::kCanSkip);
389 fillCCSR.SetBit(MFillH::kCanSkip);
390 fillTrigBL2.SetBit(MFillH::kCanSkip);
391 fillTrigAL2.SetBit(MFillH::kCanSkip);
392 fillTrigStatus.SetBit(MFillH::kCanSkip);
393 fillTrigZd.SetBit(MFillH::kCanSkip);
394 fillCamStatus.SetBit(MFillH::kCanSkip);
395 fillCamSentStatus.SetBit(MFillH::kCanSkip);
396 fillCamStatusDC.SetBit(MFillH::kCanSkip);
397 fillHVStatus.SetBit(MFillH::kCanSkip);
398 fillLidsStatus.SetBit(MFillH::kCanSkip);
399 fillCoolStatus.SetBit(MFillH::kCanSkip);
400 filltrigmc1.SetBit(MFillH::kCanSkip);
401 filltrigmc2.SetBit(MFillH::kCanSkip);
402 filltrigmc3.SetBit(MFillH::kCanSkip);
403 filltrigmc4.SetBit(MFillH::kCanSkip);
404 filltrigmc5.SetBit(MFillH::kCanSkip);
405 filltrigmc6.SetBit(MFillH::kCanSkip);
406 filltrigmc7.SetBit(MFillH::kCanSkip);
407 filltrigmc8.SetBit(MFillH::kCanSkip);
408 filltrigmc9.SetBit(MFillH::kCanSkip);
409 filltrigmc10.SetBit(MFillH::kCanSkip);
410 filltrigmc11.SetBit(MFillH::kCanSkip);
411 filltrigmc12.SetBit(MFillH::kCanSkip);
412 filltrigmc13.SetBit(MFillH::kCanSkip);
413 filltrigmc14.SetBit(MFillH::kCanSkip);
414 filltrigmc15.SetBit(MFillH::kCanSkip);
415 filltrigmc16.SetBit(MFillH::kCanSkip);
416 filltrigmc17.SetBit(MFillH::kCanSkip);
417 filltrigmc18.SetBit(MFillH::kCanSkip);
418 filltrigmc19.SetBit(MFillH::kCanSkip);
419 fillcammean.SetBit(MFillH::kCanSkip);
420 fillHVD.SetBit(MFillH::kCanSkip);
421
422 // Add all the task to the task list
423 tlist.AddToList(&read);
424 tlist.AddToList(&fillZd, "Drive");
425 tlist.AddToList(&fillAz, "Drive");
426 tlist.AddToList(&fillError, "Drive");
427 tlist.AddToList(&fillDState, "Drive");
428 tlist.AddToList(&fillError2, "Drive");
429 tlist.AddToList(&fillHVA, "Camera");
430 tlist.AddToList(&fillHVB, "Camera");
431 tlist.AddToList(&fillCA, "Camera");
432 tlist.AddToList(&fillCB, "Camera");
433 tlist.AddToList(&fillLVTemp, "Camera");
434 tlist.AddToList(&fillLVHum, "Camera");
435 tlist.AddToList(&fillLVStatus, "Camera");
436 tlist.AddToList(&fillLVRPS, "Camera");
437 tlist.AddToList(&fillTCenter, "Camera");
438 tlist.AddToList(&fillTWall, "Camera");
439 tlist.AddToList(&fillTWater, "Camera");
440 tlist.AddToList(&fillTOptLink, "Camera");
441 tlist.AddToList(&fillTempOptLink, "Camera");
442 tlist.AddToList(&fillHWall, "Camera");
443 tlist.AddToList(&fillHCenter, "Camera");
444 tlist.AddToList(&fillCCHum, "CC");
445 tlist.AddToList(&fillCCTemp, "CC");
446 tlist.AddToList(&fillCCWS, "CC");
447 tlist.AddToList(&fillCCSR, "CC");
448 tlist.AddToList(&fillTrigBL2, "Trigger");
449 tlist.AddToList(&fillTrigAL2, "Trigger");
450 tlist.AddToList(&fillTrigStatus, "Trigger");
451 tlist.AddToList(&fillTrigZd);
452 tlist.AddToList(&fillCamStatus, "Camera");
453 tlist.AddToList(&fillCamSentStatus, "Camera");
454 tlist.AddToList(&fillCamStatusDC,"Camera");
455 tlist.AddToList(&fillHVStatus,"Camera");
456 tlist.AddToList(&fillLidsStatus,"Camera");
457 tlist.AddToList(&fillCoolStatus,"Camera");
458 tlist.AddToList(&filltrigmc1, "Trigger");
459 tlist.AddToList(&filltrigmc2, "Trigger");
460 tlist.AddToList(&filltrigmc3, "Trigger");
461 tlist.AddToList(&filltrigmc4, "Trigger");
462 tlist.AddToList(&filltrigmc5, "Trigger");
463 tlist.AddToList(&filltrigmc6, "Trigger");
464 tlist.AddToList(&filltrigmc7, "Trigger");
465 tlist.AddToList(&filltrigmc8, "Trigger");
466 tlist.AddToList(&filltrigmc9, "Trigger");
467 tlist.AddToList(&filltrigmc10, "Trigger");
468 tlist.AddToList(&filltrigmc11, "Trigger");
469 tlist.AddToList(&filltrigmc12, "Trigger");
470 tlist.AddToList(&filltrigmc13, "Trigger");
471 tlist.AddToList(&filltrigmc14, "Trigger");
472 tlist.AddToList(&filltrigmc15, "Trigger");
473 tlist.AddToList(&filltrigmc16, "Trigger");
474 tlist.AddToList(&filltrigmc17, "Trigger");
475 tlist.AddToList(&filltrigmc18, "Trigger");
476 tlist.AddToList(&filltrigmc19, "Trigger");
477 tlist.AddToList(&fillcammean, "Camera");
478 tlist.AddToList(&fillHVD);
479
480 //
481 // Create and setup the eventloop
482 //
483 MEvtLoop evtloop;
484 evtloop.SetParList(&plist);
485 if(!batchmode)
486 evtloop.SetDisplay(d);
487
488 //
489 // Execute your analysis
490 //
491 if (!evtloop.Eventloop())
492 return;
493
494 tlist.PrintStatistics();
495
496 gStyle->SetPadGridX(kTRUE);
497 gStyle->SetPadGridY(kTRUE);
498 gStyle->SetCanvasColor(kWhite);
499 MHVsTime *clone1;
500 TGraph *g;
501 TH1 *hist;
502 TH1 *hist2;
503 TAxis *axey;
504 TAxis *axex;
505 MH3 *mh3;
506 MHPixVsTime *pixclone1;
507 MHCamera *Sum;
508 //
509 // Drive report (pointing.C from T. Bretz)
510 //
511 TCanvas *c1;
512 if ((d = evtloop.GetDisplay()))
513 c1 = &d->AddTab("DRIVE SYSTEM");
514 else
515 c1 = new TCanvas();
516
517 // ************* Plot the telescope tracking positions on the sky ***********
518 TGraph *g1 = hZd.GetGraph();
519 TGraph *g2 = hAz.GetGraph();
520 TPad *p = new TPad("", "",0,0.05,0.6,0.95);
521 p->Draw();
522 p->cd();
523 gPad->SetTheta(-90);
524 gPad->SetPhi(90);
525 gPad->SetBorderMode(0);
526 gStyle->SetOptStat(0);
527 TH2F h("pol", "Telescope Tracking Positions on the Sky", 16, 0, 1, 9, 0, 1);
528 h.DrawClone("surf1pol");
529 gPad->Modified();
530 gPad->Update();
531 TView *view = gPad->GetView();
532 if (!view)
533 {
534 cout << "No View!" << endl;
535 return;
536 }
537 Double_t *zd=g1->GetY();
538 Double_t *az=g2->GetY();
539 Double_t old[2] = {0,0};
540 for (int i=0; i<g1->GetN(); i++)
541 {
542 az[i] += 180;
543 az[i] *= TMath::Pi()/180;
544 Double_t x[3] = { zd[i]*cos(az[i])/90, zd[i]*sin(az[i])/90, 0};
545 Double_t y[3];
546 view->WCtoNDC(x, y);
547 if (old[0]!=0 && old[1]!=1)
548 {
549 TLine *l = new TLine(y[0], y[1], old[0], old[1]);
550 l->SetLineColor(kBlue);
551 l->Draw();
552 }
553 TMarker *m = new TMarker(y[0], y[1], kFullDotMedium);
554 m->SetMarkerColor(i==g1->GetN()-1 ? kGreen : kRed);
555 m->Draw();
556 old[0] = y[0];
557 old[1] = y[1];
558 }
559 // ---------------------- Control deviation of the motors -------------------
560 c1->cd();
561 p = new TPad("", "", 0.6, 0, 1, 0.29);
562 p->Draw();
563 p->cd();
564 gStyle->SetOptStat(1110);
565 gStyle->SetStatFormat(".2g");
566 mh3 = (MH3*)hError.DrawClone("nonew");
567 mh3->GetHist().SetXTitle("\\Delta [arcmin]");
568 mh3->GetHist().SetYTitle("");
569 mh3->GetHist().SetTitle("Control deviation of the motors");
570 mh3->GetHist().SetStats(1);
571 mh3->GetHist().SetLabelSize(0.06,"X");
572 mh3->GetHist().SetLabelSize(0.06,"Y");
573 mh3->GetHist().SetTitleSize(0.06,"X");
574 TLine ln;
575 ln.SetLineColor(kGreen);
576 ln.DrawLine(0.5*360*60/16384., 0, 0.5*360*60/16384., hError.GetHist().GetMaximum());
577 ln.SetLineColor(kYellow);
578 ln.DrawLine(1.0*360*60/16384., 0, 1.0*360*60/16384., hError.GetHist().GetMaximum());
579 ln.SetLineColor(kRed);
580 ln.DrawLine(2.0*360*60/16384., 0, 2.0*360*60/16384., hError.GetHist().GetMaximum());
581 // ---------------------- Plot the drive status vs time ---------------------
582 c1->cd();
583 p = new TPad("", "", 0.6, 0.29, 1, 0.42);
584 p->Draw();
585 p->cd();
586 MHVsTime *hvt = (MHVsTime*)hDState.DrawClone("nonew");
587 hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
588 if (hvt->GetGraph()->GetN())
589 {
590 hist = hvt->GetGraph()->GetHistogram();
591 TAxis *axey = hist->GetYaxis();
592 TAxis *axex = hist->GetXaxis();
593 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
594 hist->SetXTitle("Time");
595 hist->SetYTitle("");
596 hist->SetTitle("");
597 hist->SetLabelSize(0.1,"X");
598 hist->SetTitleSize(0.06,"X");
599 hist->SetStats(0);
600 hist->SetMinimum(-0.5);
601 hist->SetMaximum(4.5);
602 axey->Set(5, -0.5, 4.5);
603 axey->SetBinLabel(axey->FindFixBin(0), "Error");
604 axey->SetBinLabel(axey->FindFixBin(1), "Stopped");
605 axey->SetBinLabel(axey->FindFixBin(3), "Moving");
606 axey->SetBinLabel(axey->FindFixBin(4), "Tracking");
607 axey->SetLabelSize(0.15);
608 axex->SetLabelSize(0.08);
609 axex->SetTitleSize(0.09);
610 axex->SetTitleOffset(0.45);
611 }
612 // --------------- Control deviation of the motors vs zenith angle ----------
613 c1->cd();
614 p = new TPad("", "", 0.6, 0.71, 1, 1);
615 p->Draw();
616 p->cd();
617 gStyle->SetOptStat(1110);
618 gStyle->SetStatFormat(".2g");
619 mh3 = (MH3*)hError2.DrawClone("nonew");
620 mh3->GetHist().SetXTitle("Zd [\\circ]");
621 mh3->GetHist().SetYTitle("\\Delta [arcmin]");
622 mh3->GetHist().SetTitle("Control deviation of the motors");
623 mh3->GetHist().SetLabelSize(0.06,"X");
624 mh3->GetHist().SetLabelSize(0.06,"Y");
625 mh3->GetHist().SetTitleSize(0.06,"X");
626 mh3->GetHist().SetTitleSize(0.06,"Y");
627 mh3->GetHist().SetStats(1);
628 mh3->GetHist().Draw("box");
629 // -------------------------- Zenith angle vs time --------------------------
630 c1->cd();
631 p = new TPad("", "", 0.6, 0.42, 1, 0.71);
632 p->Draw();
633 p->cd();
634 gPad->SetBorderMode(0);
635 hvt = (MHVsTime*)hZd.DrawClone("nonew");
636 hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
637 if (hvt->GetGraph()->GetN())
638 {
639 hvt->GetGraph()->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
640 hvt->GetGraph()->GetHistogram()->SetXTitle("Time");
641 hvt->GetGraph()->GetHistogram()->SetYTitle("Zd [\\circ]");
642 hvt->GetGraph()->GetHistogram()->SetTitle("Zd vs. Time");
643 hvt->GetGraph()->GetHistogram()->SetLabelSize(0.06,"X");
644 hvt->GetGraph()->GetHistogram()->SetTitleSize(0.06,"X");
645 hvt->GetGraph()->GetHistogram()->SetLabelSize(0.06,"Y");
646 hvt->GetGraph()->GetHistogram()->SetTitleSize(0.06,"Y");
647 hvt->GetGraph()->GetHistogram()->SetStats(0);
648 }
649
650
651 //
652 // Camera report
653 //
654 // **************************** CAMERA STATUS ********************
655 if ((d = evtloop.GetDisplay()))
656 TCanvas &c2 = d.AddTab("CAMERA STATUS");
657 else
658 TCanvas *c2 = new TCanvas();
659 c2->Divide(1,2);
660 c2->cd(1);
661 g = hCamStatus.GetGraph();
662 g->SetMarkerStyle(kFullDotSmall);
663 g->SetTitle("Camera status");
664 clone1 = (MHVsTime*)hCamStatus.DrawClone("nonew");
665 if(clone1->GetGraph()->GetN())
666 {
667 hist = clone1->GetGraph()->GetHistogram();
668 axey = hist->GetYaxis();
669 hist->SetMinimum(-0.5);
670 hist->SetMaximum(9.5);
671 axey->Set(10,-0.5,9.5);
672 axey->SetBinLabel(axey->FindFixBin(0),"EROR");
673 axey->SetBinLabel(axey->FindFixBin(1),"ALARM");
674 axey->SetBinLabel(axey->FindFixBin(2),"BLOCKED!");
675 axey->SetBinLabel(axey->FindFixBin(3),"WARM!");
676 axey->SetBinLabel(axey->FindFixBin(4),"HOT");
677 axey->SetBinLabel(axey->FindFixBin(5),"HVRAMPING");
678 axey->SetBinLabel(axey->FindFixBin(6),"OK");
679 axey->SetBinLabel(axey->FindFixBin(7),"INIT");
680 axey->SetBinLabel(axey->FindFixBin(8),"SHUTD");
681 axey->SetBinLabel(axey->FindFixBin(9),"N/A");
682 hist->SetLabelSize(0.04,"X");
683 hist->SetLabelSize(0.05,"Y");
684 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
685 hist->SetXTitle("Time");
686 hist->SetYTitle("");
687 }
688 c2->cd(2);
689 g = hLidsStatus.GetGraph();
690 g->SetMarkerStyle(kFullDotSmall);
691 g->SetTitle("Camera Lids status");
692 clone1 = (MHVsTime*)hLidsStatus.DrawClone("nonew");
693 if(clone1->GetGraph()->GetN())
694 {
695 hist = clone1->GetGraph()->GetHistogram();
696 axey = hist->GetYaxis();
697 hist->SetMinimum(-0.5);
698 hist->SetMaximum(9.5);
699 axey->Set(10,-0.5,9.5);
700 axey->SetBinLabel(axey->FindFixBin(0),"Error");
701 axey->SetBinLabel(axey->FindFixBin(1),"SafetyLimit");
702 axey->SetBinLabel(axey->FindFixBin(4),"Closed");
703 axey->SetBinLabel(axey->FindFixBin(5),"Opened");
704 axey->SetBinLabel(axey->FindFixBin(6),"Moving");
705 axey->SetBinLabel(axey->FindFixBin(7),"Stopped");
706 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
707 hist->SetLabelSize(0.04,"X");
708 hist->SetLabelSize(0.06,"Y");
709 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
710 hist->SetXTitle("Time");
711 hist->SetYTitle("");
712 }
713 // ************************* HV of power supplies ***************************
714 if ((d = evtloop.GetDisplay()))
715 TCanvas &c3 = d.AddTab("CAMERA HV");
716 else
717 TCanvas *c3 = new TCanvas();
718 c3->Divide(2,2);
719 c3->cd(1);
720 // --------------- Power supplies and HV settings --------------------------
721 TLegend *legHV = new TLegend(0.75,0.85,0.99,0.99);
722 g = hHVA.GetGraph();
723 g->SetMarkerColor(2);
724 g->SetLineColor(2);
725 g->SetTitle("Voltages of power supplies and camera settings");
726 legHV->AddEntry(g,"PS A (hvps1)","l");
727 clone1 = (MHVsTime*)hHVA.DrawClone("nonew");
728 if(clone1->GetGraph()->GetN())
729 {
730 hist = clone1->GetGraph()->GetHistogram();
731 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
732 hist->SetXTitle("Time");
733 hist->SetYTitle("High voltage [V]");
734 hist->SetLabelSize(0.04,"X");
735 hist->SetMinimum(0);
736 }
737 g = hHVB.GetGraph();
738 g->SetMarkerColor(3);
739 g->SetLineColor(3);
740 legHV->AddEntry(g,"PS B (hvps2)","l");
741 clone1 = (MHVsTime*)hHVB.DrawClone("nonewsame");
742 g = hCamMean.GetGraph();
743 g->SetMarkerColor(4);
744 g->SetLineColor(4);
745 legHV->AddEntry(g,"Camera mean HV","l");
746 clone1 = (MHVsTime*)hCamMean.DrawClone("nonewsame");
747 legHV->DrawClone();
748 // ---------------------------- HV status -----------------------------------
749 c3->cd(2);
750 g = hHVStatus.GetGraph();
751 g->SetMarkerStyle(kFullDotSmall);
752 g->SetTitle("Camera HV status");
753 clone1 = (MHVsTime*)hHVStatus.DrawClone("nonew");
754 if(clone1->GetGraph()->GetN())
755 {
756 hist = clone1->GetGraph()->GetHistogram();
757 axey = hist->GetYaxis();
758 hist->SetMinimum(-0.5);
759 hist->SetMaximum(9.5);
760 axey->Set(10,-0.5,9.5);
761 axey->SetBinLabel(axey->FindFixBin(0),"Error");
762 axey->SetBinLabel(axey->FindFixBin(1),"Mismatch");
763 axey->SetBinLabel(axey->FindFixBin(2),"Trip");
764 axey->SetBinLabel(axey->FindFixBin(3),"Ramping");
765 axey->SetBinLabel(axey->FindFixBin(4),"Off");
766 axey->SetBinLabel(axey->FindFixBin(5),"Nominal");
767 axey->SetBinLabel(axey->FindFixBin(6),"LimCurrentWarning");
768 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
769 hist->SetLabelSize(0.04,"X");
770 hist->SetLabelSize(0.05,"Y");
771 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
772 hist->SetXTitle("Time");
773 hist->SetYTitle("");
774 }
775 // ---------------------------- HV settings ---------------------------------
776 c3->cd(3);
777 Sum = (MHCamera*)HVdisplay.GetHistByName("sum");
778 TVirtualPad *c = gPad;
779 c->cd(1);
780 gPad->SetBorderMode(0);
781 Sum->SetYTitle("Mean");
782 Sum->DrawClone("pixelindex");
783 c3->cd(4);
784 gPad->SetBorderMode(0);
785 Sum->SetYTitle("Mean HV settings");
786 Sum->DrawClone("EPhist");
787
788 // ******************** Currents of power supplies *******************
789 if ((d = evtloop.GetDisplay()))
790 TCanvas &c4 = d.AddTab("CAMERA DC");
791 else
792 TCanvas *c4 = new TCanvas();
793 // ----------------------------- Power supplies ------------------------------
794 c4->Divide(1,2);
795 c4->cd(1);
796 TLegend *legC = new TLegend(0.85,0.75,0.99,0.99);
797 g = hCA.GetGraph();
798 g->SetMarkerColor(2);
799 g->SetLineColor(2);
800 g->SetTitle("Currents of power supplies");
801 legC->AddEntry(g,"PS A (curr1)","l");
802 clone1 = (MHVsTime*)hCA.DrawClone("nonew");
803 if(clone1->GetGraph()->GetN())
804 {
805 hist = clone1->GetGraph()->GetHistogram();
806 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
807 hist->SetXTitle("Time");
808 hist->SetYTitle("Current [mA]");
809 hist->SetLabelSize(0.04,"X");
810 hist->SetMinimum(0);
811 }
812 g = hCB.GetGraph();
813 g->SetMarkerColor(3);
814 g->SetLineColor(3);
815 legC->AddEntry(g,"PS B (curr2)","l");
816 clone1 = (MHVsTime*)hCB.DrawClone("nonewsame");
817 legC->DrawClone();
818 c4->cd(2);
819 g = hCamStatusDC.GetGraph();
820 g->SetMarkerStyle(kFullDotSmall);
821 g->SetTitle("Camera DC status");
822 clone1 = (MHVsTime*)hCamStatusDC.DrawClone("nonew");
823 if(clone1->GetGraph()->GetN())
824 {
825 hist = clone1->GetGraph()->GetHistogram();
826 axey = hist->GetYaxis();
827 hist->SetMinimum(-0.5);
828 hist->SetMaximum(9.5);
829 axey->Set(10,-0.5,9.5);
830 axey->SetBinLabel(axey->FindFixBin(0),"Error");
831 axey->SetBinLabel(axey->FindFixBin(1),"Alarm");
832 axey->SetBinLabel(axey->FindFixBin(3),"Hot");
833 axey->SetBinLabel(axey->FindFixBin(5),"Ok");
834 axey->SetBinLabel(axey->FindFixBin(6),"Warm");
835 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
836 hist->SetLabelSize(0.09,"Y");
837 hist->SetLabelSize(0.04,"X");
838 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
839 hist->SetXTitle("Time");
840 hist->SetYTitle("");
841 }
842
843
844 // ***************************** LV power supplies **************************
845 if ((d = evtloop.GetDisplay()))
846 TCanvas &c5 = d.AddTab("CAMERA LV");
847 else
848 TCanvas *c5 = new TCanvas();
849 c5->Divide(2,2);
850 c5->cd(1);
851 g = hLVTemp.GetGraph();
852 g->SetMarkerColor(2);
853 g->SetLineColor(2);
854 g->SetTitle("LV temperature");
855 clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew");
856 if(clone1->GetGraph()->GetN())
857 {
858 hist = clone1->GetGraph()->GetHistogram();
859 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
860 hist->SetXTitle("Time");
861 hist->SetYTitle("Temperature [\\circ]");
862 hist->SetLabelSize(0.04,"X");
863 }
864 c5->cd(2);
865 g = hLVHum.GetGraph();
866 g->SetMarkerColor(4);
867 g->SetLineColor(4);
868 g->SetTitle("LV humidity");
869 clone1 = (MHVsTime*)hLVHum.DrawClone("nonew");
870 if(clone1->GetGraph()->GetN())
871 {
872 hist = clone1->GetGraph()->GetHistogram();
873 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
874 hist->SetXTitle("Time");
875 hist->SetYTitle("Humidity [%]");
876 hist->SetLabelSize(0.04,"X");
877 }
878 c5->cd(3);
879 g = hLVStatus.GetGraph();
880 g->SetMarkerStyle(kFullDotSmall);
881 g->SetTitle("LV status");
882 clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew");
883 if(clone1->GetGraph()->GetN())
884 {
885 hist = clone1->GetGraph()->GetHistogram();
886 axey = hist->GetYaxis();
887 hist->SetMinimum(-0.5);
888 hist->SetMaximum(9.5);
889 axey->Set(10,-0.5,9.5);
890 axey->SetBinLabel(axey->FindFixBin(0),"Error");
891 axey->SetBinLabel(axey->FindFixBin(1),"Alarm");
892 axey->SetBinLabel(axey->FindFixBin(2),"Trip");
893 axey->SetBinLabel(axey->FindFixBin(4),"Off");
894 axey->SetBinLabel(axey->FindFixBin(5),"On");
895 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
896 hist->SetLabelSize(0.04,"X");
897 hist->SetLabelSize(0.05,"Y");
898 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
899 hist->SetXTitle("Time");
900 hist->SetYTitle("");
901 }
902 c5->cd(4);
903 g = hLVRPS.GetGraph();
904 g->SetMarkerStyle(kFullDotSmall);
905 g->SetTitle("LV request power supply");
906 clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew");
907 if(clone1->GetGraph()->GetN())
908 {
909 hist = clone1->GetGraph()->GetHistogram();
910 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
911 hist->SetXTitle("Time");
912 hist->SetYTitle("");
913 hist->SetLabelSize(0.04,"X");
914 axey = hist->GetYaxis();
915 hist->SetMinimum(-0.5);
916 hist->SetMaximum(1.5);
917 axey->Set(2, -0.5, 1.5);
918 axey->SetBinLabel(axey->FindFixBin(0), "OFF");
919 axey->SetBinLabel(axey->FindFixBin(1), "ON");
920 }
921 // ****************************** Cooling ***********************************
922 if ((d = evtloop.GetDisplay()))
923 TCanvas &c6 = d.AddTab("COOLING SYSTEM");
924 else
925 TCanvas *c6 = new TCanvas();
926 gStyle->SetPadGridX(kTRUE);
927 gStyle->SetPadGridY(kTRUE);
928 c6->Divide(2,2);
929 c6->cd(1);
930 // -------------------------- Camera temperatures ---------------------------
931 TLegend *legtemp = new TLegend(0.75,0.80,0.99,0.99);
932 g = hTCenter.GetGraph();
933 g->SetMarkerColor(8);
934 g->SetLineColor(8);
935 g->SetTitle("Camera temperature");
936 legtemp->AddEntry(g,"camera center","l");
937 clone1 = (MHVsTime*)hTCenter.DrawClone("nonew");
938 if(clone1->GetGraph()->GetN())
939 {
940 hist = clone1->GetGraph()->GetHistogram();
941 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
942 hist->SetXTitle("Time");
943 hist->SetYTitle("Temperature [\\circ C]");
944 hist->SetLabelSize(0.04,"X");
945 hist->SetMinimum(0);
946 }
947 g = hTWall.GetGraph();
948 g->SetMarkerColor(12);
949 g->SetLineColor(12);
950 legtemp->AddEntry(g,"camera wall","l");
951 clone1 = (MHVsTime*)hTWall.DrawClone("nonewsame");
952 g = hTWater.GetGraph();
953 g->SetMarkerColor(4);
954 g->SetLineColor(4);
955 legtemp->AddEntry(g,"water deposit","l");
956 clone1 = (MHVsTime*)hTWater.DrawClone("nonewsame");
957 g = hTOptLink.GetGraph();
958 g->SetMarkerColor(2);
959 g->SetLineColor(2);
960 legtemp->AddEntry(g,"optical links","l");
961 clone1 = (MHVsTime*)hTOptLink.DrawClone("nonewsame");
962 legtemp->DrawClone();
963 c6->cd(2);
964 g = hCoolStatus.GetGraph();
965 g->SetMarkerStyle(kFullDotSmall);
966 g->SetTitle("Camera cooling status");
967 clone1 = (MHVsTime*)hCoolStatus.DrawClone("nonew");
968 if(clone1->GetGraph()->GetN())
969 {
970 hist = clone1->GetGraph()->GetHistogram();
971 axey = hist->GetYaxis();
972 hist->SetMinimum(-0.5);
973 hist->SetMaximum(9.5);
974 axey->Set(10,-0.5,9.5);
975 axey->SetBinLabel(axey->FindFixBin(0),"Error");
976 axey->SetBinLabel(axey->FindFixBin(1),"Alarm");
977 axey->SetBinLabel(axey->FindFixBin(4),"Off");
978 axey->SetBinLabel(axey->FindFixBin(5),"Ok");
979 axey->SetBinLabel(axey->FindFixBin(6),"Temp.Warning");
980 axey->SetBinLabel(axey->FindFixBin(7),"Cond.Warning");
981 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
982 hist->SetLabelSize(0.04,"X");
983 hist->SetLabelSize(0.05,"Y");
984 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
985 hist->SetXTitle("Time");
986 hist->SetYTitle("");
987 }
988 // ------------------------- Camera relative humidity -----------------------
989 c6->cd(3);
990 TLegend *leghum = new TLegend(0.75,0.85,0.99,0.99);
991 g = hHCenter.GetGraph();
992 g->SetMarkerColor(8);
993 g->SetLineColor(8);
994 g->SetTitle("Camera relative humidity");
995 leghum->AddEntry(g,"camera center","l");
996 clone1 = (MHVsTime*)hHCenter.DrawClone("nonew");
997 if(clone1->GetGraph()->GetN())
998 {
999 hist = clone1->GetGraph()->GetHistogram();
1000 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1001 hist->SetXTitle("Time");
1002 hist->SetYTitle("Relative humidity [%]");
1003 hist->SetLabelSize(0.04,"X");
1004 hist->SetMaximum(50);
1005 hist->SetMinimum(0);
1006 }
1007 g = hHWall.GetGraph();
1008 g->SetMarkerColor(12);
1009 g->SetLineColor(12);
1010 leghum->AddEntry(g,"camera wall","l");
1011 clone1 = (MHVsTime*)hHWall.DrawClone("nonewsame");
1012 leghum->DrawClone();
1013 // ---------------------- Temperature distribution --------------------------
1014 c6->cd(4);
1015 hist = hTempOptLink.GetHistByName("TOptLink");
1016 hist->SetXTitle("Temperature [\\circ C]");
1017 hist->SetYTitle("");
1018 hist->SetLineColor(2);
1019 hist->SetTitle("Distribution of opt. links temperature");
1020 hist->SetLabelSize(0.04,"X");
1021 hist->SetStats(0);
1022 mh3 = (MH3*)hTempOptLink.DrawClone("nonew");
1023 //
1024 // **************************** Trigger report ******************************
1025 //
1026 if ((d = evtloop.GetDisplay()))
1027 TCanvas &c7 = d.AddTab("TRIGGER SYSTEM");
1028 else
1029 TCanvas *c7 = new TCanvas();
1030 c7->Divide(1,3);
1031 c7->cd(1);
1032 gStyle->SetPadGridX(kTRUE);
1033 gStyle->SetPadGridY(kTRUE);
1034 gPad->SetLogy();
1035 TLegend *legtrig = new TLegend(0.85,0.85,0.99,0.99);
1036 g = hTrigBL2.GetGraph();
1037 g->SetMarkerStyle(kFullDotSmall);
1038 g->SetMarkerColor(2);
1039 g->SetLineColor(2);
1040 g->SetTitle("L2 trigger rate");
1041 legtrig->AddEntry(g,"Before prescaler","l");
1042 clone1 = (MHVsTime*)hTrigBL2.DrawClone("nonew");
1043 if(clone1->GetGraph()->GetN())
1044 {
1045 hist = clone1->GetGraph()->GetHistogram();
1046 hist->SetMinimum(1);
1047 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1048 hist->SetLabelSize(0.06,"X");
1049 hist->SetLabelSize(0.06,"Y");
1050 hist->SetTitleSize(0.06,"X");
1051 hist->SetTitleSize(0.06,"Y");
1052 hist->SetXTitle("Time");
1053 hist->SetYTitle("L2 trigger rate [Hz]");
1054 }
1055 g = hTrigAL2.GetGraph();
1056 g->SetMarkerColor(4);
1057 g->SetLineColor(4);
1058 legtrig->AddEntry(g,"After prescaler","l");
1059 clone1 = (MHVsTime*)hTrigAL2.DrawClone("nonewsame");
1060 legtrig->DrawClone();
1061 c7->cd(2);
1062 gPad->SetLogy();
1063 hist = hTrigZd.GetHistByName("TrigZd");
1064 hist->SetLabelSize(0.06,"X");
1065 hist->SetLabelSize(0.06,"Y");
1066 hist->SetTitleSize(0.06,"X");
1067 hist->SetTitleSize(0.06,"Y");
1068 hist->SetXTitle("Zenith angle[\\circ]");
1069 hist->SetYTitle("Trigger rate [Hz]");
1070 hist->SetMarkerColor(4);
1071 hist->SetTitle("L2 trigger rate after prescaler");
1072 hist->SetStats(0);
1073 mh3 = (MH3*)hTrigZd.DrawClone("nonew");
1074 hist->SetMinimum(1);
1075 c7->cd(3);
1076 g = hTrigStatus.GetGraph();
1077 g->SetMarkerStyle(kFullDotSmall);
1078 g->SetTitle("Trigger status");
1079 clone1 = (MHVsTime*)hTrigStatus.DrawClone("nonew");
1080 if(clone1->GetGraph()->GetN())
1081 {
1082 hist = clone1->GetGraph()->GetHistogram();
1083 axey = hist->GetYaxis();
1084 hist->SetMinimum(-0.5);
1085 hist->SetMaximum(5.5);
1086 axey->Set(6,-0.5,5.5);
1087 axey->SetBinLabel(axey->FindFixBin(0),"Error");
1088 axey->SetBinLabel(axey->FindFixBin(1),"Idle");
1089 axey->SetBinLabel(axey->FindFixBin(2),"Loading");
1090 axey->SetBinLabel(axey->FindFixBin(3),"Ready");
1091 axey->SetBinLabel(axey->FindFixBin(4),"Active");
1092 axey->SetBinLabel(axey->FindFixBin(5),"Stopped");
1093 hist->SetLabelSize(0.07,"Y");
1094 hist->SetLabelSize(0.06,"X");
1095 hist->SetTitleSize(0.06,"X");
1096 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1097 hist->SetXTitle("Time");
1098 hist->SetYTitle("");
1099 }
1100 // ***************************** Trigger of macrocells **********************
1101 if ((d = evtloop.GetDisplay()))
1102 TCanvas &c8 = d.AddTab("TRIG. MACROCELLs");
1103 else
1104 TCanvas *c8 = new TCanvas();
1105 c8->Divide(2,2);
1106 c8->cd(1);
1107 gPad->SetLogy();
1108 TLegend *legtrig = new TLegend(0.80,0.80,0.99,0.99);
1109 g = htrigmc1.GetGraph();
1110 g->SetMarkerStyle(kFullDotSmall);
1111 g->SetMarkerColor(2);
1112 g->SetLineColor(2);
1113 g->SetTitle("Trigger rate of macrocell 1 : (maximum)");
1114 pixclone1 = (MHPixVsTime*)htrigmc1.DrawClone("nonew");
1115 if(clone1->GetGraph()->GetN())
1116 {
1117 hist = htrigmc1->GetGraph()->GetHistogram();
1118 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1119 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1120 hist->SetMinimum(1);
1121 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1122 hist->SetXTitle("Time");
1123 hist->SetYTitle("Trigger [Hz]");
1124 hist->SetLabelSize(0.04,"X");
1125 hist->SetLabelSize(0.05,"Y");
1126 }
1127 legtrig->AddEntry(hist,Form("Mc 1: %3.0e",hist->GetMaximum()),"p");
1128 legtrig->DrawClone();
1129 c8->cd(2);
1130 gPad->SetLogy();
1131 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99);
1132 g = htrigmc2.GetGraph();
1133 g->SetMarkerStyle(kFullDotSmall);
1134 g->SetMarkerColor(2);
1135 g->SetTitle("Trigger rate of macrocells 2-7 : (maximum)");
1136 pixclone1 = (MHPixVsTime*)htrigmc2.DrawClone("nonew");
1137 if(clone1->GetGraph()->GetN())
1138 {
1139 hist = pixclone1->GetGraph()->GetHistogram();
1140 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1141 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1142 hist->SetMinimum(1);
1143 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1144 hist->SetXTitle("Time");
1145 hist->SetYTitle("Trigger [Hz]");
1146 hist->SetLabelSize(0.04,"X");
1147 hist->SetLabelSize(0.05,"Y");
1148 }
1149 legtrig->AddEntry(hist,Form("Mc 2: %3.0e",hist->GetMaximum()),"p");
1150 g=htrigmc3.GetGraph();
1151 g->SetMarkerStyle(kFullDotSmall);
1152 g->SetMarkerColor(3);
1153 if(htrigmc3.GetGraph()->GetN())
1154 {
1155 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1156 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1157 legtrig->AddEntry(g,Form("Mc 3: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1158 }
1159 pixclone1 = (MHPixVsTime*)htrigmc3.DrawClone("nonewsame");
1160 g=htrigmc4.GetGraph();
1161 g->SetMarkerStyle(kFullDotSmall);
1162 g->SetMarkerColor(4);
1163 if(htrigmc4.GetGraph()->GetN())
1164 {
1165 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1166 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1167 legtrig->AddEntry(g,Form("Mc 4: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1168 }
1169 pixclone1 = (MHPixVsTime*)htrigmc4.DrawClone("nonewsame");
1170 g=htrigmc5.GetGraph();
1171 g->SetMarkerStyle(kFullDotSmall);
1172 g->SetMarkerColor(5);
1173 if(htrigmc5.GetGraph()->GetN())
1174 {
1175 legtrig->AddEntry(g,Form("Mc 5: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1176 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1177 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1178 }
1179 pixclone1 = (MHPixVsTime*)htrigmc5.DrawClone("nonewsame");
1180 g=htrigmc6.GetGraph();
1181 g->SetMarkerStyle(kFullDotSmall);
1182 g->SetMarkerColor(6);
1183 if(htrigmc6.GetGraph()->GetN())
1184 {
1185 legtrig->AddEntry(g,Form("Mc 6: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1186 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1187 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1188 }
1189 pixclone1 = (MHPixVsTime*)htrigmc6.DrawClone("nonewsame");
1190 g=htrigmc7.GetGraph();
1191 g->SetMarkerStyle(kFullDotSmall);
1192 g->SetMarkerColor(7);
1193 if(htrigmc7.GetGraph()->GetN())
1194 {
1195 legtrig->AddEntry(g,Form("Mc 7: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1196 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1197 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1198 }
1199 pixclone1 = (MHPixVsTime*)htrigmc7.DrawClone("nonewsame");
1200 legtrig->DrawClone();
1201 c8->cd(3);
1202 gPad->SetLogy();
1203 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99);
1204 g = htrigmc8.GetGraph();
1205 g->SetMarkerStyle(kFullDotSmall);
1206 g->SetMarkerColor(2);
1207 g->SetTitle("Trigger rate of macrocells 8-13 : (maximum)");
1208 if(htrigmc8.GetGraph()->GetN())
1209 {
1210 legtrig->AddEntry(g,Form("Mc 8: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1211 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1212 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1213 }
1214 pixclone1 = (MHPixVsTime*)htrigmc8.DrawClone("nonew");
1215 if(clone1->GetGraph()->GetN())
1216 {
1217 hist = pixclone1->GetGraph()->GetHistogram();
1218 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1219 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1220 hist->SetMinimum(1);
1221 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1222 hist->SetXTitle("Time");
1223 hist->SetYTitle("Trigger [Hz]");
1224 hist->SetLabelSize(0.04,"X");
1225 hist->SetLabelSize(0.05,"Y");
1226 }
1227 g=htrigmc9.GetGraph();
1228 g->SetMarkerStyle(kFullDotSmall);
1229 g->SetMarkerColor(3);
1230 if(htrigmc9.GetGraph()->GetN())
1231 {
1232 legtrig->AddEntry(g,Form("Mc 9: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1233 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1234 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1235 }
1236 pixclone1 = (MHPixVsTime*)htrigmc9.DrawClone("nonewsame");
1237 g=htrigmc10.GetGraph();
1238 g->SetMarkerStyle(kFullDotSmall);
1239 g->SetMarkerColor(4);
1240 if(htrigmc10.GetGraph()->GetN())
1241 {
1242 legtrig->AddEntry(g,Form("Mc 10: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1243 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1244 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1245 }
1246 pixclone1 = (MHPixVsTime*)htrigmc10.DrawClone("nonewsame");
1247 g=htrigmc11.GetGraph();
1248 g->SetMarkerStyle(kFullDotSmall);
1249 g->SetMarkerColor(5);
1250 if(htrigmc11.GetGraph()->GetN())
1251 {
1252 legtrig->AddEntry(g,Form("Mc 11: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1253 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1254 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1255 }
1256 pixclone1 = (MHPixVsTime*)htrigmc11.DrawClone("nonewsame");
1257 g=htrigmc12.GetGraph();
1258 g->SetMarkerStyle(kFullDotSmall);
1259 g->SetMarkerColor(6);
1260 if(htrigmc12.GetGraph()->GetN())
1261 {
1262 legtrig->AddEntry(g,Form("Mc 12: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1263 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1264 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1265 }
1266 pixclone1 = (MHPixVsTime*)htrigmc12.DrawClone("nonewsame");
1267 g=htrigmc13.GetGraph();
1268 g->SetMarkerStyle(kFullDotSmall);
1269 g->SetMarkerColor(7);
1270 if(htrigmc13.GetGraph()->GetN())
1271 {
1272 legtrig->AddEntry(g,Form("Mc 13: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1273 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1274 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1275 }
1276 pixclone1 = (MHPixVsTime*)htrigmc13.DrawClone("nonewsame");
1277 legtrig->DrawClone();
1278 c8->cd(4);
1279 gPad->SetLogy();
1280 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99);
1281 TGraph *g = htrigmc14.GetGraph();
1282 g->SetMarkerStyle(kFullDotSmall);
1283 g->SetMarkerColor(2);
1284 if(htrigmc14.GetGraph()->GetN())
1285 legtrig->AddEntry(g,Form("Mc 14: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1286 g->SetTitle("Trigger rate of macrocells 14-19 : (maximum)");
1287 pixclone1 = (MHPixVsTime*)htrigmc14.DrawClone("nonew");
1288 if(clone1->GetGraph()->GetN())
1289 {
1290 hist = pixclone1->GetGraph()->GetHistogram();
1291 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1292 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1293 hist->SetMinimum(1);
1294 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1295 hist->SetXTitle("Time");
1296 hist->SetYTitle("Trigger [Hz]");
1297 hist->SetLabelSize(0.04,"X");
1298 hist->SetLabelSize(0.05,"Y");
1299 }
1300 g=htrigmc15.GetGraph();
1301 g->SetMarkerStyle(kFullDotSmall);
1302 g->SetMarkerColor(3);
1303 if(htrigmc15.GetGraph()->GetN())
1304 {
1305 legtrig->AddEntry(g,Form("Mc 15: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1306 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1307 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1308 }
1309 pixclone1 = (MHPixVsTime*)htrigmc15.DrawClone("nonewsame");
1310 g=htrigmc16.GetGraph();
1311 g->SetMarkerStyle(kFullDotSmall);
1312 g->SetMarkerColor(4);
1313 if(htrigmc16.GetGraph()->GetN())
1314 {
1315 legtrig->AddEntry(g,Form("Mc 16: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1316 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1317 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1318 }
1319 pixclone1 = (MHPixVsTime*)htrigmc16.DrawClone("nonewsame");
1320 g=htrigmc17.GetGraph();
1321 g->SetMarkerStyle(kFullDotSmall);
1322 g->SetMarkerColor(5);
1323 if(htrigmc17.GetGraph()->GetN())
1324 {
1325 legtrig->AddEntry(g,Form("Mc 17: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1326 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1327 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1328 }
1329 pixclone1 = (MHPixVsTime*)htrigmc17.DrawClone("nonewsame");
1330 g=htrigmc18.GetGraph();
1331 g->SetMarkerStyle(kFullDotSmall);
1332 g->SetMarkerColor(6);
1333 if(htrigmc18.GetGraph()->GetN())
1334 {
1335 legtrig->AddEntry(g,Form("Mc 18: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1336 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1337 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1338 }
1339 pixclone1 = (MHPixVsTime*)htrigmc18.DrawClone("nonewsame");
1340 g=htrigmc19.GetGraph();
1341 g->SetMarkerStyle(kFullDotSmall);
1342 g->SetMarkerColor(7);
1343 if(htrigmc19.GetGraph()->GetN())
1344 {
1345 legtrig->AddEntry(g,Form("Mc 19: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1346 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1347 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1348 }
1349 pixclone1 = (MHPixVsTime*)htrigmc19.DrawClone("nonewsame");
1350 legtrig->DrawClone();
1351
1352 //
1353 // *************************** Weather station ******************************
1354 //
1355 if ((d = evtloop.GetDisplay()))
1356 TCanvas &c9 = d.AddTab("WEATHER STATION");
1357 else
1358 TCanvas *c9 = new TCanvas();
1359 c9->Divide(2,2);
1360 // ----------------------- Relative humidity --------------------------------
1361 c9->cd(1);
1362 g = hCCHum.GetGraph();
1363 g->SetMarkerStyle(kFullDotSmall);
1364 g->SetMarkerColor(4);
1365 g->SetLineColor(4);
1366 g->SetTitle("Relative humidity outside");
1367 clone1 = (MHVsTime*)hCCHum.DrawClone("nonew");
1368 if(clone1->GetGraph()->GetN())
1369 {
1370 hist = clone1->GetGraph()->GetHistogram();
1371 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1372 hist->SetXTitle("Time");
1373 hist->SetYTitle("Humidity [%]");
1374 }
1375 // -------------------------- Temperature -----------------------------------
1376 c9->cd(2);
1377 g = hCCTemp.GetGraph();
1378 g->SetMarkerStyle(kFullDotSmall);
1379 g->SetMarkerColor(2);
1380 g->SetLineColor(2);
1381 g->SetTitle("Temperature outside");
1382 clone1 = (MHVsTime*)hCCTemp.DrawClone("nonew");
1383 if(clone1->GetGraph()->GetN())
1384 {
1385 hist = clone1->GetGraph()->GetHistogram();
1386 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1387 hist->SetXTitle("Time");
1388 hist->SetYTitle("Temperature [\\circ C]");
1389 }
1390 // --------------------------- Wind speed -----------------------------------
1391 c9->cd(3);
1392 g = hCCWS.GetGraph();
1393 g->SetMarkerStyle(kFullDotSmall);
1394 g->SetMarkerColor(3);
1395 g->SetLineColor(3);
1396 g->SetTitle("Wind speed outside");
1397 clone1 = (MHVsTime*)hCCWS.DrawClone("nonew");
1398 if(clone1->GetGraph()->GetN())
1399 {
1400 hist = clone1->GetGraph()->GetHistogram();
1401 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1402 hist->SetXTitle("Time");
1403 hist->SetYTitle("Wind speed [km/h]");
1404 }
1405 // -------------------------- Solar radiation -------------------------------
1406 c9->cd(4);
1407 g = hCCSR.GetGraph();
1408 g->SetMarkerStyle(kFullDotSmall);
1409 g->SetMarkerColor(9);
1410 g->SetLineColor(9);
1411 g->SetTitle("Solar radiation outside");
1412 clone1 = (MHVsTime*)hCCSR.DrawClone("nonew");
1413 if(clone1->GetGraph()->GetN())
1414 {
1415 hist = clone1->GetGraph()->GetHistogram();
1416 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1417 hist->SetXTitle("Time");
1418 hist->SetYTitle("Solar radiation [W/m^2]");
1419 }
1420
1421 // Save data in a postscriptfile (filename.ps)
1422 TString file;
1423 if (filename.Last('.')>0)
1424 file = filename(0, filename.Last('.'));
1425
1426 // Make sure the display hasn't been deleted by the user while the
1427 // eventloop was running.
1428 if ((d = evtloop.GetDisplay()))
1429 d->SaveAsPS(directory+file+".ps");
1430 else
1431 {
1432 c1->Print(directory+file+".ps(");
1433 c2->Print(directory+file+".ps");
1434 c3->Print(directory+file+".ps");
1435 c4->Print(directory+file+".ps");
1436 c5->Print(directory+file+".ps");
1437 c6->Print(directory+file+".ps");
1438 c7->Print(directory+file+".ps");
1439 c8->Print(directory+file+".ps");
1440 c9->Print(directory+file+".ps)");
1441 }
1442}
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
Note: See TracBrowser for help on using the repository browser.