Changeset 1325 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 04/30/02 12:00:44 (23 years ago)
- Location:
- trunk/MagicSoft/Mars/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/readCT1.C
r1282 r1325 23 23 \* ======================================================================== */ 24 24 25 Bool_t HandleInput() 26 { 27 TTimer timer("gSystem->ProcessEvents();", 50, kFALSE); 28 while (1) 29 { 30 // 31 // While reading the input process gui events asynchronously 32 // 33 timer.TurnOn(); 34 TString input = Getline("Type 'q' to exit, <return> to go on: "); 35 timer.TurnOff(); 25 36 26 void readCT1() 37 if (input=="q\n") 38 return kFALSE; 39 40 if (input=="\n") 41 return kTRUE; 42 }; 43 44 return kFALSE; 45 } 46 47 void readCT1(const char *fname="~/data/CT1_97_on1.dat") 27 48 { 28 49 MParList plist; … … 36 57 plist.AddToList(&tlist); 37 58 38 MCT1ReadAscii read( "/home/tbretz/data/CT1_97_on1.dat");59 MCT1ReadAscii read(fname); 39 60 MClone clone("MCerPhotEvt"); 40 61 MImgCleanStd clean; … … 66 87 67 88 display.DrawPhotNum(evt); 68 gClient->HandleInput(); 69 if ( getchar()=='q')89 90 if (!HandleInput()) 70 91 break; 71 92 … … 74 95 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 75 96 76 gClient->HandleInput(); 77 if (getchar()=='q') 97 if (!HandleInput()) 78 98 break; 79 99 } -
trunk/MagicSoft/Mars/macros/readMagic.C
r1206 r1325 24 24 25 25 26 void readMagic() 26 Bool_t HandleInput() 27 { 28 TTimer timer("gSystem->ProcessEvents();", 50, kFALSE); 29 while (1) 30 { 31 // 32 // While reading the input process gui events asynchronously 33 // 34 timer.TurnOn(); 35 TString input = Getline("Type 'q' to exit, <return> to go on: "); 36 timer.TurnOff(); 37 38 if (input=="q\n") 39 return kFALSE; 40 41 if (input=="\n") 42 return kTRUE; 43 }; 44 45 return kFALSE; 46 } 47 48 void readMagic(const char *fname="~/data/camera.root") 27 49 { 28 50 MParList plist; … … 36 58 plist.AddToList(&tlist); 37 59 38 MReadMarsFile read("Events", "~/data/camera.root");60 MReadMarsFile read("Events", fname); 39 61 40 62 MMcPedestalCopy pcopy; … … 71 93 display.DrawPhotNum((MCerPhotEvt*)clone.GetClone()); 72 94 73 gClient->HandleInput(); 74 if(getchar()=='q') 95 if (!HandleInput()) 75 96 break; 76 97 … … 80 101 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt")); 81 102 82 gClient->HandleInput(); 83 if(getchar()=='q') 84 break; 103 if (!HandleInput()) 104 break; 85 105 } 86 106 87 107 evtloop.PostProcess(); 88 89 108 } 90 109 91 92 93
Note:
See TracChangeset
for help on using the changeset viewer.