CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWGUIManager.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Core
4 // Class : FWGUIManager
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Chris Jones
10 // Created: Mon Feb 11 11:06:40 EST 2008
11 // $Id: FWGUIManager.cc,v 1.252 2012/07/31 22:32:18 amraktad Exp $
12 
13 
14 //
15 
16 // system include files
17 #include <boost/bind.hpp>
18 #include <stdexcept>
19 #include <iostream>
20 #include <cstdio>
21 #include <sstream>
22 
23 #include "TGButton.h"
24 #include "TGLabel.h"
25 #include "TSystem.h"
26 #include "TGLViewer.h"
27 #include "TEveBrowser.h"
28 #include "TEveManager.h"
29 #include "TGPack.h"
30 #include "TEveWindow.h"
31 #include "TEveViewer.h"
32 #include "TEveWindowManager.h"
33 #include "TEveSelection.h"
34 #include "TVirtualX.h"
35 #include "TFile.h"
36 
37 // user include files
41 
52 
54 
57 
60 
62 
64 
69 
71 
73 
77 
79 
81 
83 
84 
85 // constants, enums and typedefs
86 //
87 //
88 // static data member definitions
89 //
91 
92 //
93 // constructors and destructor
94 //
96  const FWViewManagerManager* iVMMgr,
97  FWNavigatorBase* navigator):
98  m_context(ctx),
99  m_summaryManager(0),
100  m_detailViewManager(0),
101  m_viewManagerManager(iVMMgr),
102  m_contextMenuHandler(0),
103  m_navigator(navigator),
104  m_dataAdder(0),
105  m_ediFrame(0),
106  m_modelPopup(0),
107  m_viewPopup(0),
108  m_commonPopup(0),
109  m_invMassDialog(0),
110  m_helpPopup(0),
111  m_shortcutPopup(0),
112  m_helpGLPopup(0),
113  m_tasks(new CmsShowTaskExecutor),
114  m_WMOffsetX(0), m_WMOffsetY(0), m_WMDecorH(0)
115 {
116  m_guiManager = this;
117 
119 
121  im->newItem_.connect(boost::bind(&FWGUIManager::newItem, this, _1) );
122 
124 
125 
126  TEveCompositeFrame::IconBarCreator_foo foo = &FWGUIManager::makeGUIsubview;
127  TEveCompositeFrame::SetupFrameMarkup(foo, 20, 4, false);
128 
129  {
130  //NOTE: by making sure we defaultly open to a fraction of the full screen size we avoid
131  // causing the program to go into full screen mode under default SL4 window manager
132  UInt_t width = gClient->GetDisplayWidth();
133  UInt_t height = static_cast<UInt_t>(gClient->GetDisplayHeight()*.8);
134  //try to deal with multiple horizontally placed monitors. Since present monitors usually
135  // have less than 2000 pixels horizontally, when we see more it is a good indicator that
136  // we are dealing with more than one monitor.
137  while(width > 2000) {
138  width /= 2;
139  }
140  width = static_cast<UInt_t>(width*.8);
141  m_cmsShowMainFrame = new CmsShowMainFrame(gClient->GetRoot(),
142  width,
143  height,
144  this);
145  m_cmsShowMainFrame->SetCleanup(kDeepCleanup);
146 
147  /*
148  int mlist[FWViewType::kTypeSize] = {FWViewType::kRhoPhi, FWViewType::kRhoZ, FWViewType::k3D, FWViewType::kISpy, FWViewType::kLego, FWViewType::kLegoHF, FWViewType::kGlimpse,
149  FWViewType::kTable, FWViewType::kTableL1, FWViewType::kTableHLT,
150  FWViewType::kGeometryTable,
151  FWViewType::kRhoPhiPF, FWViewType::kLegoPFECAL}; */
152 
153  for (int i = 0 ; i < FWViewType::kTypeSize; ++i)
154  {
155  bool separator = (i == FWViewType::kGlimpse || i == FWViewType::kTableHLT || i == FWViewType::kLegoPFECAL);
157  action->activated.connect(boost::bind(&FWGUIManager::newViewSlot, this, FWViewType::idToName(i)));
158  }
159 
162 
163 
172 
175 
177 
179  assert(getAction(cmsshow::sHelp) != 0);
181  assert(getAction(cmsshow::sKeyboardShort) != 0);
184 
185  // toolbar special widget with non-void actions
187 
188  TQObject::Connect(m_cmsShowMainFrame->m_runEntry, "ReturnPressed()", "FWGUIManager", this, "runIdChanged()");
189  TQObject::Connect(m_cmsShowMainFrame->m_lumiEntry, "ReturnPressed()", "FWGUIManager", this, "lumiIdChanged()");
190  TQObject::Connect(m_cmsShowMainFrame->m_eventEntry, "ReturnPressed()", "FWGUIManager", this, "eventIdChanged()");
191 
192  TQObject::Connect(m_cmsShowMainFrame->m_filterShowGUIBtn, "Clicked()", "FWGUIManager", this, "showEventFilterGUI()");
193  TQObject::Connect(m_cmsShowMainFrame->m_filterEnableBtn, "Clicked()", "FWGUIManager", this, "filterButtonClicked()");
194 
195  TQObject::Connect(gEve->GetWindowManager(), "WindowSelected(TEveWindow*)", "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)");
196  TQObject::Connect(gEve->GetWindowManager(), "WindowDocked(TEveWindow*)" , "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)");
197  TQObject::Connect(gEve->GetWindowManager(), "WindowUndocked(TEveWindow*)", "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)");
198  }
199 }
200 
202 {
203  a->goingToBeDestroyed_.connect(boost::bind(&FWGUIManager::subviewIsBeingDestroyed, this, _1));
204  a->selected_.connect(boost::bind(&FWGUIManager::subviewInfoSelected, this, _1));
205  a->unselected_.connect(boost::bind(&FWGUIManager::subviewInfoUnselected, this, _1));
206  a->swap_.connect(boost::bind(&FWGUIManager::subviewSwapped, this, _1));
207 }
208 
209 //
210 // Destructor
211 //
213 {
214  delete m_invMassDialog;
215  delete m_summaryManager;
216  delete m_detailViewManager;
217  delete m_cmsShowMainFrame;
218  delete m_viewPopup;
219  delete m_ediFrame;
220  delete m_contextMenuHandler;
221 
222 }
223 
224 void
226 {
227  gEve->GetWindowManager()->Disconnect("WindowSelected(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)");
228  gEve->GetWindowManager()->Disconnect("WindowDocked(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)");
229  gEve->GetWindowManager()->Disconnect("WindowUndocked(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)");
230 
231  // avoid emit signals at end
232  gEve->GetSelection()->Disconnect();
233  gEve->GetHighlight()->Disconnect();
234  gEve->GetSelection()->RemoveElements();
235  gEve->GetHighlight()->RemoveElements();
236 
237  m_cmsShowMainFrame->UnmapWindow();
238  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
239  {
240  TEveCompositeFrameInMainFrame* mainFrame = dynamic_cast<TEveCompositeFrameInMainFrame*>((*wIt).first->GetEveFrame());
241  // main frames not to watch dying
242  if (mainFrame) mainFrame->UnmapWindow();
243  // destroy
244  (*wIt).second->destroy();
245  }
246 }
247 
248 //______________________________________________________________________________
249 // subviews construction
250 //
251 
252 TGFrame*
253 FWGUIManager::makeGUIsubview(TEveCompositeFrame* cp, TGCompositeFrame* parent, Int_t height)
254 {
255  TGFrame* frame = new FWGUISubviewArea(cp, parent, height);
256  return frame;
257 }
258 
259 void
261  ViewBuildFunctor& iBuilder)
262 {
263  m_nameToViewBuilder[iName]=iBuilder;
264 }
265 
266 
267 void
269 {
270  // this function have to exist, becuse CSGAction binds to void functions
271  createView(iName);
272 }
273 
275 FWGUIManager::createView(const std::string& iName, TEveWindowSlot* slot)
276 {
277  NameToViewBuilder::iterator itFind = m_nameToViewBuilder.find(iName);
278  assert (itFind != m_nameToViewBuilder.end());
279  if(itFind == m_nameToViewBuilder.end()) {
280  throw std::runtime_error(std::string("Unable to create view named ")+iName+" because it is unknown");
281  }
282 
283  if (!slot)
284  {
285  if (m_viewSecPack)
286  {
287  slot = m_viewSecPack->NewSlot();
288  }
289  else
290  {
291  slot = m_viewPrimPack->NewSlot();
292  m_viewSecPack = m_viewPrimPack->NewSlot()->MakePack();
293  m_viewSecPack->SetShowTitleBar(kFALSE);
294  }
295  }
296  TEveCompositeFrame *ef = slot->GetEveFrame();
297  FWViewBase* viewBase = itFind->second(slot, iName);
298  //in future, get context from 'view'
301 
302  TEveWindow *eveWindow = ef->GetEveWindow();
303  eveWindow->SetElementName(iName.c_str());
304 
305  std::pair<ViewMap_i,bool> insertPair = m_viewMap.insert(std::make_pair(eveWindow, viewBase));
306  return insertPair.first;
307 }
308 
309 
310 //
311 // actions
312 //
313 
314 void
316 {
318 }
319 
320 void
321 FWGUIManager::titleChanged(const char *subtitle)
322 {
323  char title[128];
324  snprintf(title,127,"cmsShow: %s", subtitle);
325  m_cmsShowMainFrame->SetWindowName(title);
326 }
327 
328 void
330  // To be replaced when we can get index from fwlite::Event
331 
332  TEveViewerList* viewers = gEve->GetViewers();
333  for (TEveElement::List_i i=viewers->BeginChildren(); i!= viewers->EndChildren(); ++i)
334  {
335  TEveViewer* ev = dynamic_cast<TEveViewer*>(*i);
336  if (ev)
337  ev->GetGLViewer()->DeleteOverlayAnnotations();
338  }
339 
342 }
343 
344 CSGAction*
346 {
347  return m_cmsShowMainFrame->getAction(name);
348 }
349 
352 {
354 }
355 
358 {
360 }
361 
364 {
365  return m_cmsShowMainFrame->loopAction();
366 }
367 
368 void
370 {
372 }
373 
374 void
376 {
378 }
379 
380 void
382 {
383  m_cmsShowMainFrame->m_runEntry->SetEnabled(!play);
384  m_cmsShowMainFrame->m_eventEntry->SetEnabled(!play);
385 }
386 
387 void
390 }
391 
392 void
394 {
396 }
397 
398 void
400 {
401 #if defined(THIS_WILL_NEVER_BE_DEFINED)
402  m_selectionItemsComboBox->AddEntry(iItem->name().c_str(),iItem->id());
403  if(iItem->id()==0) {
404  m_selectionItemsComboBox->Select(0);
405  }
406 #endif
407 }
408 
409 void
411 {
412  if (0==m_dataAdder) {
413  m_dataAdder = new FWGUIEventDataAdder(100,100,
417  }
418  m_dataAdder->show();
419 }
420 
421 
422 // subview actions
423 //
424 
425 TEveWindow*
427 {
428  TEveWindow* swapCandidate =0;
429 
430  if ( gEve->GetWindowManager()->GetCurrentWindow())
431  {
432  swapCandidate = gEve->GetWindowManager()->GetCurrentWindow();
433  }
434  else
435  {
436  // swap with first docked view
437  TEveCompositeFrame* pef;
438  TGFrameElementPack *pel;
439 
440  // check if there is view in prim pack
441  TGPack* pp = m_viewPrimPack->GetPack();
442  if ( pp->GetList()->GetSize() > 2)
443  {
444  pel = (TGFrameElementPack*) pp->GetList()->At(1);
445  if (pel->fState) // is first undocked
446  {
447  pef = dynamic_cast<TEveCompositeFrame*>(pel->fFrame);
448  if ( pef && pef->GetEveWindow())
449  swapCandidate = pef->GetEveWindow();
450  }
451  }
452  if (swapCandidate == 0)
453  {
454  // no eve window found in primary, check secondary
455  TGPack* sp = m_viewSecPack->GetPack();
456  TIter frame_iterator(sp->GetList());
457  while ((pel = (TGFrameElementPack*)frame_iterator()))
458  {
459  pef = dynamic_cast<TEveCompositeFrame*>(pel->fFrame);
460  if ( pef && pef->GetEveWindow() && pel->fState)
461  {
462  swapCandidate = pef->GetEveWindow() ;
463  break;
464  }
465  }
466  }
467  }
468  return swapCandidate;
469 }
470 
471 void
473 {
474  // First argumet is needed for signals/slot symetry
475 
476  // disable swap on the first left TEveCompositeFrame
477  // check info button
478  TEveWindow* current = getSwapCandidate();
479  bool checkInfoBtn = m_viewPopup ? m_viewPopup->mapped() : 0;
480  TEveWindow* selected = m_viewPopup ? m_viewPopup->getEveWindow() : 0;
481 
482  for (ViewMap_i it = m_viewMap.begin(); it != m_viewMap.end(); it++)
483  {
485  ar->setSwapIcon(current != it->first);
486  if (checkInfoBtn && selected)
487  ar->setInfoButton(selected == it->first);
488  }
489 }
490 
491 void
493 {
494  if (sva->isSelected())
495  setViewPopup(0);
496 
498  f = boost::bind(&FWGUIManager::subviewDestroy, this, sva);
499  m_tasks->addTask(f);
500  m_tasks->startDoingTasks();
501 }
502 
503 void
505 {
506  TEveWindow* ew = sva->getEveWindow();
507  FWViewBase* viewBase = m_viewMap[ew];
508  m_viewMap.erase(ew);
509  viewBase->destroy();
510 }
511 
512 void
514 {
515  std::vector<FWGUISubviewArea*> sd;
516  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
517  {
519  sd.push_back(ar);
520  }
521 
522  for (std::vector<FWGUISubviewArea*>::iterator i= sd.begin(); i !=sd.end(); ++i)
523  {
524  if ((*i)->isSelected())
525  setViewPopup(0);
526  subviewDestroy(*i);
527  }
528 
529  gSystem->ProcessEvents();
530  gSystem->Sleep(200);
531 
532 
533 
534  while (m_viewPrimPack->HasChildren())
535  {
536  TEveWindow* w = dynamic_cast<TEveWindow*>(m_viewPrimPack->FirstChild());
537  if (w) w->DestroyWindowAndSlot();
538  }
539 
540  gSystem->Sleep(200);
541  m_viewSecPack = 0;
542  gSystem->ProcessEvents();
543 
544 }
545 
546 void
548 {
549  // release button on previously selected
550  TEveWindow* ew = sva->getEveWindow();
551  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
552  {
553  if (wIt->first != ew)
555  }
556  setViewPopup(sva->getEveWindow());
557 }
558 
559 void
561 {
563 }
564 
565 void
567 {
568  TEveWindow* curr = getSwapCandidate();
569  TEveWindow* swap = sva->getEveWindow();
570  if (curr) swap->SwapWindow(curr);
571 
573 }
574 
575 TGVerticalFrame*
576 FWGUIManager::createList(TGCompositeFrame *p)
577 {
578  TGVerticalFrame *listFrame = new TGVerticalFrame(p, p->GetWidth(), p->GetHeight());
579 
580  TGHorizontalFrame* addFrame = new TGHorizontalFrame(listFrame, p->GetWidth(), 10, kRaisedFrame);
581  TGLabel* addLabel = new TGLabel(addFrame,"Summary View");
582  addFrame->AddFrame(addLabel, new TGLayoutHints(kLHintsCenterX, 0,0,2,2));
583  listFrame->AddFrame(addFrame, new TGLayoutHints(kLHintsExpandX | kLHintsTop));
584 
585  m_summaryManager = new FWSummaryManager(listFrame,
588  this,
591 
592  const unsigned int backgroundColor=0x2f2f2f;
593  TGTextButton* addDataButton = new TGTextButton(m_summaryManager->widget(), "Add Collection");
594  addDataButton->ChangeOptions(kRaisedFrame);
595  addDataButton->SetBackgroundColor(backgroundColor);
596  addDataButton->SetTextColor(0xFFFFFF);
597  addDataButton->SetToolTipText("Show additional collections");
598  addDataButton->Connect("Clicked()", "FWGUIManager", this, "addData()");
599  m_summaryManager->widget()->AddFrame(addDataButton, new TGLayoutHints(kLHintsExpandX|kLHintsLeft|kLHintsTop));
600  listFrame->AddFrame(m_summaryManager->widget(), new TGLayoutHints(kLHintsExpandX|kLHintsExpandY));
601 
602  return listFrame;
603 }
604 
605 void
606 FWGUIManager::createViews(TEveWindowSlot *slot)
607 {
608  m_viewPrimPack = slot->MakePack();
609  m_viewPrimPack->SetHorizontal();
610  m_viewPrimPack->SetElementName("Views");
611  m_viewPrimPack->SetShowTitleBar(kFALSE);
612  m_viewSecPack = 0;
613 }
614 
615 void
617 {
618  if (m_ediFrame == 0)
619  {
621  m_ediFrame->CenterOnParent(kTRUE,TGTransientFrame::kTopRight);
623  }
624 }
625 
626 void
628 {
629  createEDIFrame();
630  if (-1 != iToShow)
631  {
632  m_ediFrame->show(static_cast<FWDataCategories>(iToShow));
633  }
634  m_ediFrame->MapRaised();
635 }
636 
637 void
639 {
640  if (! m_commonPopup)
641  {
644  }
645  m_commonPopup->MapRaised();
646 }
647 
648 void
650 {
652  m_modelPopup->CenterOnParent(kTRUE,TGTransientFrame::kRight);
654 }
655 
656 void
658 {
660  m_modelPopup->MapRaised();
661 }
662 
663 void
665 {
666  if (m_viewPopup->getEveWindow())
667  {
669  sa->setInfoButton(kFALSE);
670  }
671 }
672 
673 void
675 {
676  // CSG action.
677  setViewPopup(0);
678 }
679 
680 void
682 {
683  FWViewBase* vb = ew ? m_viewMap[ew] : 0;
684  if (m_viewPopup == 0)
685  {
686  m_viewPopup = new CmsShowViewPopup(0, 200, 200, m_context->colorManager(), vb, ew);
688  }
689  else
690  {
692  }
693  m_viewPopup->reset(vb, ew);
694  m_viewPopup->MapRaised();
695 }
696 
697 void
699 {
700  if (! m_invMassDialog)
701  {
704  }
705  m_invMassDialog->MapRaised();
706 }
707 
708 void
710 {
711  if (m_helpPopup == 0)
712  {
713  m_helpPopup = new CmsShowHelpPopup("help.html", "CmsShow Help",
715  800, 600);
716  m_helpPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
717  }
718  m_helpPopup->MapWindow();
719 }
720 
721 
722 void
724 {
725  if (m_shortcutPopup == 0)
726  {
727  m_shortcutPopup = new CmsShowHelpPopup("shortcuts.html",
728  getAction(cmsshow::sKeyboardShort)->getName().c_str(),
729  m_cmsShowMainFrame, 800, 600);
730 
731  m_shortcutPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
732  }
733  m_shortcutPopup->MapWindow();
734 }
735 
737 {
738  if (m_helpGLPopup == 0)
739  {
740  m_helpGLPopup = new CmsShowHelpPopup("helpGL.html",
741  getAction(cmsshow::sHelpGL)->getName().c_str(),
742  m_cmsShowMainFrame, 800, 600);
743 
744  m_helpGLPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
745  }
746  m_helpGLPopup->MapWindow();
747 }
748 
749 void
751 {
752  if (! m_context->selectionManager()->selected().empty())
753  {
754  m_contextMenuHandler->showSelectedModelContext(iGlobalX,iGlobalY, iHandler);
755  }
756 }
757 
758 //
759 // const member functions
760 //
761 
764 {
765  return m_guiManager;
766 }
767 
768 const edm::EventBase*
770 {
771  return m_navigator->getCurrentEvent();
772 }
773 
782 bool
784 {
785 
786  const static char* kFileTypes[] = {"Fireworks Configuration files","*.fwc",
787  "All Files","*",
788  0,0};
789 
790  static TString dir(".");
791 
792  TGFileInfo fi;
793  fi.fFileTypes = kFileTypes;
794  fi.fIniDir = StrDup(dir);
795  new TGFileDialog(gClient->GetDefaultRoot(), m_cmsShowMainFrame, mode, &fi);
796  dir = fi.fIniDir;
797  if (fi.fFilename == 0) // to handle "cancel" button properly
798  return false;
799  std::string name = fi.fFilename;
800  // if the extension isn't already specified by hand, specify it now
801  std::string ext = kFileTypes[fi.fFileTypeIdx + 1] + 1;
802  if (ext.size() != 0 && name.find(ext) == name.npos)
803  name += ext;
804  result = name;
805  return true;
806 }
807 
808 
812 void
814 {
816  if (!promptForConfigurationFile(name, kFDOpen))
817  return;
818 
819 
821 }
822 
826 void
828 {
830  if (!promptForConfigurationFile(name, kFDSave))
831  return;
833 }
834 
835 void
837 {
838  if (m_viewPrimPack->GetPack()->GetList()->GetSize() > 2)
839  {
840  TGFrameElementPack* frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(1);
841  TEveCompositeFrame* ef = dynamic_cast<TEveCompositeFrame*>(frameEL->fFrame);
842  m_viewMap[ef->GetEveWindow()]->promptForSaveImageTo(m_cmsShowMainFrame);
843  }
844  else
845  {
846  fwLog(fwlog::kError) << "Main view has been destroyed." << std::endl;
847  }
848 }
849 
850 void
852 {
853  try {
854  static TString dir(".");
855  const char * kImageExportTypes[] = {"PNG", "*.png",
856  "GIF", "*.gif",
857  "JPEG", "*.jpg",
858  "PDF", "*.pdf",
859  "Encapsulated PostScript", "*.eps",
860  0, 0};
861 
862  TGFileInfo fi;
863  fi.fFileTypes = kImageExportTypes;
864  fi.fIniDir = StrDup(dir);
865  new TGFileDialog(gClient->GetDefaultRoot(), m_cmsShowMainFrame,
866  kFDSave,&fi);
867  dir = fi.fIniDir;
868  if (fi.fFilename != 0) {
869  std::string name = fi.fFilename;
870  // fi.fFileTypeIdx points to the name of the file type
871  // selected in the drop-down menu, so fi.fFileTypeIdx gives us
872  // the extension
873  std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
874  if (name.find(ext) == name.npos)
875  name += ext;
876  // now add format trailing before the extension
877  name.insert(name.rfind('.'), "-%u_%u_%u_%s");
878  exportAllViews(name);
879  }
880  }
881  catch (std::runtime_error &e) { std::cout << e.what() << std::endl; }
882 }
883 
884 void
886 {
887  // Save all GL views.
888  // Expects format to have "%d %d %d %s" which are replaced with
889  // run-number, event number, lumi block and view-name.
890  // Blanks in view-name are removed.
891  // If several views shave the same name, they are post-fixed
892  // with "_%d". They are sorted by view diagonal.
893 
894  typedef std::list<TEveViewer*> viewer_list_t;
895  typedef viewer_list_t::iterator viewer_list_i;
896 
897  typedef std::map<TString, viewer_list_t> name_map_t;
898  typedef name_map_t::iterator name_map_i;
899 
900  name_map_t vls;
901 
902  for (ViewMap_i i = m_viewMap.begin(); i != m_viewMap.end(); ++i)
903  {
904  TEveViewer *ev = dynamic_cast<TEveViewer*>(i->first);
905  if (ev)
906  {
907  TString name(ev->GetElementName());
908  name.ReplaceAll(" ", "");
909  viewer_list_t &l = vls[name];
910  viewer_list_i li = l.begin();
911  while (li != l.end() && (*li)->GetGLViewer()->ViewportDiagonal() < ev->GetGLViewer()->ViewportDiagonal())
912  ++li;
913  l.insert(li, ev);
914  }
915  }
916 
917  const edm::EventBase *event = getCurrentEvent();
918  for (name_map_i i = vls.begin(); i != vls.end(); ++i)
919  {
920  bool multi_p = (i->second.size() > 1);
921  int view_count = 1;
922  for (viewer_list_i j = i->second.begin(); j != i->second.end(); ++j, ++view_count)
923  {
924  TString view_name(i->first);
925  if (multi_p)
926  {
927  view_name += "_";
928  view_name += view_count;
929  }
930  TString file;
931  file.Form(format.c_str(), event->id().run(), event->id().event(),
932  event->luminosityBlock(), view_name.Data());
933  (*j)->GetGLViewer()->SavePicture(file);
934  }
935  }
936 }
937 
938 static const std::string kMainWindow("main window");
939 static const std::string kViews("views");
940 static const std::string kViewArea("view area");
941 static const std::string kUndocked("undocked views");
942 static const std::string kControllers("controllers");
943 static const std::string kCollectionController("collection");
944 static const std::string kViewController("view");
945 static const std::string kObjectController("object");
946 static const std::string kCommonController("common");
947 
948 static
949 void
950 addWindowInfoTo(const TGFrame* iMain,
951  FWConfiguration& oTo)
952 {
953  Window_t wdummy;
954  Int_t ax,ay;
955  gVirtualX->TranslateCoordinates(iMain->GetId(),
956  gClient->GetDefaultRoot()->GetId(),
957  0,0, //0,0 in local coordinates
958  ax,ay, //coordinates of screen
959  wdummy);
960  {
961  std::stringstream s;
962  s<<ax;
963  oTo.addKeyValue("x",FWConfiguration(s.str()));
964  }
965  {
966  std::stringstream s;
967  s<<ay;
968  oTo.addKeyValue("y",FWConfiguration(s.str()));
969  }
970  {
971  std::stringstream s;
972  s<<iMain->GetWidth();
973  oTo.addKeyValue("width",FWConfiguration(s.str()));
974  }
975  {
976  std::stringstream s;
977  s<<iMain->GetHeight();
978  oTo.addKeyValue("height",FWConfiguration(s.str()));
979  }
980 }
981 
982 class areaInfo
983 {
984  // helper class to save and restore view area
985 public:
986  areaInfo (TGFrameElementPack* frameElement)
987  {
988  eveWindow = 0;
989  originalSlot = 0;
990  undockedMainFrame = 0;
991  weight = frameElement->fWeight;
992  undocked = !frameElement->fState;
993 
994  TEveCompositeFrame *eveFrame = dynamic_cast<TEveCompositeFrame*>(frameElement->fFrame);
995  assert(eveFrame);
996 
997  if (frameElement->fState)
998  eveWindow = eveFrame->GetEveWindow();
999  else
1000  originalSlot = eveFrame->GetEveWindow();
1001  }
1002 
1004 
1005  Float_t weight;
1006  Bool_t undocked;
1007  TEveWindow *eveWindow;
1008  TGMainFrame *undockedMainFrame;// cached to help find original slot for undocked windows
1009  TEveWindow *originalSlot;
1010 };
1011 
1012 static
1013 void
1015  FWConfiguration& oTo)
1016 {
1017  {
1018  std::stringstream s;
1019  s << pInfo.weight;
1020  oTo.addKeyValue("weight", FWConfiguration(s.str()));
1021  }
1022  {
1023  std::stringstream s;
1024  s<< pInfo.undocked;
1025  oTo.addKeyValue("undocked", FWConfiguration(s.str()));
1026  }
1027 
1028  if (pInfo.undockedMainFrame)
1029  {
1030  FWConfiguration temp(oTo);
1031  addWindowInfoTo(pInfo.undockedMainFrame, temp);
1032  oTo.addKeyValue("UndockedWindowPos", temp);
1033  }
1034 }
1035 
1036 //______________________________________________________________________________
1037 void
1039 {
1040  Int_t cfgVersion=3;
1041 
1042  FWConfiguration mainWindow(cfgVersion);
1043  float leftWeight, rightWeight;
1044  addWindowInfoTo(m_cmsShowMainFrame, mainWindow);
1045  {
1046  // write summary view weight
1047  {
1048  std::stringstream ss;
1050  mainWindow.addKeyValue("summaryWeight",FWConfiguration(ss.str()));
1051  }
1052 
1053  // write proportions of horizontal pack (can be standalone item outside main frame)
1054  if ( m_viewPrimPack->GetPack()->GetList()->GetSize() > 2)
1055  {
1056  TGFrameElementPack *frameEL;
1057  frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(1); // read every second element, first on is splitter
1058  leftWeight = frameEL->fWeight;
1059  frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(3);
1060  rightWeight = frameEL->fWeight;
1061  }
1062  else
1063  {
1064  leftWeight = 0;
1065  rightWeight = 1;
1066  }
1067  std::stringstream sL;
1068  sL<<leftWeight;
1069  mainWindow.addKeyValue("leftWeight",FWConfiguration(sL.str()));
1070  std::stringstream sR;
1071  sR<<rightWeight;
1072  mainWindow.addKeyValue("rightWeight",FWConfiguration(sR.str()));
1073  }
1074  oTo.addKeyValue(kMainWindow, mainWindow, true);
1075 
1076  //------------------------------------------------------------
1077  // organize info about all docked frames includding hidden, which point to undocked
1078  std::vector<areaInfo> wpacked;
1079  if (leftWeight > 0)
1080  {
1081  TGPack* pp = m_viewPrimPack->GetPack();
1082  TGFrameElementPack *frameEL = (TGFrameElementPack*) pp->GetList()->At(1);
1083  if (frameEL->fWeight > 0)
1084  wpacked.push_back(areaInfo(frameEL));
1085  }
1086  TGPack* sp = m_viewSecPack->GetPack();
1087  TGFrameElementPack *seFE;
1088  TIter frame_iterator(sp->GetList());
1089  while ((seFE = (TGFrameElementPack*)frame_iterator() ))
1090  {
1091  if (seFE->fWeight)
1092  wpacked.push_back(areaInfo(seFE));
1093  }
1094 
1095  // undocked info
1096 
1097  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
1098  {
1099  TEveWindow* ew = wIt->first;
1100  TEveCompositeFrameInMainFrame* mainFrame = dynamic_cast<TEveCompositeFrameInMainFrame*>(ew->GetEveFrame());
1101  if (mainFrame)
1102  {
1103  for(std::vector<areaInfo>::iterator pIt = wpacked.begin(); pIt != wpacked.end(); ++pIt)
1104  {
1105  if ((*pIt).originalSlot && mainFrame->GetOriginalSlot() == (*pIt).originalSlot)
1106  {
1107  (*pIt).eveWindow = wIt->first;
1108  (*pIt).undockedMainFrame = (TGMainFrame*)mainFrame;
1109  // printf("found original slot for docked view %s\n", pInfo->viewBase->typeName().c_str());
1110  break;
1111  }// found match
1112  }
1113  }// end main frames
1114  }
1115 
1116  //------------------------------------------------------------
1117  // add sorted list in view area and FW-views configuration
1118  FWConfiguration views(1);
1119  FWConfiguration viewArea(cfgVersion);
1120  for(std::vector<areaInfo>::iterator it = wpacked.begin(); it != wpacked.end(); ++it)
1121  {
1122  TEveWindow* ew = (*it).eveWindow;
1123  if (ew) {
1124  FWViewBase* wb = m_viewMap[ew];
1125  FWConfiguration tempWiew(wb->version());
1126  wb->addTo(tempWiew);
1127  views.addKeyValue(wb->typeName(), tempWiew, true);
1128  FWConfiguration tempArea(cfgVersion);
1129  addAreaInfoTo((*it), tempArea);
1130  viewArea.addKeyValue(wb->typeName(), tempArea, true);
1131  }
1132  }
1133  oTo.addKeyValue(kViews, views, true);
1134  oTo.addKeyValue(kViewArea, viewArea, true);
1135 
1136  //------------------------------------------------------------
1137  //Remember where controllers were placed if they are open
1138  FWConfiguration controllers(1);
1139  {
1140  if(0!=m_ediFrame && m_ediFrame->IsMapped()) {
1141  FWConfiguration temp(1);
1142  addWindowInfoTo(m_ediFrame, temp);
1143  controllers.addKeyValue(kCollectionController,temp,true);
1144  }
1145  if(0!=m_viewPopup && m_viewPopup->IsMapped()) {
1146  FWConfiguration temp(1);
1148  controllers.addKeyValue(kViewController,temp,true);
1149  }
1150  if(0!=m_modelPopup && m_modelPopup->IsMapped()) {
1151  FWConfiguration temp(1);
1153  controllers.addKeyValue(kObjectController,temp,true);
1154  }
1155  if(0!=m_commonPopup && m_commonPopup->IsMapped()) {
1156  FWConfiguration temp(1);
1158  controllers.addKeyValue(kCommonController,temp,true);
1159  }
1160  }
1161  oTo.addKeyValue(kControllers,controllers,true);
1162 }
1163 
1164 //----------------------------------------------------------------
1165 void
1167  TGMainFrame* iFrame)
1168 {
1169  int x = atoi(iFrom.valueForKey("x")->value().c_str()) + m_WMOffsetX;
1170  int y = atoi(iFrom.valueForKey("y")->value().c_str()) + m_WMOffsetY;
1171  if (y < m_WMDecorH) y = m_WMDecorH;
1172  int width = atoi(iFrom.valueForKey("width")->value().c_str());
1173  int height = atoi(iFrom.valueForKey("height")->value().c_str());
1174  iFrame->MoveResize(x,y,width,height);
1175  iFrame->SetWMPosition(x, y);
1176 }
1177 
1178 void
1180  // main window
1182 
1183  const FWConfiguration* mw = iFrom.valueForKey(kMainWindow);
1184  assert(mw != 0);
1185  // Window needs to mapped before moving, otherwise move can lead
1186  // to wrong results on some window managers.
1187  m_cmsShowMainFrame->MapWindow();
1189  m_cmsShowMainFrame->MapSubwindows();
1190  m_cmsShowMainFrame->Layout();
1191  m_cmsShowMainFrame->MapRaised();
1192 
1193  // set from view reading area info nd view info
1194  float_t leftWeight =1;
1195  float_t rightWeight=1;
1196  if ( mw->version() >= 2 ) {
1197  leftWeight = atof(mw->valueForKey("leftWeight")->value().c_str());
1198  rightWeight = atof(mw->valueForKey("rightWeight")->value().c_str());
1199  }
1200 
1201  if ( mw->version() >= 3 ) {
1202  float summaryWeight = atof(mw->valueForKey("summaryWeight")->value().c_str());
1203  m_cmsShowMainFrame->setSummaryViewWeight(summaryWeight);
1204  }
1205 
1206  TEveWindowSlot* primSlot = (leftWeight > 0) ? m_viewPrimPack->NewSlotWithWeight(leftWeight) : 0;
1207  m_viewSecPack = m_viewPrimPack->NewSlotWithWeight(rightWeight)->MakePack();
1208  m_viewSecPack->SetVertical();
1209  m_viewSecPack->SetShowTitleBar(kFALSE);
1210 
1211  // views list
1212  const FWConfiguration* views = iFrom.valueForKey(kViews); assert(0!=views);
1213  const FWConfiguration::KeyValues* keyVals = views->keyValues();
1214  const FWConfiguration* viewArea = iFrom.valueForKey(kViewArea);
1215 
1216  // area list (ignored in older version)
1217  if ( viewArea->version() > 1)
1218  {
1219  const FWConfiguration::KeyValues* akv = viewArea->keyValues();
1220  FWConfiguration::KeyValuesIt areaIt = akv->begin();
1221 
1222  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it)
1223  {
1224  float weight = atof((areaIt->second).valueForKey("weight")->value().c_str());
1225  TEveWindowSlot* slot = ( m_viewMap.size() || (primSlot == 0) ) ? m_viewSecPack->NewSlotWithWeight(weight) : primSlot;
1226  std::string name = FWViewType::checkNameWithViewVersion(it->first, it->second.version());
1227  ViewMap_i lastViewIt = createView(name, slot);
1228  lastViewIt->second->setFrom(it->second);
1229 
1230  bool undocked = atof((areaIt->second).valueForKey("undocked")->value().c_str());
1231  if (undocked)
1232  {
1233  TEveWindow* lastWindow = lastViewIt->first;
1234  lastWindow->UndockWindow();
1235  TEveCompositeFrameInMainFrame* emf = dynamic_cast<TEveCompositeFrameInMainFrame*>(lastWindow->GetEveFrame());
1236  if (emf ) {
1237  const TGMainFrame* mf = dynamic_cast<const TGMainFrame*>(emf->GetParent());
1238  if (mf) {
1240  TGMainFrame* mfp = (TGMainFrame*)mf; // have to cast in non-const
1241  const FWConfiguration* mwc = (areaIt->second).valueForKey("UndockedWindowPos");
1242  setWindowInfoFrom(*mwc, mfp);
1243  }
1244  }
1245  }
1246  areaIt++;
1247  }
1248  }
1249  else
1250  { // create views with same weight in old version
1251  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) {
1252  std::string name = FWViewType::checkNameWithViewVersion(it->first, it->second.version());
1253  createView(name, m_viewMap.size() ? m_viewSecPack->NewSlot() : primSlot);
1254 
1255  ViewMap_i lastViewIt = m_viewMap.end(); lastViewIt--;
1256  lastViewIt->second->setFrom(it->second);
1257  }
1258  // handle undocked windows in old version
1259  const FWConfiguration* undocked = iFrom.valueForKey(kUndocked);
1260  if(0!=undocked) {
1261  fwLog(fwlog::kWarning) << "Restrore of undocked windows with old window management not supported." << std::endl;
1262  }
1263  }
1264 
1265  //handle controllers
1266  const FWConfiguration* controllers = iFrom.valueForKey(kControllers);
1267  if (0 != controllers)
1268  {
1269  const FWConfiguration::KeyValues* keyVals = controllers->keyValues();
1270  if (0 != keyVals)
1271  {
1272  //we have open controllers
1273  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it != keyVals->end(); ++it)
1274  {
1275  const std::string& controllerName = it->first;
1276  // std::cout <<"found controller "<<controllerName<<std::endl;
1277  if (controllerName == kCollectionController) {
1278  showEDIFrame();
1279  setWindowInfoFrom(it->second,m_ediFrame);
1280  } else if (controllerName == kViewController) {
1281  setViewPopup(0);
1282  setWindowInfoFrom(it->second, m_viewPopup);
1283  } else if (controllerName == kObjectController) {
1284  showModelPopup();
1285  setWindowInfoFrom(it->second, m_modelPopup);
1286  } else if (controllerName == kCommonController) {
1287  showCommonPopup();
1288  setWindowInfoFrom(it->second, m_commonPopup);
1289  }
1290  }
1291  }
1292  }
1293 
1294 
1295  for(ViewMap_i it = m_viewMap.begin(); it != m_viewMap.end(); ++it)
1296  {
1297  if (it->second->typeId() >= FWViewType::kGeometryTable)
1298  {
1301  }
1302  }
1303 
1304  // disable first docked view
1306 
1307 
1308 }
1309 
1310 void
1312 {
1313  gEve->GetBrowser()->MapWindow();
1314 }
1315 
1316 //
1317 // toolbar widgets callbacks
1318 //
1319 void
1321 {
1322  Float_t sec = val*0.001;
1323  m_cmsShowMainFrame->setPlayDelayGUI(sec, kFALSE);
1324  changedDelayBetweenEvents_.emit(sec);
1325 }
1326 
1327 void
1329 {
1330  m_cmsShowMainFrame->setPlayDelayGUI(val, kTRUE);
1331 }
1332 
1334 {
1335  m_cmsShowMainFrame->m_lumiEntry->SetText("", kFALSE);
1336  m_cmsShowMainFrame->m_lumiEntry->SetFocus();
1337 }
1338 
1340 {
1341  m_cmsShowMainFrame->m_eventEntry->SetText("", kFALSE);
1342  m_cmsShowMainFrame->m_eventEntry->SetFocus();
1343 }
1344 
1346 {
1350 }
1351 
1352 void
1354 {
1358 
1359  gEve->FullRedraw3D();
1360 }
1361 //______________________________________________________________________________
1362 
1363 void
1365 {
1367 }
1368 
1369 void
1371 {
1372  filterButtonClicked_.emit();
1373 }
1374 
1375 void
1377 {
1378  m_cmsShowMainFrame->m_filterShowGUIBtn->SetText(txt);
1379 }
1380 
1381 void
1383 {
1384  int i = state*3;
1388 }
1389 
1390 void
1392 {
1393  m_cmsShowMainFrame->m_filterEnableBtn->SetEnabled(btnEnabled);
1394 }
1395 
1396 void
1398 {
1399  const Int_t x = 100, y = 100;
1400 
1401  TGMainFrame *mf1 = new TGMainFrame(0, 0, 0);
1402  mf1->MapWindow();
1403  mf1->Move(x, y);
1404 
1405  // This seems to be the only reliable way to make sure Move() has been processed.
1406  {
1407  TGMainFrame *mf2 = new TGMainFrame(0, 0, 0);
1408  mf2->MapWindow();
1409  while (!mf2->IsMapped()) gClient->HandleInput();
1410  delete mf2;
1411  }
1412  {
1413  Int_t xm, ym;
1414  Window_t childdum;
1415  WindowAttributes_t attr;
1416  gVirtualX->TranslateCoordinates(mf1->GetId(), gClient->GetDefaultRoot()->GetId(),
1417  0, 0, xm, ym, childdum);
1418  gVirtualX->GetWindowAttributes(mf1->GetId(), attr);
1419  m_WMOffsetX = x - xm;
1420  m_WMOffsetY = y - ym;
1421  m_WMDecorH = attr.fY;
1422  fwLog(fwlog::kDebug) << Form("FWGUIManager::measureWMOffsets: required (%d,%d), measured(%d, %d) => dx=%d, dy=%d; decor_h=%d.\n",
1423  x, y, xm, ym, m_WMOffsetX, m_WMOffsetY, m_WMDecorH);
1424  }
1425  delete mf1;
1426 }
1427 
1428 void
1430 {
1432 }
const std::string sKeyboardShort
Definition: ActionsList.cc:40
TGVerticalFrame * createList(TGCompositeFrame *p)
const std::set< FWModelId > & selected() const
TEveWindow * getEveWindow()
tuple base
Main Program
Definition: newFWLiteAna.py:92
TGMainFrame * undockedMainFrame
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
FWNumberEntryField * m_lumiEntry
sigc::signal< void > writeToPresentConfigurationFile_
Definition: FWGUIManager.h:212
TGCompositeFrame * widget() const
void popupViewClosed()
int i
Definition: DBlmapReader.cc:9
void bindCSGActionKeys(const TGMainFrame *f) const
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
const std::string sShowCommonInsp
Definition: ActionsList.cc:24
sigc::signal< void > filterButtonClicked_
Definition: FWGUIManager.h:206
ViewMap_t m_viewMap
Definition: FWGUIManager.h:270
void showModelPopup()
const std::string sHelp
Definition: ActionsList.cc:39
sigc::signal< void, FWGUISubviewArea * > unselected_
const KeyValues * keyValues() const
void colorSetChanged()
Definition: CmsShowEDI.cc:531
NameToViewBuilder m_nameToViewBuilder
Definition: FWGUIManager.h:271
list parent
Definition: dbtoconf.py:74
void loadEvent(const edm::EventBase &event)
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:258
CSGContinuousAction * playEventsBackwardsAction() const
tuple pp
Definition: createTree.py:15
void subviewIsBeingDestroyed(FWGUISubviewArea *)
void subviewDestroyAll()
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:245
void createHelpPopup()
void subviewInfoSelected(FWGUISubviewArea *)
void setFilterButtonIcon(int)
sigc::signal< void > closed_
void createViews(TEveWindowSlot *slot)
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:262
void setViewPopup(TEveWindow *)
const std::string & name() const
Definition: FWEventItem.cc:501
TEveWindow * eveWindow
static void addAreaInfoTo(areaInfo &pInfo, FWConfiguration &oTo)
const std::string sBackgroundColor
Definition: ActionsList.cc:25
static const std::string kViewController("view")
FWColorManager * colorManager() const
Definition: Context.h:66
sigc::signal< void > activated
Definition: CSGAction.h:89
static void addWindowInfoTo(const TGFrame *iMain, FWConfiguration &oTo)
const std::string & typeName() const
Definition: FWViewBase.cc:121
void newViewSlot(const std::string &iName)
void addTo(FWConfiguration &) const
virtual void UnmapWindow()
unsigned int version() const
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:240
FWCustomIconsButton * m_filterEnableBtn
CSGContinuousAction * loopAction() const
void enableNext(bool enable=true)
static const std::string kViews("views")
void delaySliderChanged(Int_t)
static const std::string kObjectController("object")
void updateStatus(const char *status)
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:248
FWIntValueListener * m_delaySliderListener
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:273
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
static const std::string kCommonController("common")
const std::string sSaveConfigAs
Definition: ActionsList.cc:18
boost::function2< FWViewBase *, TEveWindowSlot *, const std::string & > ViewBuildFunctor
Definition: FWGUIManager.h:100
void setInfoButton(bool downp)
void enableActions(bool enable=true)
std::auto_ptr< CmsShowTaskExecutor > m_tasks
Definition: FWGUIManager.h:278
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:274
void setWindowInfoFrom(const FWConfiguration &iFrom, TGMainFrame *iFrame)
void registerViewBuilder(const std::string &iName, ViewBuildFunctor &iBuilder)
void checkSubviewAreaIconState(TEveWindow *)
void connectSubviewAreaSignals(FWGUISubviewArea *)
void createShortcutPopup()
const std::string sSaveConfig
Definition: ActionsList.cc:17
void setPlayMode(bool)
static const std::string kCollectionController("collection")
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:260
const TGPicture * m_filterIcons[9]
sigc::signal< void, Float_t > changedDelayBetweenEvents_
Definition: FWGUIManager.h:216
TEveWindow * getSwapCandidate()
void resetWMOffsets()
static const std::string kMainWindow("main window")
sigc::signal< void > colorsHaveChangedFinished_
void exportAllViews(const std::string &format)
static TGFrame * makeGUIsubview(TEveCompositeFrame *cp, TGCompositeFrame *parent, Int_t height)
TEveWindow * getEveWindow() const
FWNavigatorBase * m_navigator
Definition: FWGUIManager.h:251
static const std::string kUndocked("undocked views")
sigc::signal< void, const TGWindow * > showEventFilterGUI_
Definition: FWGUIManager.h:207
void setDelayBetweenEvents(Float_t)
CSGAction * createNewViewerAction(const std::string &iActionName, bool seaprator)
void exportImagesOfAllViews()
TEveWindow * originalSlot
void subviewDestroy(FWGUISubviewArea *)
FWNumberEntryField * m_eventEntry
tuple result
Definition: query.py:137
sigc::signal< void, FWGUISubviewArea * > goingToBeDestroyed_
void showInvMassDialog()
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:252
sigc::signal< void, Int_t > valueChanged_
sigc::signal< void, FWEventItem * > newItem_
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void newItem(const FWEventItem *)
void updateStatusBar(const char *status)
void reset(FWViewBase *, TEveWindow *ew)
virtual UInt_t GetUIntNumber()
void filterButtonClicked()
int j
Definition: DBlmapReader.cc:9
const std::string sShowAddCollection
Definition: ActionsList.cc:36
FWGUIEventDataAdder * m_dataAdder
Definition: FWGUIManager.h:255
void exportImageOfMainView()
double f[11][100]
unsigned int id() const
Definition: FWEventItem.cc:495
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
Definition: FWViewBase.cc:113
const std::string sExportImage
Definition: ActionsList.cc:19
FWSelectionManager * selectionManager() const
Definition: Context.h:58
void disablePrevious()
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:259
static const std::string kViewArea("view area")
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:261
virtual const edm::EventBase * getCurrentEvent() const =0
static const std::string & checkNameWithViewVersion(const std::string &name, unsigned int viewVersion)
Definition: FWViewType.cc:103
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:55
void createModelPopup()
CmsShowHelpPopup * m_helpGLPopup
Definition: FWGUIManager.h:267
const std::string sShowMainViewCtl
Definition: ActionsList.cc:35
void setFrom(const FWConfiguration &)
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
void eventChangedCallback()
FWNumberEntryField * m_runEntry
const std::string & value(unsigned int iIndex=0) const
void clearStatus()
unsigned int UInt_t
Definition: FUTypes.h:12
CSGAction * getAction(const std::string &name)
const edm::EventBase * getCurrentEvent() const
virtual void enableActions(bool enable=true)
void setIcons(const TGPicture *iUpIcon, const TGPicture *iDownIcon, const TGPicture *iDisabledIcon, const TGPicture *ibelowMouseIcon=0)
ViewMap_i createView(const std::string &iName, TEveWindowSlot *slot=0)
void showSelectedModelContext(Int_t iX, Int_t iY, FWViewContextMenuHandlerBase *) const
NOTE: iX and iY are in global coordinates.
const std::string sShowObjInsp
Definition: ActionsList.cc:33
tuple attr
Definition: asciidump.py:432
bool isSelected() const
CSGAction * getAction(const std::string name)
void updateEventFilterEnable(bool)
static FWGUIManager * getGUIManager()
CSGContinuousAction * loopAction()
#define fwLog(_level_)
Definition: fwLog.h:51
void eventIdChanged()
fireworks::Context * m_context
Definition: FWGUIManager.h:243
double sd
FWJobMetadataManager * metadataManager() const
Definition: Context.h:70
bool promptForConfigurationFile(std::string &result, enum EFileDialogMode mode)
CSGContinuousAction * playEventsBackwardsAction()
void finishUpColorChange()
sigc::signal< void, FWGUISubviewArea * > swap_
void setFilterButtonText(const char *txt)
const std::string sShowInvMassDialog
Definition: ActionsList.cc:37
CmsShowCommon * commonPrefs() const
Definition: Context.cc:179
sigc::signal< void, const std::string & > writeToConfigurationFile_
Definition: FWGUIManager.h:208
KeyValues::const_iterator KeyValuesIt
virtual ~FWGUIManager()
void setSummaryViewWeight(float)
const std::string sShowEventDisplayInsp
Definition: ActionsList.cc:34
char state
Definition: procUtils.cc:75
CSGContinuousAction * playEventsAction()
void enablePrevious(bool enable=true)
void subviewSwapped(FWGUISubviewArea *)
float getSummaryViewWeight() const
boost::function0< void > TaskFunctor
double a
Definition: hdecay.h:121
FWGUIManager(fireworks::Context *ctx, const FWViewManagerManager *iVMMgr, FWNavigatorBase *navigator)
Definition: FWGUIManager.cc:95
void showEventFilterGUI()
static const std::string & idToName(int)
Definition: FWViewType.cc:90
Bool_t undocked
void evePreTerminate()
void subviewInfoUnselected(FWGUISubviewArea *)
void promptForSaveConfigurationFile()
const std::string sLoadConfig
Definition: ActionsList.cc:16
tuple cout
Definition: gather_cfg.py:121
void showSelectedModelContextMenu(Int_t iGlobalX, Int_t iGlobalY, FWViewContextMenuHandlerBase *iHandler)
void destroy()
Definition: FWViewBase.cc:65
T w() const
const FWConfiguration * valueForKey(const std::string &iKey) const
void createEDIFrame()
dbl *** dir
Definition: mlp_gen.cc:35
const std::string sExportAllImages
Definition: ActionsList.cc:20
Definition: DDAxes.h:10
int weight
Definition: histoStyle.py:50
tuple status
Definition: ntuplemaker.py:245
sigc::signal< void, const std::string & > loadFromConfigurationFile_
Definition: FWGUIManager.h:209
sigc::signal< void, FWGUISubviewArea * > selected_
TGTextButton * m_filterShowGUIBtn
areaInfo(TGFrameElementPack *frameElement)
Float_t weight
void titleChanged(const char *title)
const std::string sHelpGL
Definition: ActionsList.cc:41
void promptForLoadConfigurationFile()
FWModelContextMenuHandler * m_contextMenuHandler
Definition: FWGUIManager.h:250
void disableNext()
void setPlayDelayGUI(Float_t val, Bool_t sliderChanged)
CSGContinuousAction * playEventsAction() const
sigc::signal< void, edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t > changedEventId_
Definition: FWGUIManager.h:210
void measureWMOffsets()
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
Definition: FWViewBase.h:57
void showCommonPopup()
static const std::string kControllers("controllers")
void runIdChanged()
void showViewPopup()
void show(FWDataCategories)
Definition: CmsShowEDI.cc:524
void createHelpGLPopup()
CmsShowHelpPopup * m_helpPopup
Definition: FWGUIManager.h:265
void openEveBrowserForDebugging() const
void lumiIdChanged()
virtual void addTo(FWConfiguration &) const
CmsShowHelpPopup * m_shortcutPopup
Definition: FWGUIManager.h:266