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

Last change on this file since 703 was 700, checked in by tbretz, 24 years ago
*** empty log message ***
File size: 1.3 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("oscar_protons.root", "Events") ;
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 Int_t icount = 0 ;
34 MCamDisplay display(&geomcam) ;
35
36 while (read.Process())
37 {
38 cout << "Event: " << icount++ << endl ;
39
40 if (icount < 45 )
41 continue;
42
43 ncalc.Process();
44
45 display.DrawPhotNum(&phevt);
46 gClient->HandleInput();
47 if(getchar()=='q')
48 break;
49
50 clean.Process();
51 hcalc.Process();
52
53 hillas.Print();
54 hillas.Draw();
55
56 display.DrawPhotNum(&phevt);
57
58 gClient->HandleInput();
59 if(getchar()=='q')
60 break;
61
62 hillas.Clear();
63 }
64
65 evtloop.PostProcess();
66}
Note: See TracBrowser for help on using the repository browser.