Changeset 695 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 03/20/01 17:25:33 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/readCT1.C
r655 r695 1 1 void readCT1() 2 2 { 3 MParList *plist = new MParList();3 MParList plist; 4 4 5 MCT1ReadAscii *readct1 = new MCT1ReadAscii("CT1_99_on1.dat") ; 5 MGeomCamMagic camct1; 6 MHillas hillas; 7 MTaskList tlist; 6 8 7 if (!readct1->PreProcess(plist)) 9 plist->AddToList(&camct1); 10 plist->AddToList(&hillas); 11 plist->AddToList(&tlist); 12 13 MCT1ReadAscii readct1("CT1_99_on1.dat") ; 14 MHillasCalc hcalc; 15 16 tlist.AddToList(&readct1); 17 tlist.AddToList(&hcalc); 18 19 MEvtLoop evtloop; 20 evtloop.SetParList(&plist); 21 22 if (!evtloop.PreProcess()) 8 23 return; 9 24 10 MCerPhotEvt *phevt =(MCerPhotEvt*)plist->FindObject("MCerPhotEvt");25 MCerPhotEvt &phevt = *(MCerPhotEvt*)plist->FindObject("MCerPhotEvt"); 11 26 12 27 Int_t icount = 0 ; 13 MCamDisplay display( 0) ;28 MCamDisplay display(&camct1) ; 14 29 15 while ( readct1->Process())30 while (readct1.Process()) 16 31 { 17 32 cout << "Event: " << icount++ << endl ; 18 33 19 if (icount >= 45 ) 20 { 21 display->DrawPhotNum( phevt ) ; 34 if (icount < 45 ) 35 continue; 22 36 23 gClient->HandleInput(); 24 if(getchar()=='q') 25 break; 37 display.DrawPhotNum(&phevt); 38 gClient->HandleInput(); 39 if(getchar()=='q') 40 break; 26 41 27 phevt->CleanLevel1();28 phevt->CleanLevel2();29 display->DrawPhotNum( phevt );30 31 32 42 phevt.CleanLevel1(); 43 phevt.CleanLevel2(); 44 display.DrawPhotNum(&phevt); 45 gClient->HandleInput(); 46 if(getchar()=='q') 47 break; 33 48 34 phevt->CleanLevel3();49 phevt.CleanLevel3(); 35 50 36 display->DrawPhotNum( phevt ) ; 37 gClient->HandleInput(); 38 if(getchar()=='q') 39 break; 40 } 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(); 41 63 } 42 64 43 readct1->PostProcess();65 evtloop.PostProcess(); 44 66 }
Note:
See TracChangeset
for help on using the changeset viewer.