source: trunk/MagicSoft/Mars/macros/readCT1.C@ 1032

Last change on this file since 1032 was 1032, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.1 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): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25
26void readCT1()
27{
28 MParList plist;
29
30 MGeomCamCT1 geomcam;
31 MHillas hillas;
32 MTaskList tlist;
33
34 plist.AddToList(&geomcam);
35 plist.AddToList(&hillas);
36 plist.AddToList(&tlist);
37
38 MCT1ReadAscii read("data/CT1_97_off1.dat");
39 MImgCleanStd clean;
40 MHillasCalc hcalc;
41
42 tlist.AddToList(&read);
43 tlist.AddToList(&clean);
44 tlist.AddToList(&hcalc);
45
46 MEvtLoop evtloop;
47 evtloop.SetParList(&plist);
48
49 if (!evtloop.PreProcess())
50 return;
51
52 MCerPhotEvt &phevt = *(MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
53
54 Int_t icount = 0;
55 MCamDisplay display(&geomcam);
56 display.Draw();
57
58 while (read.Process())
59 {
60 cout << "Event: " << icount++ << endl;
61
62 display.DrawPhotNum(&phevt);
63 gClient->HandleInput();
64 if(getchar()=='q')
65 break;
66
67 clean.Process();
68
69 if (hcalc.Process()==kCONTINUE)
70 {
71 cout << "skipped." << endl;
72 continue;
73 }
74
75 hillas.Print();
76 hillas.Draw();
77
78 display.DrawPhotNum(&phevt);
79
80 gClient->HandleInput();
81 if(getchar()=='q')
82 break;
83
84 hillas.Clear();
85 }
86
87 evtloop.PostProcess();
88}
Note: See TracBrowser for help on using the repository browser.