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

Last change on this file since 5611 was 3866, checked in by reyes, 21 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 if ((d = evtloop.GetDisplay()))
512 TCanvas &c1 = d.AddTab("DRIVE SYSTEM");
513 else
514 TCanvas *c1 = new TCanvas();
515 // ************* Plot the telescope tracking positions on the sky ***********
516 TGraph *g1 = hZd.GetGraph();
517 TGraph *g2 = hAz.GetGraph();
518 TPad *p = new TPad("", "",0,0.05,0.6,0.95);
519 p->Draw();
520 p->cd();
521 gPad->SetTheta(-90);
522 gPad->SetPhi(90);
523 gPad->SetBorderMode(0);
524 gStyle->SetOptStat(0);
525 TH2F h("pol", "Telescope Tracking Positions on the Sky", 16, 0, 1, 9, 0, 1);
526 h.DrawClone("surf1pol");
527 gPad->Modified();
528 gPad->Update();
529 TView *view = gPad->GetView();
530 if (!view)
531 {
532 cout << "No View!" << endl;
533 return;
534 }
535 Double_t *zd=g1->GetY();
536 Double_t *az=g2->GetY();
537 Double_t old[2] = {0,0};
538 for (int i=0; i<g1->GetN(); i++)
539 {
540 az[i] += 180;
541 az[i] *= TMath::Pi()/180;
542 Double_t x[3] = { zd[i]*cos(az[i])/90, zd[i]*sin(az[i])/90, 0};
543 Double_t y[3];
544 view->WCtoNDC(x, y);
545 if (old[0]!=0 && old[1]!=1)
546 {
547 TLine *l = new TLine(y[0], y[1], old[0], old[1]);
548 l->SetLineColor(kBlue);
549 l->Draw();
550 }
551 TMarker *m = new TMarker(y[0], y[1], kFullDotMedium);
552 m->SetMarkerColor(i==g1->GetN()-1 ? kGreen : kRed);
553 m->Draw();
554 old[0] = y[0];
555 old[1] = y[1];
556 }
557 // ---------------------- Control deviation of the motors -------------------
558 c1->cd();
559 p = new TPad("", "", 0.6, 0, 1, 0.29);
560 p->Draw();
561 p->cd();
562 gStyle->SetOptStat(1110);
563 gStyle->SetStatFormat(".2g");
564 mh3 = (MH3*)hError.DrawClone("nonew");
565 mh3->GetHist()->SetXTitle("\\Delta [arcmin]");
566 mh3->GetHist()->SetYTitle("");
567 mh3->GetHist()->SetTitle("Control deviation of the motors");
568 mh3->GetHist()->SetStats(1);
569 mh3->GetHist()->SetLabelSize(0.06,"X");
570 mh3->GetHist()->SetLabelSize(0.06,"Y");
571 mh3->GetHist()->SetTitleSize(0.06,"X");
572 TLine ln;
573 ln.SetLineColor(kGreen);
574 ln.DrawLine(0.5*360*60/16384., 0, 0.5*360*60/16384., hError.GetHist()->GetMaximum());
575 ln.SetLineColor(kYellow);
576 ln.DrawLine(1.0*360*60/16384., 0, 1.0*360*60/16384., hError.GetHist()->GetMaximum());
577 ln.SetLineColor(kRed);
578 ln.DrawLine(2.0*360*60/16384., 0, 2.0*360*60/16384., hError.GetHist()->GetMaximum());
579 // ---------------------- Plot the drive status vs time ---------------------
580 c1->cd();
581 p = new TPad("", "", 0.6, 0.29, 1, 0.42);
582 p->Draw();
583 p->cd();
584 MHVsTime *hvt = (MHVsTime*)hDState.DrawClone("nonew");
585 hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
586 if (hvt->GetGraph()->GetN())
587 {
588 hist = hvt->GetGraph()->GetHistogram();
589 TAxis *axey = hist->GetYaxis();
590 TAxis *axex = hist->GetXaxis();
591 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
592 hist->SetXTitle("Time");
593 hist->SetYTitle("");
594 hist->SetTitle("");
595 hist->SetLabelSize(0.1,"X");
596 hist->SetTitleSize(0.06,"X");
597 hist->SetStats(0);
598 hist->SetMinimum(-0.5);
599 hist->SetMaximum(4.5);
600 axey->Set(5, -0.5, 4.5);
601 axey->SetBinLabel(axey->FindFixBin(0), "Error");
602 axey->SetBinLabel(axey->FindFixBin(1), "Stopped");
603 axey->SetBinLabel(axey->FindFixBin(3), "Moving");
604 axey->SetBinLabel(axey->FindFixBin(4), "Tracking");
605 axey->SetLabelSize(0.15);
606 axex->SetLabelSize(0.08);
607 axex->SetTitleSize(0.09);
608 axex->SetTitleOffset(0.45);
609 }
610 // --------------- Control deviation of the motors vs zenith angle ----------
611 c1->cd();
612 p = new TPad("", "", 0.6, 0.71, 1, 1);
613 p->Draw();
614 p->cd();
615 gStyle->SetOptStat(1110);
616 gStyle->SetStatFormat(".2g");
617 mh3 = (MH3*)hError2.DrawClone("nonew");
618 mh3->GetHist()->SetXTitle("Zd [\\circ]");
619 mh3->GetHist()->SetYTitle("\\Delta [arcmin]");
620 mh3->GetHist()->SetTitle("Control deviation of the motors");
621 mh3->GetHist()->SetLabelSize(0.06,"X");
622 mh3->GetHist()->SetLabelSize(0.06,"Y");
623 mh3->GetHist()->SetTitleSize(0.06,"X");
624 mh3->GetHist()->SetTitleSize(0.06,"Y");
625 mh3->GetHist()->SetStats(1);
626 mh3->GetHist()->Draw("box");
627 // -------------------------- Zenith angle vs time --------------------------
628 c1->cd();
629 p = new TPad("", "", 0.6, 0.42, 1, 0.71);
630 p->Draw();
631 p->cd();
632 gPad->SetBorderMode(0);
633 hvt = (MHVsTime*)hZd.DrawClone("nonew");
634 hvt->GetGraph()->SetMarkerStyle(kFullDotSmall);
635 if (hvt->GetGraph()->GetN())
636 {
637 hvt->GetGraph()->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
638 hvt->GetGraph()->GetHistogram()->SetXTitle("Time");
639 hvt->GetGraph()->GetHistogram()->SetYTitle("Zd [\\circ]");
640 hvt->GetGraph()->GetHistogram()->SetTitle("Zd vs. Time");
641 hvt->GetGraph()->GetHistogram()->SetLabelSize(0.06,"X");
642 hvt->GetGraph()->GetHistogram()->SetTitleSize(0.06,"X");
643 hvt->GetGraph()->GetHistogram()->SetLabelSize(0.06,"Y");
644 hvt->GetGraph()->GetHistogram()->SetTitleSize(0.06,"Y");
645 hvt->GetGraph()->GetHistogram()->SetStats(0);
646 }
647
648
649 //
650 // Camera report
651 //
652 // **************************** CAMERA STATUS ********************
653 if ((d = evtloop.GetDisplay()))
654 TCanvas &c2 = d.AddTab("CAMERA STATUS");
655 else
656 TCanvas *c2 = new TCanvas();
657 c2->Divide(1,2);
658 c2->cd(1);
659 g = hCamStatus.GetGraph();
660 g->SetMarkerStyle(kFullDotSmall);
661 g->SetTitle("Camera status");
662 clone1 = (MHVsTime*)hCamStatus.DrawClone("nonew");
663 if(clone1->GetGraph()->GetN())
664 {
665 hist = clone1->GetGraph()->GetHistogram();
666 axey = hist->GetYaxis();
667 hist->SetMinimum(-0.5);
668 hist->SetMaximum(9.5);
669 axey->Set(10,-0.5,9.5);
670 axey->SetBinLabel(axey->FindFixBin(0),"EROR");
671 axey->SetBinLabel(axey->FindFixBin(1),"ALARM");
672 axey->SetBinLabel(axey->FindFixBin(2),"BLOCKED!");
673 axey->SetBinLabel(axey->FindFixBin(3),"WARM!");
674 axey->SetBinLabel(axey->FindFixBin(4),"HOT");
675 axey->SetBinLabel(axey->FindFixBin(5),"HVRAMPING");
676 axey->SetBinLabel(axey->FindFixBin(6),"OK");
677 axey->SetBinLabel(axey->FindFixBin(7),"INIT");
678 axey->SetBinLabel(axey->FindFixBin(8),"SHUTD");
679 axey->SetBinLabel(axey->FindFixBin(9),"N/A");
680 hist->SetLabelSize(0.04,"X");
681 hist->SetLabelSize(0.05,"Y");
682 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
683 hist->SetXTitle("Time");
684 hist->SetYTitle("");
685 }
686 c2->cd(2);
687 g = hLidsStatus.GetGraph();
688 g->SetMarkerStyle(kFullDotSmall);
689 g->SetTitle("Camera Lids status");
690 clone1 = (MHVsTime*)hLidsStatus.DrawClone("nonew");
691 if(clone1->GetGraph()->GetN())
692 {
693 hist = clone1->GetGraph()->GetHistogram();
694 axey = hist->GetYaxis();
695 hist->SetMinimum(-0.5);
696 hist->SetMaximum(9.5);
697 axey->Set(10,-0.5,9.5);
698 axey->SetBinLabel(axey->FindFixBin(0),"Error");
699 axey->SetBinLabel(axey->FindFixBin(1),"SafetyLimit");
700 axey->SetBinLabel(axey->FindFixBin(4),"Closed");
701 axey->SetBinLabel(axey->FindFixBin(5),"Opened");
702 axey->SetBinLabel(axey->FindFixBin(6),"Moving");
703 axey->SetBinLabel(axey->FindFixBin(7),"Stopped");
704 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
705 hist->SetLabelSize(0.04,"X");
706 hist->SetLabelSize(0.06,"Y");
707 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
708 hist->SetXTitle("Time");
709 hist->SetYTitle("");
710 }
711 // ************************* HV of power supplies ***************************
712 if ((d = evtloop.GetDisplay()))
713 TCanvas &c3 = d.AddTab("CAMERA HV");
714 else
715 TCanvas *c3 = new TCanvas();
716 c3->Divide(2,2);
717 c3->cd(1);
718 // --------------- Power supplies and HV settings --------------------------
719 TLegend *legHV = new TLegend(0.75,0.85,0.99,0.99);
720 g = hHVA.GetGraph();
721 g->SetMarkerColor(2);
722 g->SetLineColor(2);
723 g->SetTitle("Voltages of power supplies and camera settings");
724 legHV->AddEntry(g,"PS A (hvps1)","l");
725 clone1 = (MHVsTime*)hHVA.DrawClone("nonew");
726 if(clone1->GetGraph()->GetN())
727 {
728 hist = clone1->GetGraph()->GetHistogram();
729 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
730 hist->SetXTitle("Time");
731 hist->SetYTitle("High voltage [V]");
732 hist->SetLabelSize(0.04,"X");
733 hist->SetMinimum(0);
734 }
735 g = hHVB.GetGraph();
736 g->SetMarkerColor(3);
737 g->SetLineColor(3);
738 legHV->AddEntry(g,"PS B (hvps2)","l");
739 clone1 = (MHVsTime*)hHVB.DrawClone("nonewsame");
740 g = hCamMean.GetGraph();
741 g->SetMarkerColor(4);
742 g->SetLineColor(4);
743 legHV->AddEntry(g,"Camera mean HV","l");
744 clone1 = (MHVsTime*)hCamMean.DrawClone("nonewsame");
745 legHV->DrawClone();
746 // ---------------------------- HV status -----------------------------------
747 c3->cd(2);
748 g = hHVStatus.GetGraph();
749 g->SetMarkerStyle(kFullDotSmall);
750 g->SetTitle("Camera HV status");
751 clone1 = (MHVsTime*)hHVStatus.DrawClone("nonew");
752 if(clone1->GetGraph()->GetN())
753 {
754 hist = clone1->GetGraph()->GetHistogram();
755 axey = hist->GetYaxis();
756 hist->SetMinimum(-0.5);
757 hist->SetMaximum(9.5);
758 axey->Set(10,-0.5,9.5);
759 axey->SetBinLabel(axey->FindFixBin(0),"Error");
760 axey->SetBinLabel(axey->FindFixBin(1),"Mismatch");
761 axey->SetBinLabel(axey->FindFixBin(2),"Trip");
762 axey->SetBinLabel(axey->FindFixBin(3),"Ramping");
763 axey->SetBinLabel(axey->FindFixBin(4),"Off");
764 axey->SetBinLabel(axey->FindFixBin(5),"Nominal");
765 axey->SetBinLabel(axey->FindFixBin(6),"LimCurrentWarning");
766 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
767 hist->SetLabelSize(0.04,"X");
768 hist->SetLabelSize(0.05,"Y");
769 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
770 hist->SetXTitle("Time");
771 hist->SetYTitle("");
772 }
773 // ---------------------------- HV settings ---------------------------------
774 c3->cd(3);
775 Sum = (MHCamera*)HVdisplay.GetHistByName("sum");
776 TVirtualPad *c = gPad;
777 c->cd(1);
778 gPad->SetBorderMode(0);
779 Sum->SetYTitle("Mean");
780 Sum->DrawClone("pixelindex");
781 c3->cd(4);
782 gPad->SetBorderMode(0);
783 Sum->SetYTitle("Mean HV settings");
784 Sum->DrawClone("EPhist");
785
786 // ******************** Currents of power supplies *******************
787 if ((d = evtloop.GetDisplay()))
788 TCanvas &c4 = d.AddTab("CAMERA DC");
789 else
790 TCanvas *c4 = new TCanvas();
791 // ----------------------------- Power supplies ------------------------------
792 c4->Divide(1,2);
793 c4->cd(1);
794 TLegend *legC = new TLegend(0.85,0.75,0.99,0.99);
795 g = hCA.GetGraph();
796 g->SetMarkerColor(2);
797 g->SetLineColor(2);
798 g->SetTitle("Currents of power supplies");
799 legC->AddEntry(g,"PS A (curr1)","l");
800 clone1 = (MHVsTime*)hCA.DrawClone("nonew");
801 if(clone1->GetGraph()->GetN())
802 {
803 hist = clone1->GetGraph()->GetHistogram();
804 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
805 hist->SetXTitle("Time");
806 hist->SetYTitle("Current [mA]");
807 hist->SetLabelSize(0.04,"X");
808 hist->SetMinimum(0);
809 }
810 g = hCB.GetGraph();
811 g->SetMarkerColor(3);
812 g->SetLineColor(3);
813 legC->AddEntry(g,"PS B (curr2)","l");
814 clone1 = (MHVsTime*)hCB.DrawClone("nonewsame");
815 legC->DrawClone();
816 c4->cd(2);
817 g = hCamStatusDC.GetGraph();
818 g->SetMarkerStyle(kFullDotSmall);
819 g->SetTitle("Camera DC status");
820 clone1 = (MHVsTime*)hCamStatusDC.DrawClone("nonew");
821 if(clone1->GetGraph()->GetN())
822 {
823 hist = clone1->GetGraph()->GetHistogram();
824 axey = hist->GetYaxis();
825 hist->SetMinimum(-0.5);
826 hist->SetMaximum(9.5);
827 axey->Set(10,-0.5,9.5);
828 axey->SetBinLabel(axey->FindFixBin(0),"Error");
829 axey->SetBinLabel(axey->FindFixBin(1),"Alarm");
830 axey->SetBinLabel(axey->FindFixBin(3),"Hot");
831 axey->SetBinLabel(axey->FindFixBin(5),"Ok");
832 axey->SetBinLabel(axey->FindFixBin(6),"Warm");
833 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
834 hist->SetLabelSize(0.09,"Y");
835 hist->SetLabelSize(0.04,"X");
836 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
837 hist->SetXTitle("Time");
838 hist->SetYTitle("");
839 }
840
841
842 // ***************************** LV power supplies **************************
843 if ((d = evtloop.GetDisplay()))
844 TCanvas &c5 = d.AddTab("CAMERA LV");
845 else
846 TCanvas *c5 = new TCanvas();
847 c5->Divide(2,2);
848 c5->cd(1);
849 g = hLVTemp.GetGraph();
850 g->SetMarkerColor(2);
851 g->SetLineColor(2);
852 g->SetTitle("LV temperature");
853 clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew");
854 if(clone1->GetGraph()->GetN())
855 {
856 hist = clone1->GetGraph()->GetHistogram();
857 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
858 hist->SetXTitle("Time");
859 hist->SetYTitle("Temperature [\\circ]");
860 hist->SetLabelSize(0.04,"X");
861 }
862 c5->cd(2);
863 g = hLVHum.GetGraph();
864 g->SetMarkerColor(4);
865 g->SetLineColor(4);
866 g->SetTitle("LV humidity");
867 clone1 = (MHVsTime*)hLVHum.DrawClone("nonew");
868 if(clone1->GetGraph()->GetN())
869 {
870 hist = clone1->GetGraph()->GetHistogram();
871 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
872 hist->SetXTitle("Time");
873 hist->SetYTitle("Humidity [%]");
874 hist->SetLabelSize(0.04,"X");
875 }
876 c5->cd(3);
877 g = hLVStatus.GetGraph();
878 g->SetMarkerStyle(kFullDotSmall);
879 g->SetTitle("LV status");
880 clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew");
881 if(clone1->GetGraph()->GetN())
882 {
883 hist = clone1->GetGraph()->GetHistogram();
884 axey = hist->GetYaxis();
885 hist->SetMinimum(-0.5);
886 hist->SetMaximum(9.5);
887 axey->Set(10,-0.5,9.5);
888 axey->SetBinLabel(axey->FindFixBin(0),"Error");
889 axey->SetBinLabel(axey->FindFixBin(1),"Alarm");
890 axey->SetBinLabel(axey->FindFixBin(2),"Trip");
891 axey->SetBinLabel(axey->FindFixBin(4),"Off");
892 axey->SetBinLabel(axey->FindFixBin(5),"On");
893 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
894 hist->SetLabelSize(0.04,"X");
895 hist->SetLabelSize(0.05,"Y");
896 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
897 hist->SetXTitle("Time");
898 hist->SetYTitle("");
899 }
900 c5->cd(4);
901 g = hLVRPS.GetGraph();
902 g->SetMarkerStyle(kFullDotSmall);
903 g->SetTitle("LV request power supply");
904 clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew");
905 if(clone1->GetGraph()->GetN())
906 {
907 hist = clone1->GetGraph()->GetHistogram();
908 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
909 hist->SetXTitle("Time");
910 hist->SetYTitle("");
911 hist->SetLabelSize(0.04,"X");
912 axey = hist->GetYaxis();
913 hist->SetMinimum(-0.5);
914 hist->SetMaximum(1.5);
915 axey->Set(2, -0.5, 1.5);
916 axey->SetBinLabel(axey->FindFixBin(0), "OFF");
917 axey->SetBinLabel(axey->FindFixBin(1), "ON");
918 }
919 // ****************************** Cooling ***********************************
920 if ((d = evtloop.GetDisplay()))
921 TCanvas &c6 = d.AddTab("COOLING SYSTEM");
922 else
923 TCanvas *c6 = new TCanvas();
924 gStyle->SetPadGridX(kTRUE);
925 gStyle->SetPadGridY(kTRUE);
926 c6->Divide(2,2);
927 c6->cd(1);
928 // -------------------------- Camera temperatures ---------------------------
929 TLegend *legtemp = new TLegend(0.75,0.80,0.99,0.99);
930 g = hTCenter.GetGraph();
931 g->SetMarkerColor(8);
932 g->SetLineColor(8);
933 g->SetTitle("Camera temperature");
934 legtemp->AddEntry(g,"camera center","l");
935 clone1 = (MHVsTime*)hTCenter.DrawClone("nonew");
936 if(clone1->GetGraph()->GetN())
937 {
938 hist = clone1->GetGraph()->GetHistogram();
939 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
940 hist->SetXTitle("Time");
941 hist->SetYTitle("Temperature [\\circ C]");
942 hist->SetLabelSize(0.04,"X");
943 hist->SetMinimum(0);
944 }
945 g = hTWall.GetGraph();
946 g->SetMarkerColor(12);
947 g->SetLineColor(12);
948 legtemp->AddEntry(g,"camera wall","l");
949 clone1 = (MHVsTime*)hTWall.DrawClone("nonewsame");
950 g = hTWater.GetGraph();
951 g->SetMarkerColor(4);
952 g->SetLineColor(4);
953 legtemp->AddEntry(g,"water deposit","l");
954 clone1 = (MHVsTime*)hTWater.DrawClone("nonewsame");
955 g = hTOptLink.GetGraph();
956 g->SetMarkerColor(2);
957 g->SetLineColor(2);
958 legtemp->AddEntry(g,"optical links","l");
959 clone1 = (MHVsTime*)hTOptLink.DrawClone("nonewsame");
960 legtemp->DrawClone();
961 c6->cd(2);
962 g = hCoolStatus.GetGraph();
963 g->SetMarkerStyle(kFullDotSmall);
964 g->SetTitle("Camera cooling status");
965 clone1 = (MHVsTime*)hCoolStatus.DrawClone("nonew");
966 if(clone1->GetGraph()->GetN())
967 {
968 hist = clone1->GetGraph()->GetHistogram();
969 axey = hist->GetYaxis();
970 hist->SetMinimum(-0.5);
971 hist->SetMaximum(9.5);
972 axey->Set(10,-0.5,9.5);
973 axey->SetBinLabel(axey->FindFixBin(0),"Error");
974 axey->SetBinLabel(axey->FindFixBin(1),"Alarm");
975 axey->SetBinLabel(axey->FindFixBin(4),"Off");
976 axey->SetBinLabel(axey->FindFixBin(5),"Ok");
977 axey->SetBinLabel(axey->FindFixBin(6),"Temp.Warning");
978 axey->SetBinLabel(axey->FindFixBin(7),"Cond.Warning");
979 axey->SetBinLabel(axey->FindFixBin(9),"n/a");
980 hist->SetLabelSize(0.04,"X");
981 hist->SetLabelSize(0.05,"Y");
982 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
983 hist->SetXTitle("Time");
984 hist->SetYTitle("");
985 }
986 // ------------------------- Camera relative humidity -----------------------
987 c6->cd(3);
988 TLegend *leghum = new TLegend(0.75,0.85,0.99,0.99);
989 g = hHCenter.GetGraph();
990 g->SetMarkerColor(8);
991 g->SetLineColor(8);
992 g->SetTitle("Camera relative humidity");
993 leghum->AddEntry(g,"camera center","l");
994 clone1 = (MHVsTime*)hHCenter.DrawClone("nonew");
995 if(clone1->GetGraph()->GetN())
996 {
997 hist = clone1->GetGraph()->GetHistogram();
998 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
999 hist->SetXTitle("Time");
1000 hist->SetYTitle("Relative humidity [%]");
1001 hist->SetLabelSize(0.04,"X");
1002 hist->SetMaximum(50);
1003 hist->SetMinimum(0);
1004 }
1005 g = hHWall.GetGraph();
1006 g->SetMarkerColor(12);
1007 g->SetLineColor(12);
1008 leghum->AddEntry(g,"camera wall","l");
1009 clone1 = (MHVsTime*)hHWall.DrawClone("nonewsame");
1010 leghum->DrawClone();
1011 // ---------------------- Temperature distribution --------------------------
1012 c6->cd(4);
1013 hist = hTempOptLink.GetHistByName("TOptLink");
1014 hist->SetXTitle("Temperature [\\circ C]");
1015 hist->SetYTitle("");
1016 hist->SetLineColor(2);
1017 hist->SetTitle("Distribution of opt. links temperature");
1018 hist->SetLabelSize(0.04,"X");
1019 hist->SetStats(0);
1020 mh3 = (MH3*)hTempOptLink.DrawClone("nonew");
1021 //
1022 // **************************** Trigger report ******************************
1023 //
1024 if ((d = evtloop.GetDisplay()))
1025 TCanvas &c7 = d.AddTab("TRIGGER SYSTEM");
1026 else
1027 TCanvas *c7 = new TCanvas();
1028 c7->Divide(1,3);
1029 c7->cd(1);
1030 gStyle->SetPadGridX(kTRUE);
1031 gStyle->SetPadGridY(kTRUE);
1032 gPad->SetLogy();
1033 TLegend *legtrig = new TLegend(0.85,0.85,0.99,0.99);
1034 g = hTrigBL2.GetGraph();
1035 g->SetMarkerStyle(kFullDotSmall);
1036 g->SetMarkerColor(2);
1037 g->SetLineColor(2);
1038 g->SetTitle("L2 trigger rate");
1039 legtrig->AddEntry(g,"Before prescaler","l");
1040 clone1 = (MHVsTime*)hTrigBL2.DrawClone("nonew");
1041 if(clone1->GetGraph()->GetN())
1042 {
1043 hist = clone1->GetGraph()->GetHistogram();
1044 hist->SetMinimum(1);
1045 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1046 hist->SetLabelSize(0.06,"X");
1047 hist->SetLabelSize(0.06,"Y");
1048 hist->SetTitleSize(0.06,"X");
1049 hist->SetTitleSize(0.06,"Y");
1050 hist->SetXTitle("Time");
1051 hist->SetYTitle("L2 trigger rate [Hz]");
1052 }
1053 g = hTrigAL2.GetGraph();
1054 g->SetMarkerColor(4);
1055 g->SetLineColor(4);
1056 legtrig->AddEntry(g,"After prescaler","l");
1057 clone1 = (MHVsTime*)hTrigAL2.DrawClone("nonewsame");
1058 legtrig->DrawClone();
1059 c7->cd(2);
1060 gPad->SetLogy();
1061 hist = hTrigZd.GetHistByName("TrigZd");
1062 hist->SetLabelSize(0.06,"X");
1063 hist->SetLabelSize(0.06,"Y");
1064 hist->SetTitleSize(0.06,"X");
1065 hist->SetTitleSize(0.06,"Y");
1066 hist->SetXTitle("Zenith angle[\\circ]");
1067 hist->SetYTitle("Trigger rate [Hz]");
1068 hist->SetMarkerColor(4);
1069 hist->SetTitle("L2 trigger rate after prescaler");
1070 hist->SetStats(0);
1071 mh3 = (MH3*)hTrigZd.DrawClone("nonew");
1072 hist->SetMinimum(1);
1073 c7->cd(3);
1074 g = hTrigStatus.GetGraph();
1075 g->SetMarkerStyle(kFullDotSmall);
1076 g->SetTitle("Trigger status");
1077 clone1 = (MHVsTime*)hTrigStatus.DrawClone("nonew");
1078 if(clone1->GetGraph()->GetN())
1079 {
1080 hist = clone1->GetGraph()->GetHistogram();
1081 axey = hist->GetYaxis();
1082 hist->SetMinimum(-0.5);
1083 hist->SetMaximum(5.5);
1084 axey->Set(6,-0.5,5.5);
1085 axey->SetBinLabel(axey->FindFixBin(0),"Error");
1086 axey->SetBinLabel(axey->FindFixBin(1),"Idle");
1087 axey->SetBinLabel(axey->FindFixBin(2),"Loading");
1088 axey->SetBinLabel(axey->FindFixBin(3),"Ready");
1089 axey->SetBinLabel(axey->FindFixBin(4),"Active");
1090 axey->SetBinLabel(axey->FindFixBin(5),"Stopped");
1091 hist->SetLabelSize(0.07,"Y");
1092 hist->SetLabelSize(0.06,"X");
1093 hist->SetTitleSize(0.06,"X");
1094 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1095 hist->SetXTitle("Time");
1096 hist->SetYTitle("");
1097 }
1098 // ***************************** Trigger of macrocells **********************
1099 if ((d = evtloop.GetDisplay()))
1100 TCanvas &c8 = d.AddTab("TRIG. MACROCELLs");
1101 else
1102 TCanvas *c8 = new TCanvas();
1103 c8->Divide(2,2);
1104 c8->cd(1);
1105 gPad->SetLogy();
1106 TLegend *legtrig = new TLegend(0.80,0.80,0.99,0.99);
1107 g = htrigmc1.GetGraph();
1108 g->SetMarkerStyle(kFullDotSmall);
1109 g->SetMarkerColor(2);
1110 g->SetLineColor(2);
1111 g->SetTitle("Trigger rate of macrocell 1 : (maximum)");
1112 pixclone1 = (MHPixVsTime*)htrigmc1.DrawClone("nonew");
1113 if(clone1->GetGraph()->GetN())
1114 {
1115 hist = htrigmc1->GetGraph()->GetHistogram();
1116 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1117 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1118 hist->SetMinimum(1);
1119 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1120 hist->SetXTitle("Time");
1121 hist->SetYTitle("Trigger [Hz]");
1122 hist->SetLabelSize(0.04,"X");
1123 hist->SetLabelSize(0.05,"Y");
1124 }
1125 legtrig->AddEntry(hist,Form("Mc 1: %3.0e",hist->GetMaximum()),"p");
1126 legtrig->DrawClone();
1127 c8->cd(2);
1128 gPad->SetLogy();
1129 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99);
1130 g = htrigmc2.GetGraph();
1131 g->SetMarkerStyle(kFullDotSmall);
1132 g->SetMarkerColor(2);
1133 g->SetTitle("Trigger rate of macrocells 2-7 : (maximum)");
1134 pixclone1 = (MHPixVsTime*)htrigmc2.DrawClone("nonew");
1135 if(clone1->GetGraph()->GetN())
1136 {
1137 hist = pixclone1->GetGraph()->GetHistogram();
1138 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1139 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1140 hist->SetMinimum(1);
1141 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1142 hist->SetXTitle("Time");
1143 hist->SetYTitle("Trigger [Hz]");
1144 hist->SetLabelSize(0.04,"X");
1145 hist->SetLabelSize(0.05,"Y");
1146 }
1147 legtrig->AddEntry(hist,Form("Mc 2: %3.0e",hist->GetMaximum()),"p");
1148 g=htrigmc3.GetGraph();
1149 g->SetMarkerStyle(kFullDotSmall);
1150 g->SetMarkerColor(3);
1151 if(htrigmc3.GetGraph()->GetN())
1152 {
1153 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1154 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1155 legtrig->AddEntry(g,Form("Mc 3: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1156 }
1157 pixclone1 = (MHPixVsTime*)htrigmc3.DrawClone("nonewsame");
1158 g=htrigmc4.GetGraph();
1159 g->SetMarkerStyle(kFullDotSmall);
1160 g->SetMarkerColor(4);
1161 if(htrigmc4.GetGraph()->GetN())
1162 {
1163 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1164 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1165 legtrig->AddEntry(g,Form("Mc 4: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1166 }
1167 pixclone1 = (MHPixVsTime*)htrigmc4.DrawClone("nonewsame");
1168 g=htrigmc5.GetGraph();
1169 g->SetMarkerStyle(kFullDotSmall);
1170 g->SetMarkerColor(5);
1171 if(htrigmc5.GetGraph()->GetN())
1172 {
1173 legtrig->AddEntry(g,Form("Mc 5: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1174 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1175 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1176 }
1177 pixclone1 = (MHPixVsTime*)htrigmc5.DrawClone("nonewsame");
1178 g=htrigmc6.GetGraph();
1179 g->SetMarkerStyle(kFullDotSmall);
1180 g->SetMarkerColor(6);
1181 if(htrigmc6.GetGraph()->GetN())
1182 {
1183 legtrig->AddEntry(g,Form("Mc 6: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1184 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1185 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1186 }
1187 pixclone1 = (MHPixVsTime*)htrigmc6.DrawClone("nonewsame");
1188 g=htrigmc7.GetGraph();
1189 g->SetMarkerStyle(kFullDotSmall);
1190 g->SetMarkerColor(7);
1191 if(htrigmc7.GetGraph()->GetN())
1192 {
1193 legtrig->AddEntry(g,Form("Mc 7: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1194 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1195 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1196 }
1197 pixclone1 = (MHPixVsTime*)htrigmc7.DrawClone("nonewsame");
1198 legtrig->DrawClone();
1199 c8->cd(3);
1200 gPad->SetLogy();
1201 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99);
1202 g = htrigmc8.GetGraph();
1203 g->SetMarkerStyle(kFullDotSmall);
1204 g->SetMarkerColor(2);
1205 g->SetTitle("Trigger rate of macrocells 8-13 : (maximum)");
1206 if(htrigmc8.GetGraph()->GetN())
1207 {
1208 legtrig->AddEntry(g,Form("Mc 8: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1209 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1210 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1211 }
1212 pixclone1 = (MHPixVsTime*)htrigmc8.DrawClone("nonew");
1213 if(clone1->GetGraph()->GetN())
1214 {
1215 hist = pixclone1->GetGraph()->GetHistogram();
1216 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1217 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1218 hist->SetMinimum(1);
1219 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1220 hist->SetXTitle("Time");
1221 hist->SetYTitle("Trigger [Hz]");
1222 hist->SetLabelSize(0.04,"X");
1223 hist->SetLabelSize(0.05,"Y");
1224 }
1225 g=htrigmc9.GetGraph();
1226 g->SetMarkerStyle(kFullDotSmall);
1227 g->SetMarkerColor(3);
1228 if(htrigmc9.GetGraph()->GetN())
1229 {
1230 legtrig->AddEntry(g,Form("Mc 9: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1231 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1232 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1233 }
1234 pixclone1 = (MHPixVsTime*)htrigmc9.DrawClone("nonewsame");
1235 g=htrigmc10.GetGraph();
1236 g->SetMarkerStyle(kFullDotSmall);
1237 g->SetMarkerColor(4);
1238 if(htrigmc10.GetGraph()->GetN())
1239 {
1240 legtrig->AddEntry(g,Form("Mc 10: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1241 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1242 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1243 }
1244 pixclone1 = (MHPixVsTime*)htrigmc10.DrawClone("nonewsame");
1245 g=htrigmc11.GetGraph();
1246 g->SetMarkerStyle(kFullDotSmall);
1247 g->SetMarkerColor(5);
1248 if(htrigmc11.GetGraph()->GetN())
1249 {
1250 legtrig->AddEntry(g,Form("Mc 11: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1251 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1252 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1253 }
1254 pixclone1 = (MHPixVsTime*)htrigmc11.DrawClone("nonewsame");
1255 g=htrigmc12.GetGraph();
1256 g->SetMarkerStyle(kFullDotSmall);
1257 g->SetMarkerColor(6);
1258 if(htrigmc12.GetGraph()->GetN())
1259 {
1260 legtrig->AddEntry(g,Form("Mc 12: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1261 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1262 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1263 }
1264 pixclone1 = (MHPixVsTime*)htrigmc12.DrawClone("nonewsame");
1265 g=htrigmc13.GetGraph();
1266 g->SetMarkerStyle(kFullDotSmall);
1267 g->SetMarkerColor(7);
1268 if(htrigmc13.GetGraph()->GetN())
1269 {
1270 legtrig->AddEntry(g,Form("Mc 13: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1271 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1272 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1273 }
1274 pixclone1 = (MHPixVsTime*)htrigmc13.DrawClone("nonewsame");
1275 legtrig->DrawClone();
1276 c8->cd(4);
1277 gPad->SetLogy();
1278 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99);
1279 TGraph *g = htrigmc14.GetGraph();
1280 g->SetMarkerStyle(kFullDotSmall);
1281 g->SetMarkerColor(2);
1282 if(htrigmc14.GetGraph()->GetN())
1283 legtrig->AddEntry(g,Form("Mc 14: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1284 g->SetTitle("Trigger rate of macrocells 14-19 : (maximum)");
1285 pixclone1 = (MHPixVsTime*)htrigmc14.DrawClone("nonew");
1286 if(clone1->GetGraph()->GetN())
1287 {
1288 hist = pixclone1->GetGraph()->GetHistogram();
1289 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1290 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1291 hist->SetMinimum(1);
1292 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1293 hist->SetXTitle("Time");
1294 hist->SetYTitle("Trigger [Hz]");
1295 hist->SetLabelSize(0.04,"X");
1296 hist->SetLabelSize(0.05,"Y");
1297 }
1298 g=htrigmc15.GetGraph();
1299 g->SetMarkerStyle(kFullDotSmall);
1300 g->SetMarkerColor(3);
1301 if(htrigmc15.GetGraph()->GetN())
1302 {
1303 legtrig->AddEntry(g,Form("Mc 15: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1304 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1305 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1306 }
1307 pixclone1 = (MHPixVsTime*)htrigmc15.DrawClone("nonewsame");
1308 g=htrigmc16.GetGraph();
1309 g->SetMarkerStyle(kFullDotSmall);
1310 g->SetMarkerColor(4);
1311 if(htrigmc16.GetGraph()->GetN())
1312 {
1313 legtrig->AddEntry(g,Form("Mc 16: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1314 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1315 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1316 }
1317 pixclone1 = (MHPixVsTime*)htrigmc16.DrawClone("nonewsame");
1318 g=htrigmc17.GetGraph();
1319 g->SetMarkerStyle(kFullDotSmall);
1320 g->SetMarkerColor(5);
1321 if(htrigmc17.GetGraph()->GetN())
1322 {
1323 legtrig->AddEntry(g,Form("Mc 17: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1324 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1325 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1326 }
1327 pixclone1 = (MHPixVsTime*)htrigmc17.DrawClone("nonewsame");
1328 g=htrigmc18.GetGraph();
1329 g->SetMarkerStyle(kFullDotSmall);
1330 g->SetMarkerColor(6);
1331 if(htrigmc18.GetGraph()->GetN())
1332 {
1333 legtrig->AddEntry(g,Form("Mc 18: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1334 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1335 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1336 }
1337 pixclone1 = (MHPixVsTime*)htrigmc18.DrawClone("nonewsame");
1338 g=htrigmc19.GetGraph();
1339 g->SetMarkerStyle(kFullDotSmall);
1340 g->SetMarkerColor(7);
1341 if(htrigmc19.GetGraph()->GetN())
1342 {
1343 legtrig->AddEntry(g,Form("Mc 19: %3.0e",g->GetHistogram()->GetMaximum()),"p");
1344 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum())
1345 hist->SetMaximum(g->GetHistogram()->GetMaximum());
1346 }
1347 pixclone1 = (MHPixVsTime*)htrigmc19.DrawClone("nonewsame");
1348 legtrig->DrawClone();
1349
1350 //
1351 // *************************** Weather station ******************************
1352 //
1353 if ((d = evtloop.GetDisplay()))
1354 TCanvas &c9 = d.AddTab("WEATHER STATION");
1355 else
1356 TCanvas *c9 = new TCanvas();
1357 c9->Divide(2,2);
1358 // ----------------------- Relative humidity --------------------------------
1359 c9->cd(1);
1360 g = hCCHum.GetGraph();
1361 g->SetMarkerStyle(kFullDotSmall);
1362 g->SetMarkerColor(4);
1363 g->SetLineColor(4);
1364 g->SetTitle("Relative humidity outside");
1365 clone1 = (MHVsTime*)hCCHum.DrawClone("nonew");
1366 if(clone1->GetGraph()->GetN())
1367 {
1368 hist = clone1->GetGraph()->GetHistogram();
1369 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1370 hist->SetXTitle("Time");
1371 hist->SetYTitle("Humidity [%]");
1372 }
1373 // -------------------------- Temperature -----------------------------------
1374 c9->cd(2);
1375 g = hCCTemp.GetGraph();
1376 g->SetMarkerStyle(kFullDotSmall);
1377 g->SetMarkerColor(2);
1378 g->SetLineColor(2);
1379 g->SetTitle("Temperature outside");
1380 clone1 = (MHVsTime*)hCCTemp.DrawClone("nonew");
1381 if(clone1->GetGraph()->GetN())
1382 {
1383 hist = clone1->GetGraph()->GetHistogram();
1384 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1385 hist->SetXTitle("Time");
1386 hist->SetYTitle("Temperature [\\circ C]");
1387 }
1388 // --------------------------- Wind speed -----------------------------------
1389 c9->cd(3);
1390 g = hCCWS.GetGraph();
1391 g->SetMarkerStyle(kFullDotSmall);
1392 g->SetMarkerColor(3);
1393 g->SetLineColor(3);
1394 g->SetTitle("Wind speed outside");
1395 clone1 = (MHVsTime*)hCCWS.DrawClone("nonew");
1396 if(clone1->GetGraph()->GetN())
1397 {
1398 hist = clone1->GetGraph()->GetHistogram();
1399 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1400 hist->SetXTitle("Time");
1401 hist->SetYTitle("Wind speed [km/h]");
1402 }
1403 // -------------------------- Solar radiation -------------------------------
1404 c9->cd(4);
1405 g = hCCSR.GetGraph();
1406 g->SetMarkerStyle(kFullDotSmall);
1407 g->SetMarkerColor(9);
1408 g->SetLineColor(9);
1409 g->SetTitle("Solar radiation outside");
1410 clone1 = (MHVsTime*)hCCSR.DrawClone("nonew");
1411 if(clone1->GetGraph()->GetN())
1412 {
1413 hist = clone1->GetGraph()->GetHistogram();
1414 hist->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00");
1415 hist->SetXTitle("Time");
1416 hist->SetYTitle("Solar radiation [W/m^2]");
1417 }
1418
1419 // Save data in a postscriptfile (filename.ps)
1420 TString file;
1421 if (filename.Last('.')>0)
1422 file = filename(0, filename.Last('.'));
1423
1424 // Make sure the display hasn't been deleted by the user while the
1425 // eventloop was running.
1426 if ((d = evtloop.GetDisplay()))
1427 d->SaveAsPS(directory+file+".ps");
1428 else
1429 {
1430 c1->Print(directory+file+".ps(");
1431 c2->Print(directory+file+".ps");
1432 c3->Print(directory+file+".ps");
1433 c4->Print(directory+file+".ps");
1434 c5->Print(directory+file+".ps");
1435 c6->Print(directory+file+".ps");
1436 c7->Print(directory+file+".ps");
1437 c8->Print(directory+file+".ps");
1438 c9->Print(directory+file+".ps)");
1439 }
1440}
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
Note: See TracBrowser for help on using the repository browser.