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

Last change on this file since 984 was 948, 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("CT1_99_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.DrawPhotNum(&phevt);
57
58
59 while (read.Process())
60 {
61 cout << "Event: " << icount++ << endl;
62
63 display.DrawPhotNum(&phevt);
64 gClient->HandleInput();
65 if(getchar()=='q')
66 break;
67
68 clean.Process();
69
70 if (hcalc.Process()==kCONTINUE)
71 {
72 cout << "skipped." << endl;
73 continue;
74 }
75
76 hillas.Print();
77 hillas.Draw();
78
79 display.DrawPhotNum(&phevt);
80
81 gClient->HandleInput();
82 if(getchar()=='q')
83 break;
84
85 hillas.Clear();
86 }
87
88 evtloop.PostProcess();
89}
Note: See TracBrowser for help on using the repository browser.