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

Last change on this file since 1152 was 1076, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.0 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("/home/tbretz/data/CT1_97_off1.dat");
39 MClone clone("MCerPhotEvt");
40 MImgCleanStd clean;
41 MHillasCalc hcalc;
42
43 tlist.AddToList(&read);
44 tlist.AddToList(&clone);
45 tlist.AddToList(&clean);
46 tlist.AddToList(&hcalc);
47
48 MEvtLoop evtloop;
49 evtloop.SetParList(&plist);
50
51 if (!evtloop.PreProcess())
52 return;
53
54 Int_t icount = 0;
55 MCamDisplay display(&geomcam);
56 display.Draw();
57
58 while (tlist.Process())
59 {
60 cout << "Event #" << icount++ << endl;
61
62 display.DrawPhotNum((MCerPhotEvt*)clone.GetClone());
63 gClient->HandleInput();
64 if(getchar()=='q')
65 break;
66
67 hillas.Print();
68 hillas.Draw();
69 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt"));
70
71 gClient->HandleInput();
72 if(getchar()=='q')
73 break;
74 }
75
76 evtloop.PostProcess();
77}
Note: See TracBrowser for help on using the repository browser.