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

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