Changeset 53b78e8 in git
- Timestamp:
- Nov 6, 2014, 2:00:06 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 5565691
- Parents:
- 0a67548
- Location:
- display
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
display/DelphesEventDisplay.cc
r0a67548 r53b78e8 430 430 plotSummary_ = new DelphesPlotSummary(tab); 431 431 plotSummary_->Init(elements_); 432 } 433 432 plotSummary_->Connect("Progress(Int_t)", "DelphesEventDisplay", this, "DisplayProgress(Int_t)"); 433 434 } 435 436 -
display/DelphesEventDisplay.h
r0a67548 r53b78e8 27 27 #include "display/DelphesHtmlSummary.h" 28 28 #include "display/DelphesPlotSummary.h" 29 #include "TSystem.h" 29 30 #include "TChain.h" 30 31 #include "TAxis.h" … … 105 106 106 107 void InitSummaryPlots() { 107 plotSummary_->FillSample(treeReader_, event_id_); // TODO we could add a signal to give the progress108 plotSummary_->FillSample(treeReader_, event_id_); 108 109 plotSummary_->FillEvent(); 109 110 plotSummary_->Draw(); 111 } 112 113 void DisplayProgress(Int_t p) { //TODO replace by a progress bar 114 fStatusBar_->SetText(Form("Processing... %d %%",p), 1); 115 gSystem->ProcessEvents(); 110 116 } 111 117 }; -
display/DelphesPlotSummary.cc
r0a67548 r53b78e8 8 8 9 9 DelphesPlotSummary::~DelphesPlotSummary() {} 10 11 void DelphesPlotSummary::Progress(Int_t p) 12 { 13 Emit("Progress(Int_t)",p); 14 } 10 15 11 16 void DelphesPlotSummary::Init(std::vector<DelphesBranchBase*>& elements) { … … 48 53 49 54 void DelphesPlotSummary::FillSample(ExRootTreeReader* treeReader, Int_t event_id) { 50 for(Int_t i=0;i<treeReader->GetEntries();++i) { 55 Int_t entries = treeReader->GetEntries(); 56 for(Int_t i=0;i<entries;++i) { 51 57 treeReader->ReadEntry(i); 52 58 for(std::vector<DelphesBranchBase*>::iterator element = elements_->begin();element<elements_->end();++element) { … … 70 76 } 71 77 } 78 Progress(int(100*i/entries)); 72 79 } 73 80 treeReader->ReadEntry(event_id); 81 Progress(100); 74 82 } 75 83 -
display/DelphesPlotSummary.h
r0a67548 r53b78e8 10 10 #include "DelphesBranchElement.h" 11 11 #include "external/ExRootAnalysis/ExRootTreeReader.h" 12 #include <RQ_OBJECT.h> 13 12 14 13 15 class DelphesPlotSummary 14 16 { 17 RQ_OBJECT("DelphesPlotSummary") 15 18 public: 16 19 DelphesPlotSummary(TEveWindowTab* tab); … … 20 23 void FillEvent(); 21 24 void Draw(); 25 void Progress(Int_t); // *SIGNAL* 22 26 23 27 private: -
display/DisplayLinkDef.h
r0a67548 r53b78e8 36 36 #include "display/DelphesEventDisplay.h" 37 37 #include "display/DelphesHtmlSummary.h" 38 #include "display/DelphesPlotSummary.h" 38 39 39 40 #ifdef __CINT__ … … 52 53 #pragma link C++ class DelphesHtmlObjTable; 53 54 #pragma link C++ class DelphesHtmlSummary; 55 #pragma link C++ class DelphesPlotSummary; 54 56 55 57 #endif
Note:
See TracChangeset
for help on using the changeset viewer.