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

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