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