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