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

Last change on this file since 872 was 753, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 1.2 KB
Line 
1void readCT1()
2{
3 MParList plist;
4
5 MGeomCamCT1 geomcam;
6 MHillas hillas;
7 MTaskList tlist;
8
9 plist->AddToList(&geomcam);
10 plist->AddToList(&hillas);
11 plist->AddToList(&tlist);
12
13 MCT1ReadAscii read("CT1_99_off1.dat") ;
14 MImgCleanStd clean;
15 MHillasCalc hcalc;
16
17 tlist.AddToList(&read);
18 tlist.AddToList(&clean);
19 tlist.AddToList(&hcalc);
20
21 MEvtLoop evtloop;
22 evtloop.SetParList(&plist);
23
24 if (!evtloop.PreProcess())
25 return;
26
27 MCerPhotEvt &phevt = *(MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
28
29 Int_t icount = 0 ;
30 MCamDisplay display(&geomcam) ;
31 display.DrawPhotNum(&phevt);
32
33
34 while (read.Process())
35 {
36 cout << "Event: " << icount++ << endl;
37
38 display.DrawPhotNum(&phevt);
39 gClient->HandleInput();
40 if(getchar()=='q')
41 break;
42
43 clean.Process();
44
45 if (hcalc.Process()==kCONTINUE)
46 {
47 cout << "skipped." << endl;
48 continue;
49 }
50
51 hillas.Print();
52 hillas.Draw();
53
54 display.DrawPhotNum(&phevt);
55
56 gClient->HandleInput();
57 if(getchar()=='q')
58 break;
59
60 hillas.Clear();
61 }
62
63 evtloop.PostProcess();
64}
Note: See TracBrowser for help on using the repository browser.