Changeset 0a67548 in git for display/DelphesEventDisplay.cc
- Timestamp:
- Nov 6, 2014, 10:58:31 AM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 53b78e8
- Parents:
- 6301e02
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
display/DelphesEventDisplay.cc
r6301e02 r0a67548 73 73 delete chain_; 74 74 } 75 76 void DelphesEventDisplay::EventChanged(Int_t e) 77 { 78 if( e!= event_id_ ) { 79 event_id_ = e; 80 Emit("EventChanged(Int_t)",e); 81 load_event(); 82 } 83 } 84 75 85 76 86 DelphesEventDisplay::DelphesEventDisplay(const char *configFile, const char *inputFile, Delphes3DGeometry& det3D) … … 370 380 b->Connect("Clicked()", "DelphesEventDisplay", this, "Bck()"); 371 381 372 numberEntry_ = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries()); 373 hf->AddFrame(numberEntry_, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10)); 374 numberEntry_->Connect("ValueSet(Long_t)", "DelphesEventDisplay", this, "GoTo(Long_t)"); 382 TGNumberEntry* numberEntry = new TGNumberEntry(hf,0,9,-1,TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative, TGNumberFormat::kNELLimitMinMax, 0, treeReader_->GetEntries()); 383 hf->AddFrame(numberEntry, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 2, 0, 10, 10)); 384 this->Connect("EventChanged(Int_t)","TGNumberEntry",numberEntry,"SetIntNumber(Long_t)"); 385 numberEntry->GetNumberEntry()->Connect("TextChanged(char*)", "DelphesEventDisplay", this, "PreSetEv(char*)"); 386 numberEntry->GetNumberEntry()->Connect("ReturnPressed()", "DelphesEventDisplay", this, "GoTo()"); 375 387 376 388 b = new TGPictureButton(hf, gClient->GetPicture(icondir+"GoForward.gif")); … … 381 393 vf->AddFrame(hf, new TGLayoutHints(kLHintsExpandX , 2, 2, 2, 2)); 382 394 383 progress_ = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100); 384 progress_->SetMax( treeReader_->GetEntries()); 385 progress_->ShowPosition(kTRUE, kFALSE, "Event %.0f"); 386 progress_->SetBarColor("green"); 387 vf->AddFrame(progress_, new TGLayoutHints(kLHintsExpandX, 10, 10, 5, 5)); 395 TGHProgressBar* progress = new TGHProgressBar(frmMain, TGProgressBar::kFancy, 100); 396 progress->SetMax( treeReader_->GetEntries()); 397 progress->ShowPosition(kTRUE, kFALSE, "Event %.0f"); 398 progress->SetBarColor("green"); 399 vf->AddFrame(progress, new TGLayoutHints(kLHintsExpandX, 10, 10, 5, 5)); 400 this->Connect("EventChanged(Int_t)","TGHProgressBar",progress,"SetPosition(Float_t)"); 388 401 } 389 402 frmMain->AddFrame(vf, new TGLayoutHints(kLHintsExpandX , 5, 5, 5, 5));
Note:
See TracChangeset
for help on using the changeset viewer.