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

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