Changeset 8b04b31 in git for display/DelphesHtmlSummary.cc
- Timestamp:
- Oct 21, 2014, 10:26:15 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 2ca23b5
- Parents:
- 5fbcfe8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
display/DelphesHtmlSummary.cc
r5fbcfe8 r8b04b31 214 214 } 215 215 216 //==============================================================================217 218 //______________________________________________________________________________219 void update_html_summary()220 {221 // Update summary of current event.222 223 TEveElement::List_i i;224 TEveElement::List_i j;225 Int_t k;226 TEveElement *el;227 DelphesHtmlObjTable *table;228 TEveEventManager *mgr = gEve ? gEve->GetCurrentEvent() : 0;229 if (mgr) {230 fgDelphesHtmlSummary->Clear("D");231 for (i=mgr->BeginChildren(); i!=mgr->EndChildren(); ++i) {232 el = ((TEveElement*)(*i));233 if (el->IsA() == TEvePointSet::Class()) {234 TEvePointSet *ps = (TEvePointSet *)el;235 TString ename = ps->GetElementName();236 TString etitle = ps->GetElementTitle();237 if (ename.First('\'') != kNPOS)238 ename.Remove(ename.First('\''));239 etitle.Remove(0, 2);240 Int_t nel = atoi(etitle.Data());241 table = fgDelphesHtmlSummary->AddTable(ename, 0, nel);242 }243 else if (el->IsA() == TEveTrackList::Class()) {244 TEveTrackList *tracks = (TEveTrackList *)el;245 TString ename = tracks->GetElementName();246 if (ename.First('\'') != kNPOS)247 ename.Remove(ename.First('\''));248 table = fgDelphesHtmlSummary->AddTable(ename.Data(), 5,249 tracks->NumChildren(), kTRUE, "first");250 table->SetLabel(0, "Momentum");251 table->SetLabel(1, "P_t");252 table->SetLabel(2, "Phi");253 table->SetLabel(3, "Theta");254 table->SetLabel(4, "Eta");255 k=0;256 for (j=tracks->BeginChildren(); j!=tracks->EndChildren(); ++j) {257 Float_t p = ((TEveTrack*)(*j))->GetMomentum().Mag();258 table->SetValue(0, k, p);259 Float_t pt = ((TEveTrack*)(*j))->GetMomentum().Perp();260 table->SetValue(1, k, pt);261 Float_t phi = ((TEveTrack*)(*j))->GetMomentum().Phi();262 table->SetValue(2, k, phi);263 Float_t theta = ((TEveTrack*)(*j))->GetMomentum().Theta();264 table->SetValue(3, k, theta);265 Float_t eta = ((TEveTrack*)(*j))->GetMomentum().Eta();266 table->SetValue(4, k, eta);267 ++k;268 }269 }270 }271 fgDelphesHtmlSummary->Build();272 fgHtml->Clear();273 fgHtml->ParseText((char*)fgDelphesHtmlSummary->Html().Data());274 fgHtml->Layout();275 }276 }
Note:
See TracChangeset
for help on using the changeset viewer.