source: trunk/MagicSoft/Mars/macros/readMagic.C@ 1294

Last change on this file since 1294 was 1206, checked in by rkb, 23 years ago
*** empty log message ***
File size: 2.2 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 <mailto:tbretz@uni-sw.gwdg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25
26void readMagic()
27{
28 MParList plist;
29
30 MGeomCamMagic geomcam;
31 MHillas hillas;
32 MTaskList tlist;
33
34 plist.AddToList(&geomcam);
35 plist.AddToList(&hillas);
36 plist.AddToList(&tlist);
37
38 MReadMarsFile read("Events", "~/data/camera.root");
39
40 MMcPedestalCopy pcopy;
41 MMcPedestalNSBAdd pnsb;
42 MCerPhotCalc ncalc;
43 MClone clone("MCerPhotEvt");
44 MImgCleanStd clean;
45 MBlindPixelCalc blind;
46 MHillasCalc hcalc;
47
48
49 tlist.AddToList(&read);
50 tlist.AddToList(&pcopy);
51 tlist.AddToList(&pnsb);
52 tlist.AddToList(&ncalc);
53 tlist.AddToList(&clone);
54 tlist.AddToList(&clean);
55 tlist.AddToList(&blind);
56 tlist.AddToList(&hcalc);
57
58 MEvtLoop evtloop;
59 evtloop.SetParList(&plist);
60
61 if (!evtloop.PreProcess())
62 return;
63
64 MCamDisplay display(&geomcam);
65 display.Draw();
66
67 while (tlist.Process())
68 {
69 cout << "Event #" << read.GetEventNum() ":" << endl;
70
71 display.DrawPhotNum((MCerPhotEvt*)clone.GetClone());
72
73 gClient->HandleInput();
74 if(getchar()=='q')
75 break;
76
77 hillas.Print();
78 hillas.Draw();
79
80 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt"));
81
82 gClient->HandleInput();
83 if(getchar()=='q')
84 break;
85 }
86
87 evtloop.PostProcess();
88
89}
90
91
92
93
Note: See TracBrowser for help on using the repository browser.