Changeset 947 for trunk/MagicSoft/Mars/mmain/MDataCheck.cc
- Timestamp:
- 09/26/01 12:22:51 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MDataCheck.cc
r749 r947 41 41 : MBrowser(main, p, w, h) 42 42 { 43 TGTextButton *pedadc = new TGTextButton(fTop2, "ADC Spectra of Pedestals", M_BUTTON_PEDADC); 44 TGTextButton *cradc = new TGTextButton(fTop2, "ADC Specta of Cosmics", M_BUTTON_CRADC); 45 TGTextButton *pedtdc = new TGTextButton(fTop3, "TDC Spectra of Pedestals", M_BUTTON_PEDTDC); 46 TGTextButton *crtdc = new TGTextButton(fTop3, "TDC Specta of Cosmics", M_BUTTON_CRTDC); 43 47 44 fButPedADC = new TGTextButton(fTop2, "ADC Spectra of Pedestals", M_BUTTON_PEDADC ); 45 fButPedADC->Associate(this) ; 46 fTop2->AddFrame (fButPedADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 48 pedadc->Associate(this); 49 cradc ->Associate(this); 50 pedtdc->Associate(this); 51 crtdc ->Associate(this); 47 52 48 fButCrADC = new TGTextButton(fTop2, "ADC Specta of Cosmics", M_BUTTON_CRADC ); 49 fButCrADC->Associate(this) ; 50 fTop2->AddFrame (fButCrADC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 53 fList->Add(pedadc); 54 fList->Add(cradc); 55 fList->Add(pedtdc); 56 fList->Add(crtdc); 51 57 52 fButPedTDC = new TGTextButton(fTop3, "TDC Spectra of Pedestals", M_BUTTON_PEDTDC ); 53 fButPedTDC->Associate(this) ; 54 fTop3->AddFrame (fButPedTDC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 58 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5); 59 fList->Add(laybut); 55 60 56 fButCrTDC = new TGTextButton(fTop3, "TDC Specta of Cosmics", M_BUTTON_CRTDC ); 57 fButCrTDC->Associate(this) ; 58 fTop3->AddFrame (fButCrTDC, new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 10, 5, 5) ); 61 fTop2->AddFrame(pedadc, laybut); 62 fTop2->AddFrame(cradc, laybut); 63 64 fTop3->AddFrame(pedtdc, laybut); 65 fTop3->AddFrame(crtdc, laybut); 59 66 60 67 MapSubwindows(); … … 68 75 } 69 76 70 MDataCheck::~MDataCheck()71 {72 delete fButPedADC;73 delete fButCrADC;74 delete fButPedTDC;75 delete fButCrTDC;76 }77 78 77 // ====================================================================== 79 78 80 79 Bool_t MDataCheck::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) 81 { 82 // Process events generated by the buttons in the frame.83 80 { 81 // Process events generated by the buttons in the frame. 82 84 83 if (GET_MSG(msg)!=kC_COMMAND || GET_SUBMSG(msg)!=kCM_BUTTON) 85 84 return MBrowser::ProcessMessage(msg, parm1, parm2); … … 92 91 case M_BUTTON_CRTDC: 93 92 if (!InputFileSelected()) 94 { 93 { 95 94 DisplError("No Input (root) File selected!"); 96 95 return kTRUE; … … 100 99 { 101 100 case M_BUTTON_PEDADC: 102 fViewAdc.AdcSpectra(fInputFile, "PedEvents" );101 fViewAdc.AdcSpectra(fInputFile, "PedEvents"); 103 102 return kTRUE; 104 103 105 104 case M_BUTTON_CRADC: 106 fViewAdc.AdcSpectra(fInputFile, "Events" );105 fViewAdc.AdcSpectra(fInputFile, "Events"); 107 106 return kTRUE; 108 107 … … 118 117 119 118 return MBrowser::ProcessMessage(msg, parm1, parm2); 120 } 119 }
Note:
See TracChangeset
for help on using the changeset viewer.