Changeset 660 for trunk/MagicSoft/Mars/meventdisp
- Timestamp:
- 03/01/01 17:35:02 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc
r659 r660 185 185 AddFrame(fFrameLow, new TGLayoutHints (kLHintsTop ) ) ; 186 186 187 188 189 187 // 190 188 // Map the window, set up the layout, etc. 191 189 // 192 193 190 SetWMSizeHints(450, 400, 1000, 1000, 10, 10 ) ; // set the smallest and biggest size of the Main frame 194 191 … … 205 202 // fReadTree the first event and update the window 206 203 // 207 208 204 fReadTree->GetEvent() ; 209 205 CreatePixelList() ; … … 345 341 void MGFadcDisp::ReadinEvent(Int_t iEvt) 346 342 { 347 Int_t buttons = 4, retval = 0 ; 348 349 // first check if the new event is in the range of possible events 350 351 if ( iEvt < 0 || iEvt >= fReadTree->GetEntries() ) { 352 new TGMsgBox(fClient->GetRoot(), this, 353 "WARNING!", 354 "The event number is out of range!!!", 355 kMBIconExclamation, buttons, &retval); 356 UpdateEventCounter() ; 357 return ; 358 } 359 else { 360 fReadTree->SetEventNum(iEvt) ; 361 fReadTree->GetEvent() ; 362 CreatePixelList() ; 363 UpdateEventCounter() ; 364 } 365 } 343 Int_t buttons = 4; 344 Int_t retval = 0 ; 345 346 // first check if the new event is in the range of possible events 347 348 if ( iEvt < 0 || iEvt >= fReadTree->GetEntries() ) 349 { 350 new TGMsgBox(fClient->GetRoot(), this, 351 "WARNING!", 352 "The event number is out of range!!!", 353 kMBIconExclamation, buttons, &retval); 354 UpdateEventCounter() ; 355 return ; 356 } 357 358 fReadTree->SetEventNum(iEvt) ; 359 fReadTree->GetEvent() ; 360 CreatePixelList() ; 361 UpdateEventCounter() ; 362 } 366 363 367 364 Bool_t MGFadcDisp::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) … … 392 389 { 393 390 case M_PREVEVT: 394 395 391 ReadinEvent(fReadTree->GetEventNum()-1 ) ; 396 397 392 break; 398 393 399 394 case M_NEXTEVT: 400 401 395 ReadinEvent(fReadTree->GetEventNum()+1 ) ; 402 403 396 break; 404 397 … … 410 403 kMBIconExclamation, buttons, &retval); 411 404 412 break ; 405 break ; 406 413 407 case M_CLOSE: 414 415 408 CloseWindow() ; 416 409 break; … … 431 424 fCan->Modified() ; 432 425 fCan->Update() ; 433 434 435 426 break; 436 427 } … … 444 435 { 445 436 case kTE_TEXTCHANGED: 446 447 break ; 437 break ; 438 448 439 case kTE_ENTER: 449 450 440 sprintf(wortdummy, "%s", fTxtEvtNr->GetText()) ; 451 441 cout << wortdummy<< endl ; 452 453 442 cout << atoi(wortdummy) << endl ; 454 443 455 456 444 ReadinEvent( atoi(wortdummy) ) ; 457 458 445 break; 459 446 } 460 461 447 break; 462 448
Note:
See TracChangeset
for help on using the changeset viewer.