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 |
|
---|
26 | void 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_on1.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 | MCerPhotEvt *evt = (MCerPhotEvt*)clone.GetClone();
|
---|
63 |
|
---|
64 | if (!evt)
|
---|
65 | continue;
|
---|
66 |
|
---|
67 | display.DrawPhotNum(evt);
|
---|
68 | gClient->HandleInput();
|
---|
69 | if (getchar()=='q')
|
---|
70 | break;
|
---|
71 |
|
---|
72 | hillas.Print();
|
---|
73 | hillas.Draw();
|
---|
74 | display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt"));
|
---|
75 |
|
---|
76 | gClient->HandleInput();
|
---|
77 | if (getchar()=='q')
|
---|
78 | break;
|
---|
79 | }
|
---|
80 |
|
---|
81 | evtloop.PostProcess();
|
---|
82 | }
|
---|