Ignore:
Timestamp:
01/23/01 10:43:18 (24 years ago)
Author:
harald
Message:
The integration of the class MGFadcDisp in the mars code. Now
one is able to see at least the high gain samples with this gui.
I hope that also Razmik is now able to look to the data.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc

    r586 r587  
    8383  fTop2->AddFrame( fLabelEvtNr, new TGLayoutHints (kLHintsLeft, 10, 10, 10, 10)) ;
    8484
    85   fTxtEvtNr = new TGTextEntry(fTop2, fTxtBufEvtNr = new TGTextBuffer(100), 9999 );
     85  fTxtEvtNr = new TGTextEntry(fTop2, fTxtBufEvtNr = new TGTextBuffer(100), M_EVTNUMBER);
    8686  fTxtEvtNr->Resize(60, fTxtEvtNr->GetDefaultHeight());
     87  fTxtEvtNr->Associate(this) ;
    8788  fTop2->AddFrame(fTxtEvtNr, new TGLayoutHints(kLHintsTop | kLHintsLeft,
    8889                                                       5, 5, 5, 5));
     
    171172 
    172173 
    173   fButtonPrint = new TGTextButton(fFrameLow, "Print", 9999) ;
     174  fButtonPrint = new TGTextButton(fFrameLow, "Print", M_PRINT) ;
     175  fButtonPrint->Associate(this) ;
    174176  fFrameLow->AddFrame( fButtonPrint, new TGLayoutHints(kLHintsLeft , 10, 10, 10, 10 ) )  ;
    175177
    176   fButtonClose = new TGTextButton(fFrameLow, "Close", 9999) ;
     178  fButtonClose = new TGTextButton(fFrameLow, "Close", M_CLOSE) ;
     179  fButtonClose->Associate(this) ;
    177180  fFrameLow->AddFrame( fButtonClose, new TGLayoutHints(kLHintsLeft, 10, 10, 10, 10 ) )  ;
    178181
     
    210213MGFadcDisp::~MGFadcDisp()
    211214{
     215  // close the file
     216
     217  readin->PostProcess() ;
     218
     219  delete  runheader ;
     220  delete  evtheader ;
     221  delete  evttime   ;
     222  delete  evtdata ;
     223  delete  evtcrate  ;
     224
     225  delete  plist ;
     226
     227  delete  readin ;
     228
     229  //   destruct the graphical members 
    212230
    213231  delete  fButtonPrint ;
    214232  delete  fButtonClose ;
    215 
    216   delete  fCan ;
     233 
     234  //  delete  fCan ;
    217235  delete  fECanDigScope ;
    218236  delete  fTabDisplay ;
    219 
     237 
    220238  delete  fPixSlider ;
    221239  delete  fButtonPrevPix ;
     
    224242  delete  fPixelList;
    225243  delete  fTabControl  ;
    226 
     244 
    227245  delete  fLabelEvtNr ;
    228246  delete  fLabelTotNr ;
     247  //delete  fTxtBufEvtNr ;
    229248  delete  fTxtEvtNr ;
    230   delete  fTxtBufEvtNr ;
    231249  delete  fButtonNextEvt ;
    232250  delete  fButtonPrevEvt ;
     
    237255  delete  fTop2 ;
    238256  delete  fTop1 ;
    239 
     257 
    240258  delete  fFrameLow ;
    241259  delete  fLineSep2 ;
     
    246264
    247265
     266void MGFadcDisp::CloseWindow()
     267{
     268   // Got close message for this MainFrame. Calls parent CloseWindow()
     269   // (which destroys the window) and terminate the application.
     270   // The close message is generated by the window manager when its close
     271   // window menu item is selected.
     272
     273  delete this ;
     274}
     275       
     276
    248277void MGFadcDisp::CreatePixelList() {
    249278  //
     
    260289  redraw = fPixelList->GetSelected() ;
    261290 
    262   cout << "redraw: " << redraw << endl ;
    263 
    264291  fPixelList->RemoveEntries(0, fPixelsinList) ;
    265292  fPixelsinList = 0 ;
     
    338365                 "The event number is out of range!!!",
    339366                 kMBIconExclamation, buttons, &retval);
     367    UpdateEventCounter() ;
    340368    return ;
    341369  }
     
    364392  //------------------------------------------------------------------
    365393  char wortdummy[256] ;
     394  Int_t   buttons = 4, retval = 0 ;
    366395
    367396  switch(GET_MSG(msg))
     
    387416
    388417              break;
     418
     419
     420            case M_PRINT:
     421              new TGMsgBox(fClient->GetRoot(), this,
     422                           "INFORMATION!",
     423                           "Your are invited to program that!!",
     424                           kMBIconExclamation, buttons, &retval);
    389425             
     426              break ;
     427            case M_CLOSE:
     428
     429              CloseWindow() ;
     430              break;
     431
    390432            }
    391433         
     
    410452         
    411453        }
     454   
     455    case kC_TEXTENTRY:
     456     
     457      switch(GET_SUBMSG(msg))
     458        {
     459        case kTE_TEXTCHANGED:
     460         
     461          break ;
     462        case kTE_ENTER:
     463         
     464          sprintf(wortdummy, "%s",  fTxtEvtNr->GetText()) ;
     465          cout << wortdummy<< endl  ;
     466         
     467          cout << atoi(wortdummy) << endl ;
     468         
     469         
     470          ReadinEvent( atoi(wortdummy) ) ;
     471
     472          break;
     473        }
     474     
     475      break;
     476     
    412477    default:
    413478      break;     
Note: See TracChangeset for help on using the changeset viewer.