Changeset fafc433 in git for display/DelphesEventDisplay.h
- Timestamp:
- Oct 16, 2014, 2:19:17 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 30bb83a
- Parents:
- a3b2495
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
display/DelphesEventDisplay.h
ra3b2495 rfafc433 21 21 22 22 #include <vector> 23 #include <iostream> 23 24 #include "external/ExRootAnalysis/ExRootTreeReader.h" 24 25 #include "display/DelphesDisplay.h" … … 40 41 DelphesEventDisplay(const char *configFile, const char *inputFile, Delphes3DGeometry& det3D); 41 42 ~DelphesEventDisplay(); 42 Int_t event_id;43 ExRootTreeReader *gTreeReader;44 void load_event();45 43 46 44 private: 47 45 void make_gui(); 46 void load_event(); 48 47 void delphes_read(); 49 48 void delphes_read_towers(TClonesArray* data, DelphesBranchBase* element); … … 54 53 55 54 // Configuration and global variables. 55 Int_t event_id_; 56 ExRootTreeReader *treeReader_; 56 57 Double_t tkRadius_, totRadius_, tkHalfLength_, bz_; 57 58 TChain* chain_; 58 std::vector<DelphesBranchBase*> gElements;59 std::vector<TClonesArray*> gArrays;60 DelphesDisplay * gDelphesDisplay;59 std::vector<DelphesBranchBase*> elements_; 60 std::vector<TClonesArray*> arrays_; 61 DelphesDisplay *delphesDisplay_; 61 62 62 // EvNavHandler class is needed to connect GUI signals. 63 class EvNavHandler 64 { 65 public: 66 67 EvNavHandler(DelphesEventDisplay* display):display_(display) {} 63 // gui controls 64 public: 65 void Fwd() { 66 if (event_id_ < treeReader_->GetEntries() - 1) { 67 ++event_id_; 68 load_event(); 69 } else { 70 printf("Already at last event.\n"); 71 } 72 } 68 73 69 ~EvNavHandler() {} 70 71 void Fwd() { 72 if (display_->event_id < display_->gTreeReader->GetEntries() - 1) { 73 ++(display_->event_id); 74 display_->load_event(); 75 } else { 76 printf("Already at last event.\n"); 77 } 78 } 79 80 void Bck() { 81 if (display_->event_id > 0) { 82 --(display_->event_id); 83 display_->load_event(); 84 } else { 85 printf("Already at first event.\n"); 86 } 87 } 88 private: 89 DelphesEventDisplay* display_; 90 }; 74 void Bck() { 75 if (event_id_ > 0) { 76 --event_id_; 77 load_event(); 78 } else { 79 printf("Already at first event.\n"); 80 } 81 } 91 82 }; 92 83
Note:
See TracChangeset
for help on using the changeset viewer.