CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
FWGUIManager Class Reference

#include <Fireworks/Core/interface/FWGUIManager.h>

Inheritance diagram for FWGUIManager:
FWConfigurable

Public Types

typedef std::map< std::string,
ViewBuildFunctor
NameToViewBuilder
 
typedef boost::function2
< FWViewBase *, TEveWindowSlot
*, const std::string & > 
ViewBuildFunctor
 

Public Member Functions

void addData ()
 
void addTo (FWConfiguration &) const
 
void checkSubviewAreaIconState (TEveWindow *)
 
void clearStatus ()
 
void connectSubviewAreaSignals (FWGUISubviewArea *)
 
void createEDIFrame ()
 
void createHelpGLPopup ()
 
void createHelpPopup ()
 
TGVerticalFrame * createList (TGCompositeFrame *p)
 
void createModelPopup ()
 
void createShortcutPopup ()
 
ViewMap_i createView (const std::string &iName, TEveWindowSlot *slot=0)
 
void createViews (TEveWindowSlot *slot)
 
void disableNext ()
 
void disablePrevious ()
 
void enableActions (bool enable=true)
 
void eventChangedCallback ()
 
void eventIdChanged ()
 
void evePreTerminate ()
 
void exportAllViews (const std::string &format)
 
void exportImageOfMainView ()
 
void exportImagesOfAllViews ()
 
void filterButtonClicked ()
 
 FWGUIManager (fireworks::Context *ctx, const FWViewManagerManager *iVMMgr, FWNavigatorBase *navigator)
 
CSGActiongetAction (const std::string name)
 
const edm::EventBasegetCurrentEvent () const
 
CmsShowMainFramegetMainFrame () const
 
CSGContinuousActionloopAction ()
 
void lumiIdChanged ()
 
void newViewSlot (const std::string &iName)
 
void openEveBrowserForDebugging () const
 
CSGContinuousActionplayEventsAction ()
 
CSGContinuousActionplayEventsBackwardsAction ()
 
void popupViewClosed ()
 
void processGUIEvents ()
 
void registerViewBuilder (const std::string &iName, ViewBuildFunctor &iBuilder)
 
void resetWMOffsets ()
 
void runIdChanged ()
 
void setDelayBetweenEvents (Float_t)
 
void setFilterButtonIcon (int)
 
void setFilterButtonText (const char *txt)
 
void setFrom (const FWConfiguration &)
 
void setPlayMode (bool)
 
void setWindowInfoFrom (const FWConfiguration &iFrom, TGMainFrame *iFrame)
 
void showCommonPopup ()
 
void showEDIFrame (int iInfoToShow=-1)
 Allowed values are -1 or ones from FWDataCategories enum. More...
 
void showEventFilterGUI ()
 
void showInvMassDialog ()
 
void showModelPopup ()
 
void showSelectedModelContextMenu (Int_t iGlobalX, Int_t iGlobalY, FWViewContextMenuHandlerBase *iHandler)
 
void showViewPopup ()
 
void subviewDestroy (FWGUISubviewArea *)
 
void subviewDestroyAll ()
 
void subviewInfoSelected (FWGUISubviewArea *)
 
void subviewInfoUnselected (FWGUISubviewArea *)
 
void subviewIsBeingDestroyed (FWGUISubviewArea *)
 
void subviewSwapped (FWGUISubviewArea *)
 
void titleChanged (const char *title)
 
void updateEventFilterEnable (bool)
 
void updateStatus (const char *status)
 
virtual ~FWGUIManager ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 

Static Public Member Functions

static FWGUIManagergetGUIManager ()
 
static TGFrame * makeGUIsubview (TEveCompositeFrame *cp, TGCompositeFrame *parent, Int_t height)
 

Public Attributes

sigc::signal< void, Float_t > changedDelayBetweenEvents_
 
sigc::signal< void > changedEventEntry_
 
sigc::signal< void,
edm::RunNumber_t,
edm::LuminosityBlockNumber_t,
edm::EventNumber_t
changedEventId_
 
sigc::signal< void > changedRunEntry_
 
sigc::signal< void > filterButtonClicked_
 
sigc::signal< void > goingToQuit_
 
sigc::signal< void, const
std::string & > 
loadFromConfigurationFile_
 
sigc::signal< void, const
TGWindow * > 
showEventFilterGUI_
 
sigc::signal< void, const
std::string & > 
writeToConfigurationFile_
 
sigc::signal< void > writeToPresentConfigurationFile_
 

Private Types

typedef ViewMap_t::iterator ViewMap_i
 
typedef std::map< TEveWindow
*, FWViewBase * > 
ViewMap_t
 

Private Member Functions

void delaySliderChanged (Int_t)
 
void finishUpColorChange ()
 
 FWGUIManager (const FWGUIManager &)
 
TEveWindow * getSwapCandidate ()
 
void measureWMOffsets ()
 
void newItem (const FWEventItem *)
 
const FWGUIManageroperator= (const FWGUIManager &)
 
bool promptForConfigurationFile (std::string &result, enum EFileDialogMode mode)
 
void promptForLoadConfigurationFile ()
 
void promptForSaveConfigurationFile ()
 
void setViewPopup (TEveWindow *)
 

Private Attributes

CmsShowMainFramem_cmsShowMainFrame
 
CmsShowCommonPopupm_commonPopup
 
fireworks::Contextm_context
 
FWModelContextMenuHandlerm_contextMenuHandler
 
FWGUIEventDataAdderm_dataAdder
 
FWDetailViewManagerm_detailViewManager
 
CmsShowEDIm_ediFrame
 
TGPopupMenu * m_fileMenu
 
CmsShowHelpPopupm_helpGLPopup
 
CmsShowHelpPopupm_helpPopup
 
FWInvMassDialogm_invMassDialog
 
sigc::connection m_modelChangeConn
 
CmsShowModelPopupm_modelPopup
 
NameToViewBuilder m_nameToViewBuilder
 
FWNavigatorBasem_navigator
 
CmsShowHelpPopupm_shortcutPopup
 
FWSummaryManagerm_summaryManager
 
std::auto_ptr
< CmsShowTaskExecutor
m_tasks
 
const FWViewManagerManagerm_viewManagerManager
 
ViewMap_t m_viewMap
 
CmsShowViewPopupm_viewPopup
 
TEveWindowPack * m_viewPrimPack
 
TEveWindowPack * m_viewSecPack
 
int m_WMDecorH
 
int m_WMOffsetX
 
int m_WMOffsetY
 

Static Private Attributes

static FWGUIManagerm_guiManager = 0
 

Detailed Description

Description: Manages the GUI

Usage: <usage>

Definition at line 96 of file FWGUIManager.h.

Member Typedef Documentation

typedef std::map<std::string, ViewBuildFunctor > FWGUIManager::NameToViewBuilder

Definition at line 101 of file FWGUIManager.h.

typedef boost::function2<FWViewBase*,TEveWindowSlot*, const std::string& > FWGUIManager::ViewBuildFunctor

Definition at line 100 of file FWGUIManager.h.

typedef ViewMap_t::iterator FWGUIManager::ViewMap_i
private

Definition at line 104 of file FWGUIManager.h.

typedef std::map<TEveWindow*, FWViewBase*> FWGUIManager::ViewMap_t
private

Definition at line 103 of file FWGUIManager.h.

Constructor & Destructor Documentation

FWGUIManager::FWGUIManager ( fireworks::Context ctx,
const FWViewManagerManager iVMMgr,
FWNavigatorBase navigator 
)

Definition at line 95 of file FWGUIManager.cc.

References alignmentValidation::action, CSGAction::activated, addData(), fireworks::Context::colorManager(), FWColorManager::colorsHaveChangedFinished_, createHelpGLPopup(), createHelpPopup(), CmsShowMainFrame::createNewViewerAction(), createShortcutPopup(), delaySliderChanged(), fireworks::Context::eventItemsManager(), exportImageOfMainView(), exportImagesOfAllViews(), finishUpColorChange(), getAction(), i, FWViewType::idToName(), FWViewType::kGlimpse, FWViewType::kLegoPFECAL, FWViewType::kTableHLT, FWViewType::kTypeSize, m_cmsShowMainFrame, m_context, m_contextMenuHandler, CmsShowMainFrame::m_delaySliderListener, m_detailViewManager, CmsShowMainFrame::m_eventEntry, CmsShowMainFrame::m_filterEnableBtn, CmsShowMainFrame::m_filterShowGUIBtn, m_guiManager, CmsShowMainFrame::m_lumiEntry, CmsShowMainFrame::m_runEntry, makeGUIsubview(), measureWMOffsets(), newItem(), FWEventItemsManager::newItem_, newViewSlot(), promptForLoadConfigurationFile(), promptForSaveConfigurationFile(), cmsshow::sBackgroundColor, fireworks::Context::selectionManager(), cmsshow::sExportAllImages, cmsshow::sExportImage, cmsshow::sHelp, cmsshow::sHelpGL, showCommonPopup(), showEDIFrame(), showInvMassDialog(), showModelPopup(), showViewPopup(), cmsshow::sKeyboardShort, cmsshow::sLoadConfig, cmsshow::sSaveConfig, cmsshow::sSaveConfigAs, cmsshow::sShowAddCollection, cmsshow::sShowCommonInsp, cmsshow::sShowEventDisplayInsp, cmsshow::sShowInvMassDialog, cmsshow::sShowMainViewCtl, cmsshow::sShowObjInsp, FWColorManager::switchBackground(), FWIntValueListener::valueChanged_, tablePrinter::width, and writeToPresentConfigurationFile_.

97  :
98  m_context(ctx),
101  m_viewManagerManager(iVMMgr),
103  m_navigator(navigator),
104  m_dataAdder(0),
105  m_ediFrame(0),
106  m_modelPopup(0),
107  m_viewPopup(0),
108  m_commonPopup(0),
109  m_invMassDialog(0),
110  m_helpPopup(0),
111  m_shortcutPopup(0),
112  m_helpGLPopup(0),
115 {
116  m_guiManager = this;
117 
119 
121  im->newItem_.connect(boost::bind(&FWGUIManager::newItem, this, _1) );
122 
124 
125 
126  TEveCompositeFrame::IconBarCreator_foo foo = &FWGUIManager::makeGUIsubview;
127  TEveCompositeFrame::SetupFrameMarkup(foo, 20, 4, false);
128 
129  {
130  //NOTE: by making sure we defaultly open to a fraction of the full screen size we avoid
131  // causing the program to go into full screen mode under default SL4 window manager
132  UInt_t width = gClient->GetDisplayWidth();
133  UInt_t height = static_cast<UInt_t>(gClient->GetDisplayHeight()*.8);
134  //try to deal with multiple horizontally placed monitors. Since present monitors usually
135  // have less than 2000 pixels horizontally, when we see more it is a good indicator that
136  // we are dealing with more than one monitor.
137  while(width > 2000) {
138  width /= 2;
139  }
140  width = static_cast<UInt_t>(width*.8);
141  m_cmsShowMainFrame = new CmsShowMainFrame(gClient->GetRoot(),
142  width,
143  height,
144  this);
145  m_cmsShowMainFrame->SetCleanup(kDeepCleanup);
146 
147  /*
148  int mlist[FWViewType::kTypeSize] = {FWViewType::kRhoPhi, FWViewType::kRhoZ, FWViewType::k3D, FWViewType::kISpy, FWViewType::kLego, FWViewType::kLegoHF, FWViewType::kGlimpse,
149  FWViewType::kTable, FWViewType::kTableL1, FWViewType::kTableHLT,
150  FWViewType::kGeometryTable,
151  FWViewType::kRhoPhiPF, FWViewType::kLegoPFECAL}; */
152 
153  for (int i = 0 ; i < FWViewType::kTypeSize; ++i)
154  {
155  bool separator = (i == FWViewType::kGlimpse || i == FWViewType::kTableHLT || i == FWViewType::kLegoPFECAL);
157  action->activated.connect(boost::bind(&FWGUIManager::newViewSlot, this, FWViewType::idToName(i)));
158  }
159 
162 
163 
172 
175 
177 
179  assert(getAction(cmsshow::sHelp) != 0);
181  assert(getAction(cmsshow::sKeyboardShort) != 0);
184 
185  // toolbar special widget with non-void actions
187 
188  TQObject::Connect(m_cmsShowMainFrame->m_runEntry, "ReturnPressed()", "FWGUIManager", this, "runIdChanged()");
189  TQObject::Connect(m_cmsShowMainFrame->m_lumiEntry, "ReturnPressed()", "FWGUIManager", this, "lumiIdChanged()");
190  TQObject::Connect(m_cmsShowMainFrame->m_eventEntry, "ReturnPressed()", "FWGUIManager", this, "eventIdChanged()");
191 
192  TQObject::Connect(m_cmsShowMainFrame->m_filterShowGUIBtn, "Clicked()", "FWGUIManager", this, "showEventFilterGUI()");
193  TQObject::Connect(m_cmsShowMainFrame->m_filterEnableBtn, "Clicked()", "FWGUIManager", this, "filterButtonClicked()");
194 
195  TQObject::Connect(gEve->GetWindowManager(), "WindowSelected(TEveWindow*)", "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)");
196  TQObject::Connect(gEve->GetWindowManager(), "WindowDocked(TEveWindow*)" , "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)");
197  TQObject::Connect(gEve->GetWindowManager(), "WindowUndocked(TEveWindow*)", "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)");
198  }
199 }
const std::string sKeyboardShort
Definition: ActionsList.cc:40
FWNumberEntryField * m_lumiEntry
sigc::signal< void > writeToPresentConfigurationFile_
Definition: FWGUIManager.h:213
int i
Definition: DBlmapReader.cc:9
const std::string sShowCommonInsp
Definition: ActionsList.cc:24
void showModelPopup()
const std::string sHelp
Definition: ActionsList.cc:39
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:246
void createHelpPopup()
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:263
const std::string sBackgroundColor
Definition: ActionsList.cc:25
FWColorManager * colorManager() const
Definition: Context.h:66
sigc::signal< void > activated
Definition: CSGAction.h:89
void newViewSlot(const std::string &iName)
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:241
FWCustomIconsButton * m_filterEnableBtn
void delaySliderChanged(Int_t)
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:249
FWIntValueListener * m_delaySliderListener
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
const std::string sSaveConfigAs
Definition: ActionsList.cc:18
std::auto_ptr< CmsShowTaskExecutor > m_tasks
Definition: FWGUIManager.h:279
void createShortcutPopup()
const std::string sSaveConfig
Definition: ActionsList.cc:17
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
sigc::signal< void > colorsHaveChangedFinished_
static TGFrame * makeGUIsubview(TEveCompositeFrame *cp, TGCompositeFrame *parent, Int_t height)
FWNavigatorBase * m_navigator
Definition: FWGUIManager.h:252
CSGAction * createNewViewerAction(const std::string &iActionName, bool seaprator)
void exportImagesOfAllViews()
FWNumberEntryField * m_eventEntry
void showInvMassDialog()
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
sigc::signal< void, Int_t > valueChanged_
sigc::signal< void, FWEventItem * > newItem_
void newItem(const FWEventItem *)
const std::string sShowAddCollection
Definition: ActionsList.cc:36
FWGUIEventDataAdder * m_dataAdder
Definition: FWGUIManager.h:256
void exportImageOfMainView()
const std::string sExportImage
Definition: ActionsList.cc:19
FWSelectionManager * selectionManager() const
Definition: Context.h:58
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:260
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:262
CmsShowHelpPopup * m_helpGLPopup
Definition: FWGUIManager.h:268
const std::string sShowMainViewCtl
Definition: ActionsList.cc:35
const FWViewManagerManager * m_viewManagerManager
Definition: FWGUIManager.h:250
FWNumberEntryField * m_runEntry
unsigned int UInt_t
Definition: FUTypes.h:12
const std::string sShowObjInsp
Definition: ActionsList.cc:33
CSGAction * getAction(const std::string name)
fireworks::Context * m_context
Definition: FWGUIManager.h:244
void finishUpColorChange()
const std::string sShowInvMassDialog
Definition: ActionsList.cc:37
const std::string sShowEventDisplayInsp
Definition: ActionsList.cc:34
static const std::string & idToName(int)
Definition: FWViewType.cc:89
void promptForSaveConfigurationFile()
const std::string sLoadConfig
Definition: ActionsList.cc:16
const std::string sExportAllImages
Definition: ActionsList.cc:20
TGTextButton * m_filterShowGUIBtn
const std::string sHelpGL
Definition: ActionsList.cc:41
void promptForLoadConfigurationFile()
FWModelContextMenuHandler * m_contextMenuHandler
Definition: FWGUIManager.h:251
void measureWMOffsets()
void showCommonPopup()
void showViewPopup()
void createHelpGLPopup()
CmsShowHelpPopup * m_helpPopup
Definition: FWGUIManager.h:266
CmsShowHelpPopup * m_shortcutPopup
Definition: FWGUIManager.h:267
FWGUIManager::~FWGUIManager ( )
virtual

Definition at line 212 of file FWGUIManager.cc.

References m_cmsShowMainFrame, m_contextMenuHandler, m_detailViewManager, m_ediFrame, m_invMassDialog, m_summaryManager, and m_viewPopup.

213 {
214  delete m_invMassDialog;
215  delete m_summaryManager;
216  delete m_detailViewManager;
217  delete m_cmsShowMainFrame;
218  delete m_viewPopup;
219  delete m_ediFrame;
220  delete m_contextMenuHandler;
221 
222 }
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:246
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:263
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:249
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
FWModelContextMenuHandler * m_contextMenuHandler
Definition: FWGUIManager.h:251
FWGUIManager::FWGUIManager ( const FWGUIManager )
private

Member Function Documentation

void FWGUIManager::addData ( )

Definition at line 416 of file FWGUIManager.cc.

References fireworks::Context::eventItemsManager(), m_cmsShowMainFrame, m_context, m_dataAdder, fireworks::Context::metadataManager(), and FWGUIEventDataAdder::show().

Referenced by FWGUIManager().

417 {
418  if (0==m_dataAdder) {
419  m_dataAdder = new FWGUIEventDataAdder(100,100,
423  }
424  m_dataAdder->show();
425 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
FWGUIEventDataAdder * m_dataAdder
Definition: FWGUIManager.h:256
fireworks::Context * m_context
Definition: FWGUIManager.h:244
FWJobMetadataManager * metadataManager() const
Definition: Context.h:70
void FWGUIManager::addTo ( FWConfiguration oTo) const
virtual

Implements FWConfigurable.

Definition at line 1030 of file FWGUIManager.cc.

References addAreaInfoTo(), FWConfiguration::addKeyValue(), FWConfigurableParameterizable::addTo(), addWindowInfoTo(), CmsShowMainFrame::getSummaryViewWeight(), i, kCollectionController(), kCommonController(), kControllers(), kMainWindow(), kObjectController(), kViewArea(), kViewController(), kViews(), m_cmsShowMainFrame, m_commonPopup, m_ediFrame, m_modelPopup, m_viewMap, m_viewPopup, m_viewPrimPack, m_viewSecPack, createTree::pp, cond::rpcobtemp::temp, FWViewBase::typeName(), and FWConfigurableParameterizable::version().

1031 {
1032  Int_t cfgVersion=3;
1033 
1034  FWConfiguration mainWindow(cfgVersion);
1035  float leftWeight, rightWeight;
1036  addWindowInfoTo(m_cmsShowMainFrame, mainWindow);
1037  {
1038  // write summary view weight
1039  {
1040  std::stringstream ss;
1042  mainWindow.addKeyValue("summaryWeight",FWConfiguration(ss.str()));
1043  }
1044 
1045  // write proportions of horizontal pack (can be standalone item outside main frame)
1046  if ( m_viewPrimPack->GetPack()->GetList()->GetSize() > 2)
1047  {
1048  TGFrameElementPack *frameEL;
1049  frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(1); // read every second element, first on is splitter
1050  leftWeight = frameEL->fWeight;
1051  frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(3);
1052  rightWeight = frameEL->fWeight;
1053  }
1054  else
1055  {
1056  leftWeight = 0;
1057  rightWeight = 1;
1058  }
1059  std::stringstream sL;
1060  sL<<leftWeight;
1061  mainWindow.addKeyValue("leftWeight",FWConfiguration(sL.str()));
1062  std::stringstream sR;
1063  sR<<rightWeight;
1064  mainWindow.addKeyValue("rightWeight",FWConfiguration(sR.str()));
1065  }
1066  oTo.addKeyValue(kMainWindow, mainWindow, true);
1067 
1068  //------------------------------------------------------------
1069  // organize info about all docked frames includding hidden, which point to undocked
1070  std::vector<areaInfo> wpacked;
1071  if (leftWeight > 0)
1072  {
1073  TGPack* pp = m_viewPrimPack->GetPack();
1074  TGFrameElementPack *frameEL = (TGFrameElementPack*) pp->GetList()->At(1);
1075  if (frameEL->fWeight > 0)
1076  wpacked.push_back(areaInfo(frameEL));
1077  }
1078  TGPack* sp = m_viewSecPack->GetPack();
1079  Int_t nf = sp->GetList()->GetSize();
1080  TIter frame_iterator(sp->GetList());
1081  for (Int_t i=0; i<nf; ++i) {
1082  TGFrameElementPack *seFE = (TGFrameElementPack*)frame_iterator();
1083  if (seFE->fWeight)
1084  wpacked.push_back(areaInfo(seFE));
1085  }
1086 
1087  // undocked info
1088 
1089  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
1090  {
1091  TEveWindow* ew = wIt->first;
1092  TEveCompositeFrameInMainFrame* mainFrame = dynamic_cast<TEveCompositeFrameInMainFrame*>(ew->GetEveFrame());
1093  if (mainFrame)
1094  {
1095  for(std::vector<areaInfo>::iterator pIt = wpacked.begin(); pIt != wpacked.end(); ++pIt)
1096  {
1097  if ((*pIt).originalSlot && mainFrame->GetOriginalSlot() == (*pIt).originalSlot)
1098  {
1099  (*pIt).eveWindow = wIt->first;
1100  (*pIt).undockedMainFrame = (TGMainFrame*)mainFrame;
1101  // printf("found original slot for docked view %s\n", pInfo->viewBase->typeName().c_str());
1102  break;
1103  }// found match
1104  }
1105  }// end main frames
1106  }
1107 
1108  //------------------------------------------------------------
1109  // add sorted list in view area and FW-views configuration
1110  FWConfiguration views(1);
1111  FWConfiguration viewArea(cfgVersion);
1112  for(std::vector<areaInfo>::iterator it = wpacked.begin(); it != wpacked.end(); ++it)
1113  {
1114  TEveWindow* ew = (*it).eveWindow;
1115  if (ew) {
1116  FWViewBase* wb = m_viewMap[ew];
1117  FWConfiguration tempWiew(wb->version());
1118  wb->addTo(tempWiew);
1119  views.addKeyValue(wb->typeName(), tempWiew, true);
1120  FWConfiguration tempArea(cfgVersion);
1121  addAreaInfoTo((*it), tempArea);
1122  viewArea.addKeyValue(wb->typeName(), tempArea, true);
1123  }
1124  }
1125  oTo.addKeyValue(kViews, views, true);
1126  oTo.addKeyValue(kViewArea, viewArea, true);
1127 
1128  //------------------------------------------------------------
1129  //Remember where controllers were placed if they are open
1130  FWConfiguration controllers(1);
1131  {
1132  if(0!=m_ediFrame && m_ediFrame->IsMapped()) {
1133  FWConfiguration temp(1);
1135  controllers.addKeyValue(kCollectionController,temp,true);
1136  }
1137  if(0!=m_viewPopup && m_viewPopup->IsMapped()) {
1138  FWConfiguration temp(1);
1140  controllers.addKeyValue(kViewController,temp,true);
1141  }
1142  if(0!=m_modelPopup && m_modelPopup->IsMapped()) {
1143  FWConfiguration temp(1);
1145  controllers.addKeyValue(kObjectController,temp,true);
1146  }
1147  if(0!=m_commonPopup && m_commonPopup->IsMapped()) {
1148  FWConfiguration temp(1);
1150  controllers.addKeyValue(kCommonController,temp,true);
1151  }
1152  }
1153  oTo.addKeyValue(kControllers,controllers,true);
1154 }
int i
Definition: DBlmapReader.cc:9
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
tuple pp
Definition: createTree.py:15
static void addAreaInfoTo(areaInfo &pInfo, FWConfiguration &oTo)
static const std::string kViewController("view")
static void addWindowInfoTo(const TGFrame *iMain, FWConfiguration &oTo)
const std::string & typeName() const
Definition: FWViewBase.cc:114
static const std::string kViews("views")
static const std::string kObjectController("object")
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
static const std::string kCommonController("common")
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:275
static const std::string kCollectionController("collection")
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
static const std::string kMainWindow("main window")
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:260
static const std::string kViewArea("view area")
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:262
FWConfiguration & addKeyValue(const std::string &, const FWConfiguration &)
float getSummaryViewWeight() const
static const std::string kControllers("controllers")
virtual void addTo(FWConfiguration &) const
void FWGUIManager::checkSubviewAreaIconState ( TEveWindow *  )

Definition at line 480 of file FWGUIManager.cc.

References cond::rpcobimon::current, CmsShowViewPopup::getEveWindow(), getSwapCandidate(), FWGUISubviewArea::getToolBarFromWindow(), m_viewMap, m_viewPopup, CmsShowViewPopup::mapped(), FWGUISubviewArea::setInfoButton(), and FWGUISubviewArea::setSwapIcon().

Referenced by setFrom(), and subviewSwapped().

481 {
482  // First argumet is needed for signals/slot symetry
483 
484  // disable swap on the first left TEveCompositeFrame
485  // check info button
486  TEveWindow* current = getSwapCandidate();
487  bool checkInfoBtn = m_viewPopup ? m_viewPopup->mapped() : 0;
488  TEveWindow* selected = m_viewPopup ? m_viewPopup->getEveWindow() : 0;
489 
490  for (ViewMap_i it = m_viewMap.begin(); it != m_viewMap.end(); it++)
491  {
493  ar->setSwapIcon(current != it->first);
494  if (checkInfoBtn && selected)
495  ar->setInfoButton(selected == it->first);
496  }
497 }
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
void setInfoButton(bool downp)
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
TEveWindow * getSwapCandidate()
TEveWindow * getEveWindow() const
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void FWGUIManager::clearStatus ( )
void FWGUIManager::connectSubviewAreaSignals ( FWGUISubviewArea a)

Definition at line 201 of file FWGUIManager.cc.

References FWGUISubviewArea::goingToBeDestroyed_, FWGUISubviewArea::selected_, subviewInfoSelected(), subviewInfoUnselected(), subviewIsBeingDestroyed(), subviewSwapped(), FWGUISubviewArea::swap_, and FWGUISubviewArea::unselected_.

Referenced by FWGUISubviewArea::FWGUISubviewArea().

202 {
203  a->goingToBeDestroyed_.connect(boost::bind(&FWGUIManager::subviewIsBeingDestroyed, this, _1));
204  a->selected_.connect(boost::bind(&FWGUIManager::subviewInfoSelected, this, _1));
205  a->unselected_.connect(boost::bind(&FWGUIManager::subviewInfoUnselected, this, _1));
206  a->swap_.connect(boost::bind(&FWGUIManager::subviewSwapped, this, _1));
207 }
sigc::signal< void, FWGUISubviewArea * > unselected_
void subviewIsBeingDestroyed(FWGUISubviewArea *)
void subviewInfoSelected(FWGUISubviewArea *)
sigc::signal< void, FWGUISubviewArea * > goingToBeDestroyed_
sigc::signal< void, FWGUISubviewArea * > swap_
void subviewSwapped(FWGUISubviewArea *)
void subviewInfoUnselected(FWGUISubviewArea *)
sigc::signal< void, FWGUISubviewArea * > selected_
void FWGUIManager::createEDIFrame ( )

Definition at line 625 of file FWGUIManager.cc.

References CmsShowMainFrame::bindCSGActionKeys(), fireworks::Context::colorManager(), m_cmsShowMainFrame, m_context, m_ediFrame, and fireworks::Context::selectionManager().

Referenced by showEDIFrame().

625  {
626  if (m_ediFrame == 0) {
628  m_ediFrame->CenterOnParent(kTRUE,TGTransientFrame::kTopRight);
630  }
631 }
void bindCSGActionKeys(const TGMainFrame *f) const
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
FWColorManager * colorManager() const
Definition: Context.h:66
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
FWSelectionManager * selectionManager() const
Definition: Context.h:58
fireworks::Context * m_context
Definition: FWGUIManager.h:244
void FWGUIManager::createHelpGLPopup ( )

Definition at line 738 of file FWGUIManager.cc.

References getAction(), edm::getName(), m_cmsShowMainFrame, m_helpGLPopup, and cmsshow::sHelpGL.

Referenced by FWGUIManager().

739 {
740  if (m_helpGLPopup == 0) {
741  m_helpGLPopup = new CmsShowHelpPopup("helpGL.html",
742  getAction(cmsshow::sHelpGL)->getName().c_str(),
743  m_cmsShowMainFrame, 800, 600);
744 
745  m_helpGLPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
746  }
747  m_helpGLPopup->MapWindow();
748 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
CmsShowHelpPopup * m_helpGLPopup
Definition: FWGUIManager.h:268
CSGAction * getAction(const std::string name)
const std::string sHelpGL
Definition: ActionsList.cc:41
void FWGUIManager::createHelpPopup ( )

Definition at line 713 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and m_helpPopup.

Referenced by FWGUIManager().

714 {
715  if (m_helpPopup == 0) {
716  m_helpPopup = new CmsShowHelpPopup("help.html", "CmsShow Help",
718  800, 600);
719  m_helpPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
720  }
721  m_helpPopup->MapWindow();
722 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
CmsShowHelpPopup * m_helpPopup
Definition: FWGUIManager.h:266
TGVerticalFrame * FWGUIManager::createList ( TGCompositeFrame *  p)

Definition at line 585 of file FWGUIManager.cc.

References fireworks::Context::colorManager(), fireworks::Context::eventItemsManager(), m_context, m_summaryManager, fireworks::Context::modelChangeManager(), fireworks::Context::selectionManager(), and FWSummaryManager::widget().

Referenced by CmsShowMainFrame::CmsShowMainFrame().

586 {
587  TGVerticalFrame *listFrame = new TGVerticalFrame(p, p->GetWidth(), p->GetHeight());
588 
589  TGHorizontalFrame* addFrame = new TGHorizontalFrame(listFrame, p->GetWidth(), 10, kRaisedFrame);
590  TGLabel* addLabel = new TGLabel(addFrame,"Summary View");
591  addFrame->AddFrame(addLabel, new TGLayoutHints(kLHintsCenterX, 0,0,2,2));
592  listFrame->AddFrame(addFrame, new TGLayoutHints(kLHintsExpandX | kLHintsTop));
593 
594  m_summaryManager = new FWSummaryManager(listFrame,
597  this,
600 
601  const unsigned int backgroundColor=0x2f2f2f;
602  TGTextButton* addDataButton = new TGTextButton(m_summaryManager->widget(), "Add Collection");
603  addDataButton->ChangeOptions(kRaisedFrame);
604  addDataButton->SetBackgroundColor(backgroundColor);
605  addDataButton->SetTextColor(0xFFFFFF);
606  addDataButton->SetToolTipText("Show additional collections");
607  addDataButton->Connect("Clicked()", "FWGUIManager", this, "addData()");
608  m_summaryManager->widget()->AddFrame(addDataButton, new TGLayoutHints(kLHintsExpandX|kLHintsLeft|kLHintsTop));
609  listFrame->AddFrame(m_summaryManager->widget(), new TGLayoutHints(kLHintsExpandX|kLHintsExpandY));
610 
611  return listFrame;
612 }
TGCompositeFrame * widget() const
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:62
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:246
FWColorManager * colorManager() const
Definition: Context.h:66
FWSelectionManager * selectionManager() const
Definition: Context.h:58
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:55
fireworks::Context * m_context
Definition: FWGUIManager.h:244
void FWGUIManager::createModelPopup ( )

Definition at line 655 of file FWGUIManager.cc.

References CmsShowMainFrame::bindCSGActionKeys(), fireworks::Context::colorManager(), ecaldqm::kRight, m_cmsShowMainFrame, m_context, m_detailViewManager, m_modelPopup, and fireworks::Context::selectionManager().

Referenced by showModelPopup().

656 {
658  m_modelPopup->CenterOnParent(kTRUE,TGTransientFrame::kRight);
660 }
void bindCSGActionKeys(const TGMainFrame *f) const
FWColorManager * colorManager() const
Definition: Context.h:66
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:249
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
FWSelectionManager * selectionManager() const
Definition: Context.h:58
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:260
fireworks::Context * m_context
Definition: FWGUIManager.h:244
void FWGUIManager::createShortcutPopup ( )

Definition at line 726 of file FWGUIManager.cc.

References getAction(), edm::getName(), m_cmsShowMainFrame, m_shortcutPopup, and cmsshow::sKeyboardShort.

Referenced by FWGUIManager().

727 {
728  if (m_shortcutPopup == 0) {
729  m_shortcutPopup = new CmsShowHelpPopup("shortcuts.html",
731  m_cmsShowMainFrame, 800, 600);
732 
733  m_shortcutPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight);
734  }
735  m_shortcutPopup->MapWindow();
736 }
const std::string sKeyboardShort
Definition: ActionsList.cc:40
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
CSGAction * getAction(const std::string name)
CmsShowHelpPopup * m_shortcutPopup
Definition: FWGUIManager.h:267
FWGUIManager::ViewMap_i FWGUIManager::createView ( const std::string &  iName,
TEveWindowSlot *  slot = 0 
)

Definition at line 275 of file FWGUIManager.cc.

References newFWLiteAna::base, FWViewBase::contextMenuHandler(), m_guiManager, m_nameToViewBuilder, m_viewMap, m_viewPrimPack, m_viewSecPack, FWViewBase::openSelectedModelContextMenu_, and showSelectedModelContextMenu().

Referenced by newViewSlot(), and setFrom().

276 {
277  NameToViewBuilder::iterator itFind = m_nameToViewBuilder.find(iName);
278  assert (itFind != m_nameToViewBuilder.end());
279  if(itFind == m_nameToViewBuilder.end()) {
280  throw std::runtime_error(std::string("Unable to create view named ")+iName+" because it is unknown");
281  }
282 
283  if (!slot)
284  {
285  if (m_viewSecPack)
286  {
287  slot = m_viewSecPack->NewSlot();
288  }
289  else
290  {
291  slot = m_viewPrimPack->NewSlot();
292  m_viewSecPack = m_viewPrimPack->NewSlot()->MakePack();
293  m_viewSecPack->SetShowTitleBar(kFALSE);
294  }
295  }
296  TEveCompositeFrame *ef = slot->GetEveFrame();
297  FWViewBase* viewBase = itFind->second(slot, iName);
298  //in future, get context from 'view'
301 
302  TEveWindow *eveWindow = ef->GetEveWindow();
303  eveWindow->SetElementName(iName.c_str());
304 
305  std::pair<ViewMap_i,bool> insertPair = m_viewMap.insert(std::make_pair(eveWindow, viewBase));
306  return insertPair.first;
307 }
tuple base
Main Program
Definition: newFWLiteAna.py:92
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
NameToViewBuilder m_nameToViewBuilder
Definition: FWGUIManager.h:272
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:241
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:275
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
Definition: FWViewBase.cc:106
void showSelectedModelContextMenu(Int_t iGlobalX, Int_t iGlobalY, FWViewContextMenuHandlerBase *iHandler)
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
Definition: FWViewBase.h:57
void FWGUIManager::createViews ( TEveWindowSlot *  slot)

Definition at line 615 of file FWGUIManager.cc.

References m_viewPrimPack, and m_viewSecPack.

Referenced by CmsShowMainFrame::CmsShowMainFrame().

616 {
617  m_viewPrimPack = slot->MakePack();
618  m_viewPrimPack->SetHorizontal();
619  m_viewPrimPack->SetElementName("Views");
620  m_viewPrimPack->SetShowTitleBar(kFALSE);
621  m_viewSecPack = 0;
622 }
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:275
void FWGUIManager::delaySliderChanged ( Int_t  val)
private

Definition at line 1306 of file FWGUIManager.cc.

References changedDelayBetweenEvents_, m_cmsShowMainFrame, and CmsShowMainFrame::setPlayDelayGUI().

Referenced by FWGUIManager().

1307 {
1308  Float_t sec = val*0.001;
1309  m_cmsShowMainFrame->setPlayDelayGUI(sec, kFALSE);
1310  changedDelayBetweenEvents_.emit(sec);
1311 }
sigc::signal< void, Float_t > changedDelayBetweenEvents_
Definition: FWGUIManager.h:217
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void setPlayDelayGUI(Float_t val, Bool_t sliderChanged)
void FWGUIManager::disableNext ( )

Definition at line 375 of file FWGUIManager.cc.

References CmsShowMainFrame::enableNext(), and m_cmsShowMainFrame.

Referenced by FWFFService::checkPosition(), FWFFLooper::checkPosition(), and CmsShowMain::checkPosition().

376 {
378 }
void enableNext(bool enable=true)
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::disablePrevious ( )

Definition at line 369 of file FWGUIManager.cc.

References CmsShowMainFrame::enablePrevious(), and m_cmsShowMainFrame.

Referenced by FWFFService::checkPosition(), FWFFLooper::checkPosition(), and CmsShowMain::checkPosition().

370 {
372 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void enablePrevious(bool enable=true)
void FWGUIManager::enableActions ( bool  enable = true)
void FWGUIManager::eventChangedCallback ( )

Definition at line 329 of file FWGUIManager.cc.

References getCurrentEvent(), i, CmsShowMainFrame::loadEvent(), m_cmsShowMainFrame, m_detailViewManager, and FWDetailViewManager::newEventCallback().

Referenced by CmsShowMainBase::eventChangedImp().

329  {
330  // To be replaced when we can get index from fwlite::Event
331 
332  TEveViewerList* viewers = gEve->GetViewers();
333  for (TEveElement::List_i i=viewers->BeginChildren(); i!= viewers->EndChildren(); ++i)
334  {
335  TEveViewer* ev = dynamic_cast<TEveViewer*>(*i);
336  if (ev)
337  ev->GetGLViewer()->DeleteOverlayAnnotations();
338  }
339 
342 }
int i
Definition: DBlmapReader.cc:9
void loadEvent(const edm::EventBase &event)
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:249
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
const edm::EventBase * getCurrentEvent() const
void FWGUIManager::eventIdChanged ( )

Definition at line 1331 of file FWGUIManager.cc.

References changedEventId_, FWNumberEntryField::GetUIntNumber(), m_cmsShowMainFrame, CmsShowMainFrame::m_eventEntry, CmsShowMainFrame::m_lumiEntry, and CmsShowMainFrame::m_runEntry.

1332 {
1336 }
FWNumberEntryField * m_lumiEntry
FWNumberEntryField * m_eventEntry
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
virtual UInt_t GetUIntNumber()
FWNumberEntryField * m_runEntry
sigc::signal< void, edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t > changedEventId_
Definition: FWGUIManager.h:211
void FWGUIManager::evePreTerminate ( )

Definition at line 225 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and m_viewMap.

Referenced by CmsShowMain::doExit().

226 {
227  gEve->GetWindowManager()->Disconnect("WindowSelected(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)");
228  gEve->GetWindowManager()->Disconnect("WindowDocked(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)");
229  gEve->GetWindowManager()->Disconnect("WindowUndocked(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)");
230 
231  // avoid emit signals at end
232  gEve->GetSelection()->Disconnect();
233  gEve->GetHighlight()->Disconnect();
234  gEve->GetSelection()->RemoveElements();
235  gEve->GetHighlight()->RemoveElements();
236 
237  m_cmsShowMainFrame->UnmapWindow();
238  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
239  {
240  TEveCompositeFrameInMainFrame* mainFrame = dynamic_cast<TEveCompositeFrameInMainFrame*>((*wIt).first->GetEveFrame());
241  // main frames not to watch dying
242  if (mainFrame) mainFrame->UnmapWindow();
243  // destroy
244  (*wIt).second->destroy();
245  }
246 }
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::exportAllViews ( const std::string &  format)

Definition at line 877 of file FWGUIManager.cc.

References mergeVDriftHistosByStation::file, getCurrentEvent(), i, j, prof2calltree::l, m_viewMap, and mergeVDriftHistosByStation::name.

Referenced by exportImagesOfAllViews().

878 {
879  // Save all GL views.
880  // Expects format to have "%d %d %d %s" which are replaced with
881  // run-number, event number, lumi block and view-name.
882  // Blanks in view-name are removed.
883  // If several views shave the same name, they are post-fixed
884  // with "_%d". They are sorted by view diagonal.
885 
886  typedef std::list<TEveViewer*> viewer_list_t;
887  typedef viewer_list_t::iterator viewer_list_i;
888 
889  typedef std::map<TString, viewer_list_t> name_map_t;
890  typedef name_map_t::iterator name_map_i;
891 
892  name_map_t vls;
893 
894  for (ViewMap_i i = m_viewMap.begin(); i != m_viewMap.end(); ++i)
895  {
896  TEveViewer *ev = dynamic_cast<TEveViewer*>(i->first);
897  if (ev)
898  {
899  TString name(ev->GetElementName());
900  name.ReplaceAll(" ", "");
901  viewer_list_t &l = vls[name];
902  viewer_list_i li = l.begin();
903  while (li != l.end() && (*li)->GetGLViewer()->ViewportDiagonal() < ev->GetGLViewer()->ViewportDiagonal())
904  ++li;
905  l.insert(li, ev);
906  }
907  }
908 
909  const edm::EventBase *event = getCurrentEvent();
910  for (name_map_i i = vls.begin(); i != vls.end(); ++i)
911  {
912  bool multi_p = (i->second.size() > 1);
913  int view_count = 1;
914  for (viewer_list_i j = i->second.begin(); j != i->second.end(); ++j, ++view_count)
915  {
916  TString view_name(i->first);
917  if (multi_p)
918  {
919  view_name += "_";
920  view_name += view_count;
921  }
922  TString file;
923  file.Form(format.c_str(), event->id().run(), event->id().event(),
924  event->luminosityBlock(), view_name.Data());
925  (*j)->GetGLViewer()->SavePicture(file);
926  }
927  }
928 }
int i
Definition: DBlmapReader.cc:9
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
int j
Definition: DBlmapReader.cc:9
const edm::EventBase * getCurrentEvent() const
void FWGUIManager::exportImageOfMainView ( )

Definition at line 835 of file FWGUIManager.cc.

References m_cmsShowMainFrame, m_viewMap, and m_viewPrimPack.

Referenced by FWGUIManager().

836 {
837  TGFrameElementPack* frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(1);
838  TEveCompositeFrame* ef = dynamic_cast<TEveCompositeFrame*>(frameEL->fFrame);
839  m_viewMap[ef->GetEveWindow()]->promptForSaveImageTo(m_cmsShowMainFrame);
840 }
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::exportImagesOfAllViews ( )

Definition at line 843 of file FWGUIManager.cc.

References gather_cfg::cout, dir, exportAllViews(), m_cmsShowMainFrame, and mergeVDriftHistosByStation::name.

Referenced by FWGUIManager().

844 {
845  try {
846  static TString dir(".");
847  const char * kImageExportTypes[] = {"PNG", "*.png",
848  "GIF", "*.gif",
849  "JPEG", "*.jpg",
850  "PDF", "*.pdf",
851  "Encapsulated PostScript", "*.eps",
852  0, 0};
853 
854  TGFileInfo fi;
855  fi.fFileTypes = kImageExportTypes;
856  fi.fIniDir = StrDup(dir);
857  new TGFileDialog(gClient->GetDefaultRoot(), m_cmsShowMainFrame,
858  kFDSave,&fi);
859  dir = fi.fIniDir;
860  if (fi.fFilename != 0) {
861  std::string name = fi.fFilename;
862  // fi.fFileTypeIdx points to the name of the file type
863  // selected in the drop-down menu, so fi.fFileTypeIdx gives us
864  // the extension
865  std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
866  if (name.find(ext) == name.npos)
867  name += ext;
868  // now add format trailing before the extension
869  name.insert(name.rfind('.'), "-%d_%d_%d_%s");
870  exportAllViews(name);
871  }
872  }
873  catch (std::runtime_error &e) { std::cout << e.what() << std::endl; }
874 }
void exportAllViews(const std::string &format)
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
tuple cout
Definition: gather_cfg.py:41
dbl *** dir
Definition: mlp_gen.cc:35
void FWGUIManager::filterButtonClicked ( )

Definition at line 1356 of file FWGUIManager.cc.

References filterButtonClicked_.

1357 {
1358  filterButtonClicked_.emit();
1359 }
sigc::signal< void > filterButtonClicked_
Definition: FWGUIManager.h:207
void FWGUIManager::finishUpColorChange ( )
private

Definition at line 1339 of file FWGUIManager.cc.

References CmsShowCommonPopup::colorSetChanged(), CmsShowModelPopup::colorSetChanged(), CmsShowEDI::colorSetChanged(), m_commonPopup, m_ediFrame, and m_modelPopup.

Referenced by FWGUIManager().

1340 {
1344 
1345  gEve->FullRedraw3D();
1346 }
void colorSetChanged()
Definition: CmsShowEDI.cc:461
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:260
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:262
CSGAction * FWGUIManager::getAction ( const std::string  name)

Definition at line 345 of file FWGUIManager.cc.

References CSGActionSupervisor::getAction(), and m_cmsShowMainFrame.

Referenced by createHelpGLPopup(), createShortcutPopup(), FWGUIManager(), and CmsShowMain::setupDataHandling().

346 {
348 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
CSGAction * getAction(const std::string &name)
const edm::EventBase * FWGUIManager::getCurrentEvent ( ) const

Definition at line 769 of file FWGUIManager.cc.

References FWNavigatorBase::getCurrentEvent(), and m_navigator.

Referenced by FWTriggerTableView::dataChanged(), eventChangedCallback(), exportAllViews(), FWHLTValidator::fillOptions(), and FWEventAnnotation::updateOverlayText().

770 {
771  return m_navigator->getCurrentEvent();
772 }
FWNavigatorBase * m_navigator
Definition: FWGUIManager.h:252
virtual const edm::EventBase * getCurrentEvent() const =0
FWGUIManager * FWGUIManager::getGUIManager ( )
static
CmsShowMainFrame* FWGUIManager::getMainFrame ( ) const
inline
TEveWindow * FWGUIManager::getSwapCandidate ( )
private

Definition at line 432 of file FWGUIManager.cc.

References i, m_viewPrimPack, m_viewSecPack, and createTree::pp.

Referenced by checkSubviewAreaIconState(), and subviewSwapped().

433 {
434  TEveWindow* swapCandidate =0;
435 
436  if ( gEve->GetWindowManager()->GetCurrentWindow())
437  {
438  swapCandidate = gEve->GetWindowManager()->GetCurrentWindow();
439  }
440  else
441  {
442  // swap with first docked view
443  TEveCompositeFrame* pef;
444  TGFrameElementPack *pel;
445 
446  // check if there is view in prim pack
447  TGPack* pp = m_viewPrimPack->GetPack();
448  if ( pp->GetList()->GetSize() > 2)
449  {
450  pel = (TGFrameElementPack*) pp->GetList()->At(1);
451  if (pel->fState) // is first undocked
452  {
453  pef = dynamic_cast<TEveCompositeFrame*>(pel->fFrame);
454  if ( pef && pef->GetEveWindow())
455  swapCandidate = pef->GetEveWindow();
456  }
457  }
458  if (swapCandidate == 0)
459  {
460  // no eve window found in primary check secondary
461  TGPack* sp = m_viewSecPack->GetPack();
462  Int_t nf = sp->GetList()->GetSize();
463  TIter frame_iterator(sp->GetList());
464  for (Int_t i=0; i<nf; ++i) {
465  pel = (TGFrameElementPack*)frame_iterator();
466  pef = dynamic_cast<TEveCompositeFrame*>(pel->fFrame);
467  if ( pef && pef->GetEveWindow())
468  {
469  swapCandidate = pef->GetEveWindow() ;
470  break;
471  }
472  }
473  }
474  }
475 
476  return swapCandidate;
477 }
int i
Definition: DBlmapReader.cc:9
tuple pp
Definition: createTree.py:15
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:275
CSGContinuousAction * FWGUIManager::loopAction ( )

Definition at line 363 of file FWGUIManager.cc.

References CmsShowMainFrame::loopAction(), and m_cmsShowMainFrame.

364 {
365  return m_cmsShowMainFrame->loopAction();
366 }
CSGContinuousAction * loopAction() const
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::lumiIdChanged ( )

Definition at line 1325 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::m_eventEntry.

1326 {
1327  m_cmsShowMainFrame->m_eventEntry->SetText("", kFALSE);
1328  m_cmsShowMainFrame->m_eventEntry->SetFocus();
1329 }
FWNumberEntryField * m_eventEntry
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
TGFrame * FWGUIManager::makeGUIsubview ( TEveCompositeFrame *  cp,
TGCompositeFrame *  parent,
Int_t  height 
)
static

Definition at line 253 of file FWGUIManager.cc.

Referenced by FWGUIManager().

254 {
255  TGFrame* frame = new FWGUISubviewArea(cp, parent, height);
256  return frame;
257 }
list parent
Definition: dbtoconf.py:74
void FWGUIManager::measureWMOffsets ( )
private

Definition at line 1383 of file FWGUIManager.cc.

References asciidump::attr, fwLog, fwlog::kDebug, m_WMDecorH, m_WMOffsetX, m_WMOffsetY, x, and detailsBasic3DVector::y.

Referenced by FWGUIManager().

1384 {
1385  const Int_t x = 100, y = 100;
1386 
1387  TGMainFrame *mf1 = new TGMainFrame(0, 0, 0);
1388  mf1->MapWindow();
1389  mf1->Move(x, y);
1390 
1391  // This seems to be the only reliable way to make sure Move() has been processed.
1392  {
1393  TGMainFrame *mf2 = new TGMainFrame(0, 0, 0);
1394  mf2->MapWindow();
1395  while (!mf2->IsMapped()) gClient->HandleInput();
1396  delete mf2;
1397  }
1398  {
1399  Int_t xm, ym;
1400  Window_t childdum;
1401  WindowAttributes_t attr;
1402  gVirtualX->TranslateCoordinates(mf1->GetId(), gClient->GetDefaultRoot()->GetId(),
1403  0, 0, xm, ym, childdum);
1404  gVirtualX->GetWindowAttributes(mf1->GetId(), attr);
1405  m_WMOffsetX = x - xm;
1406  m_WMOffsetY = y - ym;
1407  m_WMDecorH = attr.fY;
1408  fwLog(fwlog::kDebug) << Form("FWGUIManager::measureWMOffsets: required (%d,%d), measured(%d, %d) => dx=%d, dy=%d; decor_h=%d.\n",
1409  x, y, xm, ym, m_WMOffsetX, m_WMOffsetY, m_WMDecorH);
1410  }
1411  delete mf1;
1412 }
tuple attr
Definition: asciidump.py:432
#define fwLog(_level_)
Definition: fwLog.h:51
Definition: DDAxes.h:10
void FWGUIManager::newItem ( const FWEventItem iItem)
private

Definition at line 405 of file FWGUIManager.cc.

References FWEventItem::id(), and FWEventItem::name().

Referenced by FWGUIManager().

406 {
407 #if defined(THIS_WILL_NEVER_BE_DEFINED)
408  m_selectionItemsComboBox->AddEntry(iItem->name().c_str(),iItem->id());
409  if(iItem->id()==0) {
410  m_selectionItemsComboBox->Select(0);
411  }
412 #endif
413 }
const std::string & name() const
Definition: FWEventItem.cc:500
unsigned int id() const
Definition: FWEventItem.cc:494
void FWGUIManager::newViewSlot ( const std::string &  iName)

Definition at line 268 of file FWGUIManager.cc.

References createView().

Referenced by FWGUIManager().

269 {
270  // this function have to exist, becuse CSGAction binds to void functions
271  createView(iName);
272 }
ViewMap_i createView(const std::string &iName, TEveWindowSlot *slot=0)
void FWGUIManager::openEveBrowserForDebugging ( ) const

Definition at line 1297 of file FWGUIManager.cc.

1298 {
1299  gEve->GetBrowser()->MapWindow();
1300 }
const FWGUIManager& FWGUIManager::operator= ( const FWGUIManager )
private
CSGContinuousAction * FWGUIManager::playEventsAction ( )

Definition at line 351 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::playEventsAction().

Referenced by CmsShowMain::checkLiveMode(), FWFFService::checkPosition(), FWFFLooper::checkPosition(), and CmsShowMain::checkPosition().

352 {
354 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
CSGContinuousAction * playEventsAction() const
CSGContinuousAction * FWGUIManager::playEventsBackwardsAction ( )

Definition at line 357 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::playEventsBackwardsAction().

358 {
360 }
CSGContinuousAction * playEventsBackwardsAction() const
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::popupViewClosed ( )

Definition at line 670 of file FWGUIManager.cc.

References CmsShowViewPopup::getEveWindow(), FWGUISubviewArea::getToolBarFromWindow(), m_viewPopup, and FWGUISubviewArea::setInfoButton().

Referenced by setViewPopup().

671 {
672  if (m_viewPopup->getEveWindow())
673  {
675  sa->setInfoButton(kFALSE);
676  }
677 }
void setInfoButton(bool downp)
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
TEveWindow * getEveWindow() const
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void FWGUIManager::processGUIEvents ( )

Definition at line 399 of file FWGUIManager.cc.

400 {
401  gSystem->ProcessEvents();
402 }
bool FWGUIManager::promptForConfigurationFile ( std::string &  result,
enum EFileDialogMode  mode 
)
private

Helper method for a load / save configuration dialog.

result where the picked file is stored.

mode the mode for the dialog (i.e. Load / Save).

Returns
true if a file was successfully picked, false otherwise.

Definition at line 783 of file FWGUIManager.cc.

References dir, m_cmsShowMainFrame, mode, and mergeVDriftHistosByStation::name.

Referenced by promptForLoadConfigurationFile(), and promptForSaveConfigurationFile().

784 {
785  static const 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 }
tuple result
Definition: query.py:137
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
int mode
Definition: AMPTWrapper.h:139
dbl *** dir
Definition: mlp_gen.cc:35
void FWGUIManager::promptForLoadConfigurationFile ( )
private

Emits the signal which request to load the configuration file picked up in a dialog.

Definition at line 812 of file FWGUIManager.cc.

References loadFromConfigurationFile_, mergeVDriftHistosByStation::name, and promptForConfigurationFile().

Referenced by FWGUIManager().

813 {
814  std::string name;
815  if (!promptForConfigurationFile(name, kFDOpen))
816  return;
817 
818 
820 }
bool promptForConfigurationFile(std::string &result, enum EFileDialogMode mode)
sigc::signal< void, const std::string & > loadFromConfigurationFile_
Definition: FWGUIManager.h:210
void FWGUIManager::promptForSaveConfigurationFile ( )
private

Emits the signal which requests to save the current configuration in the file picked up in the dialog.

Definition at line 826 of file FWGUIManager.cc.

References mergeVDriftHistosByStation::name, promptForConfigurationFile(), and writeToConfigurationFile_.

Referenced by FWGUIManager().

827 {
828  std::string name;
829  if (!promptForConfigurationFile(name, kFDSave))
830  return;
832 }
bool promptForConfigurationFile(std::string &result, enum EFileDialogMode mode)
sigc::signal< void, const std::string & > writeToConfigurationFile_
Definition: FWGUIManager.h:209
void FWGUIManager::registerViewBuilder ( const std::string &  iName,
ViewBuildFunctor iBuilder 
)
void FWGUIManager::resetWMOffsets ( )

Definition at line 1415 of file FWGUIManager.cc.

References m_WMDecorH, m_WMOffsetX, and m_WMOffsetY.

Referenced by CmsShowMain::CmsShowMain().

1416 {
1418 }
void FWGUIManager::runIdChanged ( )

Definition at line 1319 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::m_lumiEntry.

1320 {
1321  m_cmsShowMainFrame->m_lumiEntry->SetText("", kFALSE);
1322  m_cmsShowMainFrame->m_lumiEntry->SetFocus();
1323 }
FWNumberEntryField * m_lumiEntry
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::setDelayBetweenEvents ( Float_t  val)

Definition at line 1314 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::setPlayDelayGUI().

1315 {
1316  m_cmsShowMainFrame->setPlayDelayGUI(val, kTRUE);
1317 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void setPlayDelayGUI(Float_t val, Bool_t sliderChanged)
void FWGUIManager::setFilterButtonIcon ( int  state)

Definition at line 1368 of file FWGUIManager.cc.

References i, m_cmsShowMainFrame, CmsShowMainFrame::m_filterEnableBtn, CmsShowMainFrame::m_filterIcons, and FWCustomIconsButton::setIcons().

Referenced by CmsShowMain::navigatorChangedFilterState(), and CmsShowMain::setupDataHandling().

1369 {
1370  int i = state*3;
1374 }
int i
Definition: DBlmapReader.cc:9
FWCustomIconsButton * m_filterEnableBtn
const TGPicture * m_filterIcons[9]
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void setIcons(const TGPicture *iUpIcon, const TGPicture *iDownIcon, const TGPicture *iDisabledIcon, const TGPicture *ibelowMouseIcon=0)
char state
Definition: procUtils.cc:75
void FWGUIManager::setFilterButtonText ( const char *  txt)
void FWGUIManager::setFrom ( const FWConfiguration iFrom)
virtual

Implements FWConfigurable.

Definition at line 1171 of file FWGUIManager.cc.

References CmsShowMainFrame::bindCSGActionKeys(), FWViewType::checkNameWithViewVersion(), checkSubviewAreaIconState(), createView(), fwLog, kCollectionController(), kCommonController(), kControllers(), FWConfiguration::keyValues(), FWViewType::kGeometryTable, kMainWindow(), kObjectController(), kUndocked(), kViewArea(), kViewController(), kViews(), fwlog::kWarning, m_cmsShowMainFrame, m_commonPopup, m_ediFrame, m_modelPopup, m_viewMap, m_viewPopup, m_viewPrimPack, m_viewSecPack, mergeVDriftHistosByStation::name, FWGeometryTableView::populate3DViewsFromConfig(), CmsShowMainFrame::setSummaryViewWeight(), setViewPopup(), setWindowInfoFrom(), showCommonPopup(), showEDIFrame(), showModelPopup(), subviewDestroyAll(), FWConfiguration::value(), FWConfiguration::valueForKey(), FWConfiguration::version(), and CommonMethods::weight().

1171  {
1172  // main window
1174 
1175  const FWConfiguration* mw = iFrom.valueForKey(kMainWindow);
1176  assert(mw != 0);
1177  // Window needs to mapped before moving, otherwise move can lead
1178  // to wrong results on some window managers.
1179  m_cmsShowMainFrame->MapWindow();
1181  m_cmsShowMainFrame->MapSubwindows();
1182  m_cmsShowMainFrame->Layout();
1183  m_cmsShowMainFrame->MapRaised();
1184 
1185  // set from view reading area info nd view info
1186  float_t leftWeight =1;
1187  float_t rightWeight=1;
1188  if ( mw->version() >= 2 ) {
1189  leftWeight = atof(mw->valueForKey("leftWeight")->value().c_str());
1190  rightWeight = atof(mw->valueForKey("rightWeight")->value().c_str());
1191  }
1192 
1193  if ( mw->version() >= 3 ) {
1194  float summaryWeight = atof(mw->valueForKey("summaryWeight")->value().c_str());
1195  m_cmsShowMainFrame->setSummaryViewWeight(summaryWeight);
1196  }
1197 
1198  TEveWindowSlot* primSlot = (leftWeight > 0) ? m_viewPrimPack->NewSlotWithWeight(leftWeight) : 0;
1199  m_viewSecPack = m_viewPrimPack->NewSlotWithWeight(rightWeight)->MakePack();
1200  m_viewSecPack->SetVertical();
1201  m_viewSecPack->SetShowTitleBar(kFALSE);
1202 
1203  // views list
1204  const FWConfiguration* views = iFrom.valueForKey(kViews); assert(0!=views);
1205  const FWConfiguration::KeyValues* keyVals = views->keyValues();
1206  const FWConfiguration* viewArea = iFrom.valueForKey(kViewArea);
1207 
1208  // area list (ignored in older version)
1209  if ( viewArea->version() > 1)
1210  {
1211  const FWConfiguration::KeyValues* akv = viewArea->keyValues();
1212  FWConfiguration::KeyValuesIt areaIt = akv->begin();
1213 
1214  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it)
1215  {
1216  float weight = atof((areaIt->second).valueForKey("weight")->value().c_str());
1217  TEveWindowSlot* slot = ( m_viewMap.size() || (primSlot == 0) ) ? m_viewSecPack->NewSlotWithWeight(weight) : primSlot;
1218  std::string name = FWViewType::checkNameWithViewVersion(it->first, it->second.version());
1219  ViewMap_i lastViewIt = createView(name, slot);
1220  lastViewIt->second->setFrom(it->second);
1221 
1222  bool undocked = atof((areaIt->second).valueForKey("undocked")->value().c_str());
1223  if (undocked)
1224  {
1225  TEveWindow* lastWindow = lastViewIt->first;
1226  lastWindow->UndockWindow();
1227  TEveCompositeFrameInMainFrame* emf = dynamic_cast<TEveCompositeFrameInMainFrame*>(lastWindow->GetEveFrame());
1228  const TGMainFrame* mf = dynamic_cast<const TGMainFrame*>(emf->GetParent());
1230  TGMainFrame* mfp = (TGMainFrame*)mf;
1231  const FWConfiguration* mwc = (areaIt->second).valueForKey("UndockedWindowPos");
1232  setWindowInfoFrom(*mwc, mfp);
1233  }
1234  areaIt++;
1235  }
1236  }
1237  else
1238  { // create views with same weight in old version
1239  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) {
1240  std::string name = FWViewType::checkNameWithViewVersion(it->first, it->second.version());
1241  createView(name, m_viewMap.size() ? m_viewSecPack->NewSlot() : primSlot);
1242 
1243  ViewMap_i lastViewIt = m_viewMap.end(); lastViewIt--;
1244  lastViewIt->second->setFrom(it->second);
1245  }
1246  // handle undocked windows in old version
1247  const FWConfiguration* undocked = iFrom.valueForKey(kUndocked);
1248  if(0!=undocked) {
1249  fwLog(fwlog::kWarning) << "Restrore of undocked windows with old window management not supported." << std::endl;
1250  }
1251  }
1252 
1253  //handle controllers
1254  const FWConfiguration* controllers = iFrom.valueForKey(kControllers);
1255  if(0!=controllers) {
1256  const FWConfiguration::KeyValues* keyVals = controllers->keyValues();
1257  if(0!=keyVals) {
1258  //we have open controllers
1259  for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it != keyVals->end(); ++it)
1260  {
1261  const std::string& controllerName = it->first;
1262  // std::cout <<"found controller "<<controllerName<<std::endl;
1263  if(controllerName == kCollectionController) {
1264  showEDIFrame();
1265  setWindowInfoFrom(it->second,m_ediFrame);
1266  } else if (controllerName == kViewController) {
1267  setViewPopup(0);
1268  setWindowInfoFrom(it->second, m_viewPopup);
1269  } else if (controllerName == kObjectController) {
1270  showModelPopup();
1271  setWindowInfoFrom(it->second, m_modelPopup);
1272  } else if (controllerName == kCommonController) {
1273  showCommonPopup();
1274  setWindowInfoFrom(it->second, m_commonPopup);
1275  }
1276  }
1277  }
1278  }
1279 
1280 
1281  for(ViewMap_i it = m_viewMap.begin(); it != m_viewMap.end(); ++it)
1282  {
1283  if (it->second->typeId() == FWViewType::kGeometryTable)
1284  {
1285  FWGeometryTableView* gv = ( FWGeometryTableView*)it->second;
1287  }
1288  }
1289 
1290  // disable first docked view
1292 
1293 
1294 }
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
void bindCSGActionKeys(const TGMainFrame *f) const
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
void showModelPopup()
const KeyValues * keyValues() const
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
void subviewDestroyAll()
void setViewPopup(TEveWindow *)
static const std::string kViewController("view")
unsigned int version() const
static const std::string kViews("views")
static const std::string kObjectController("object")
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
static const std::string kCommonController("common")
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:275
void setWindowInfoFrom(const FWConfiguration &iFrom, TGMainFrame *iFrame)
void checkSubviewAreaIconState(TEveWindow *)
static const std::string kCollectionController("collection")
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
static const std::string kMainWindow("main window")
static const std::string kUndocked("undocked views")
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:260
static const std::string kViewArea("view area")
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:262
static const std::string & checkNameWithViewVersion(const std::string &name, unsigned int viewVersion)
Definition: FWViewType.cc:102
const std::string & value(unsigned int iIndex=0) const
ViewMap_i createView(const std::string &iName, TEveWindowSlot *slot=0)
#define fwLog(_level_)
Definition: fwLog.h:51
KeyValues::const_iterator KeyValuesIt
void setSummaryViewWeight(float)
const FWConfiguration * valueForKey(const std::string &iKey) const
void showCommonPopup()
static const std::string kControllers("controllers")
void FWGUIManager::setPlayMode ( bool  play)

Definition at line 381 of file FWGUIManager.cc.

References m_cmsShowMainFrame, CmsShowMainFrame::m_eventEntry, and CmsShowMainFrame::m_runEntry.

382 {
383  m_cmsShowMainFrame->m_runEntry->SetEnabled(!play);
384  m_cmsShowMainFrame->m_eventEntry->SetEnabled(!play);
385 }
FWNumberEntryField * m_eventEntry
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
FWNumberEntryField * m_runEntry
void FWGUIManager::setViewPopup ( TEveWindow *  ew)
private

Definition at line 686 of file FWGUIManager.cc.

References CmsShowViewPopup::closed_, fireworks::Context::colorManager(), m_context, m_guiManager, m_viewMap, m_viewPopup, popupViewClosed(), CmsShowViewPopup::reset(), and CmsShowViewPopup::UnmapWindow().

Referenced by setFrom(), showViewPopup(), subviewDestroyAll(), subviewInfoSelected(), and subviewIsBeingDestroyed().

686  {
687  FWViewBase* vb = ew ? m_viewMap[ew] : 0;
688  if (m_viewPopup == 0)
689  {
690  m_viewPopup = new CmsShowViewPopup(0, 200, 200, m_context->colorManager(), vb, ew);
692  }
693  else
694  {
696  }
697  m_viewPopup->reset(vb, ew);
698  m_viewPopup->MapRaised();
699 }
void popupViewClosed()
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
sigc::signal< void > closed_
FWColorManager * colorManager() const
Definition: Context.h:66
virtual void UnmapWindow()
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:241
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
void reset(FWViewBase *, TEveWindow *ew)
fireworks::Context * m_context
Definition: FWGUIManager.h:244
void FWGUIManager::setWindowInfoFrom ( const FWConfiguration iFrom,
TGMainFrame *  iFrame 
)

Definition at line 1158 of file FWGUIManager.cc.

References m_WMDecorH, m_WMOffsetX, m_WMOffsetY, FWConfiguration::value(), FWConfiguration::valueForKey(), tablePrinter::width, x, and detailsBasic3DVector::y.

Referenced by setFrom().

1160 {
1161  int x = atoi(iFrom.valueForKey("x")->value().c_str()) + m_WMOffsetX;
1162  int y = atoi(iFrom.valueForKey("y")->value().c_str()) + m_WMOffsetY;
1163  if (y < m_WMDecorH) y = m_WMDecorH;
1164  int width = atoi(iFrom.valueForKey("width")->value().c_str());
1165  int height = atoi(iFrom.valueForKey("height")->value().c_str());
1166  iFrame->MoveResize(x,y,width,height);
1167  iFrame->SetWMPosition(x, y);
1168 }
const std::string & value(unsigned int iIndex=0) const
const FWConfiguration * valueForKey(const std::string &iKey) const
Definition: DDAxes.h:10
void FWGUIManager::showCommonPopup ( )

Definition at line 644 of file FWGUIManager.cc.

References CmsShowMainFrame::bindCSGActionKeys(), fireworks::Context::commonPrefs(), m_cmsShowMainFrame, m_commonPopup, and m_context.

Referenced by FWGUIManager(), and setFrom().

645 {
646  if (! m_commonPopup)
647  {
650  }
651  m_commonPopup->MapRaised();
652 }
void bindCSGActionKeys(const TGMainFrame *f) const
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:262
fireworks::Context * m_context
Definition: FWGUIManager.h:244
CmsShowCommon * commonPrefs() const
Definition: Context.cc:179
void FWGUIManager::showEDIFrame ( int  iInfoToShow = -1)

Allowed values are -1 or ones from FWDataCategories enum.

Definition at line 634 of file FWGUIManager.cc.

References createEDIFrame(), m_ediFrame, and CmsShowEDI::show().

Referenced by FWModelContextMenuHandler::chosenItem(), FWGUIManager(), FWSummaryManager::requestForController(), FWSummaryManager::requestForError(), FWSummaryManager::requestForFilter(), FWSummaryManager::requestForInfo(), and setFrom().

635 {
636  createEDIFrame();
637  if(-1 != iToShow) {
638  m_ediFrame->show(static_cast<FWDataCategories> (iToShow));
639  }
640  m_ediFrame->MapRaised();
641 }
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:259
void createEDIFrame()
void show(FWDataCategories)
Definition: CmsShowEDI.cc:454
void FWGUIManager::showEventFilterGUI ( )

Definition at line 1350 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and showEventFilterGUI_.

Referenced by FWFFLooper::beginRun(), and CmsShowMain::filterButtonClicked().

1351 {
1353 }
sigc::signal< void, const TGWindow * > showEventFilterGUI_
Definition: FWGUIManager.h:208
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::showInvMassDialog ( )

Definition at line 702 of file FWGUIManager.cc.

References CmsShowMainFrame::bindCSGActionKeys(), m_cmsShowMainFrame, m_context, m_invMassDialog, and fireworks::Context::selectionManager().

Referenced by FWGUIManager().

703 {
704  if (! m_invMassDialog)
705  {
708  }
709  m_invMassDialog->MapRaised();
710 }
void bindCSGActionKeys(const TGMainFrame *f) const
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:263
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
FWSelectionManager * selectionManager() const
Definition: Context.h:58
fireworks::Context * m_context
Definition: FWGUIManager.h:244
void FWGUIManager::showModelPopup ( )

Definition at line 663 of file FWGUIManager.cc.

References createModelPopup(), and m_modelPopup.

Referenced by FWModelContextMenuHandler::chosenItem(), FWGUIManager(), and setFrom().

664 {
666  m_modelPopup->MapRaised();
667 }
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:260
void createModelPopup()
void FWGUIManager::showSelectedModelContextMenu ( Int_t  iGlobalX,
Int_t  iGlobalY,
FWViewContextMenuHandlerBase iHandler 
)

Definition at line 751 of file FWGUIManager.cc.

References m_context, m_contextMenuHandler, FWSelectionManager::selected(), fireworks::Context::selectionManager(), and FWModelContextMenuHandler::showSelectedModelContext().

Referenced by createView(), and FWSummaryManager::requestForSelectedModelContextMenu().

752 {
753  if(!m_context->selectionManager()->selected().empty()) {
754  m_contextMenuHandler->showSelectedModelContext(iGlobalX,iGlobalY, iHandler);
755  }
756 }
const std::set< FWModelId > & selected() const
FWSelectionManager * selectionManager() const
Definition: Context.h:58
void showSelectedModelContext(Int_t iX, Int_t iY, FWViewContextMenuHandlerBase *) const
NOTE: iX and iY are in global coordinates.
fireworks::Context * m_context
Definition: FWGUIManager.h:244
FWModelContextMenuHandler * m_contextMenuHandler
Definition: FWGUIManager.h:251
void FWGUIManager::showViewPopup ( )

Definition at line 680 of file FWGUIManager.cc.

References setViewPopup().

Referenced by FWGUIManager().

680  {
681  // CSG action .
682  setViewPopup(0);
683 }
void setViewPopup(TEveWindow *)
void FWGUIManager::subviewDestroy ( FWGUISubviewArea sva)

Definition at line 513 of file FWGUIManager.cc.

References FWViewBase::destroy(), FWGUISubviewArea::getEveWindow(), and m_viewMap.

Referenced by subviewDestroyAll(), and subviewIsBeingDestroyed().

514 {
515  TEveWindow* ew = sva->getEveWindow();
516  FWViewBase* viewBase = m_viewMap[ew];
517  m_viewMap.erase(ew);
518  viewBase->destroy();
519 }
TEveWindow * getEveWindow()
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
void destroy()
Definition: FWViewBase.cc:65
void FWGUIManager::subviewDestroyAll ( )

Definition at line 522 of file FWGUIManager.cc.

References FWGUISubviewArea::getToolBarFromWindow(), i, m_viewMap, m_viewPrimPack, m_viewSecPack, setViewPopup(), and subviewDestroy().

Referenced by setFrom().

523 {
524  std::vector<FWGUISubviewArea*> sd;
525  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
526  {
528  sd.push_back(ar);
529  }
530 
531  for (std::vector<FWGUISubviewArea*>::iterator i= sd.begin(); i !=sd.end(); ++i)
532  {
533  if((*i)->isSelected())
534  setViewPopup(0);
535  subviewDestroy(*i);
536  }
537 
538  gSystem->ProcessEvents();
539  gSystem->Sleep(200);
540 
541 
542 
543  while (m_viewPrimPack->HasChildren())
544  {
545  TEveWindow* w = dynamic_cast<TEveWindow*>(m_viewPrimPack->FirstChild());
546  if (w) w->DestroyWindowAndSlot();
547  }
548 
549  gSystem->Sleep(200);
550  m_viewSecPack = 0;
551  gSystem->ProcessEvents();
552 
553 }
int i
Definition: DBlmapReader.cc:9
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
void setViewPopup(TEveWindow *)
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:274
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:275
void subviewDestroy(FWGUISubviewArea *)
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void FWGUIManager::subviewInfoSelected ( FWGUISubviewArea sva)

Definition at line 556 of file FWGUIManager.cc.

References FWGUISubviewArea::getEveWindow(), FWGUISubviewArea::getToolBarFromWindow(), m_viewMap, FWGUISubviewArea::setInfoButton(), and setViewPopup().

Referenced by connectSubviewAreaSignals().

557 {
558  // release button on previously selected
559  TEveWindow* ew = sva->getEveWindow();
560  for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt)
561  {
562  if (wIt->first != ew)
564  }
565  setViewPopup(sva->getEveWindow());
566 }
TEveWindow * getEveWindow()
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:104
ViewMap_t m_viewMap
Definition: FWGUIManager.h:271
void setViewPopup(TEveWindow *)
void setInfoButton(bool downp)
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void FWGUIManager::subviewInfoUnselected ( FWGUISubviewArea sva)

Definition at line 569 of file FWGUIManager.cc.

References m_viewPopup, and CmsShowViewPopup::UnmapWindow().

Referenced by connectSubviewAreaSignals().

570 {
572 }
virtual void UnmapWindow()
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:261
void FWGUIManager::subviewIsBeingDestroyed ( FWGUISubviewArea sva)

Definition at line 500 of file FWGUIManager.cc.

References f, FWGUISubviewArea::isSelected(), m_tasks, setViewPopup(), and subviewDestroy().

Referenced by connectSubviewAreaSignals().

501 {
502  if(sva->isSelected()) {
503  setViewPopup(0);
504  }
505 
507  f = boost::bind(&FWGUIManager::subviewDestroy, this, sva);
508  m_tasks->addTask(f);
509  m_tasks->startDoingTasks();
510 }
void setViewPopup(TEveWindow *)
std::auto_ptr< CmsShowTaskExecutor > m_tasks
Definition: FWGUIManager.h:279
void subviewDestroy(FWGUISubviewArea *)
double f[11][100]
bool isSelected() const
boost::function0< void > TaskFunctor
void FWGUIManager::subviewSwapped ( FWGUISubviewArea sva)

Definition at line 575 of file FWGUIManager.cc.

References checkSubviewAreaIconState(), FWGUISubviewArea::getEveWindow(), getSwapCandidate(), and swap().

Referenced by connectSubviewAreaSignals().

576 {
577  TEveWindow* curr = getSwapCandidate();
578  TEveWindow* swap = sva->getEveWindow();
579  if (curr) swap->SwapWindow(curr);
580 
582 }
TEveWindow * getEveWindow()
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:74
void checkSubviewAreaIconState(TEveWindow *)
TEveWindow * getSwapCandidate()
void FWGUIManager::titleChanged ( const char *  title)

Definition at line 321 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and indexGen::title.

Referenced by CmsShowMain::appendData(), CmsShowMain::eventChangedImp(), and CmsShowMain::fileChangedSlot().

322 {
323  char title[128];
324  snprintf(title,127,"cmsShow: %s", subtitle);
325  m_cmsShowMainFrame->SetWindowName(title);
326 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::updateEventFilterEnable ( bool  btnEnabled)

Definition at line 1377 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::m_filterEnableBtn.

Referenced by CmsShowMain::setupDataHandling().

1378 {
1379  m_cmsShowMainFrame->m_filterEnableBtn->SetEnabled(btnEnabled);
1380 }
FWCustomIconsButton * m_filterEnableBtn
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:253
void FWGUIManager::updateStatus ( const char *  status)

Member Data Documentation

sigc::signal<void, Float_t> FWGUIManager::changedDelayBetweenEvents_

Definition at line 217 of file FWGUIManager.h.

Referenced by delaySliderChanged().

sigc::signal<void> FWGUIManager::changedEventEntry_

Definition at line 216 of file FWGUIManager.h.

sigc::signal<void, edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t> FWGUIManager::changedEventId_

Definition at line 211 of file FWGUIManager.h.

Referenced by eventIdChanged().

sigc::signal<void> FWGUIManager::changedRunEntry_

Definition at line 215 of file FWGUIManager.h.

sigc::signal<void> FWGUIManager::filterButtonClicked_
sigc::signal<void> FWGUIManager::goingToQuit_

Definition at line 212 of file FWGUIManager.h.

sigc::signal<void, const std::string&> FWGUIManager::loadFromConfigurationFile_

Definition at line 210 of file FWGUIManager.h.

Referenced by promptForLoadConfigurationFile().

CmsShowMainFrame* FWGUIManager::m_cmsShowMainFrame
private
CmsShowCommonPopup* FWGUIManager::m_commonPopup
private

Definition at line 262 of file FWGUIManager.h.

Referenced by addTo(), finishUpColorChange(), setFrom(), and showCommonPopup().

fireworks::Context* FWGUIManager::m_context
private
FWModelContextMenuHandler* FWGUIManager::m_contextMenuHandler
private

Definition at line 251 of file FWGUIManager.h.

Referenced by FWGUIManager(), showSelectedModelContextMenu(), and ~FWGUIManager().

FWGUIEventDataAdder* FWGUIManager::m_dataAdder
private

Definition at line 256 of file FWGUIManager.h.

Referenced by addData().

FWDetailViewManager* FWGUIManager::m_detailViewManager
private
CmsShowEDI* FWGUIManager::m_ediFrame
private
TGPopupMenu* FWGUIManager::m_fileMenu
private

Definition at line 255 of file FWGUIManager.h.

FWGUIManager * FWGUIManager::m_guiManager = 0
staticprivate

Definition at line 241 of file FWGUIManager.h.

Referenced by createView(), FWGUIManager(), getGUIManager(), and setViewPopup().

CmsShowHelpPopup* FWGUIManager::m_helpGLPopup
private

Definition at line 268 of file FWGUIManager.h.

Referenced by createHelpGLPopup().

CmsShowHelpPopup* FWGUIManager::m_helpPopup
private

Definition at line 266 of file FWGUIManager.h.

Referenced by createHelpPopup().

FWInvMassDialog* FWGUIManager::m_invMassDialog
private

Definition at line 263 of file FWGUIManager.h.

Referenced by showInvMassDialog(), and ~FWGUIManager().

sigc::connection FWGUIManager::m_modelChangeConn
private

Definition at line 277 of file FWGUIManager.h.

CmsShowModelPopup* FWGUIManager::m_modelPopup
private

Definition at line 260 of file FWGUIManager.h.

Referenced by addTo(), createModelPopup(), finishUpColorChange(), setFrom(), and showModelPopup().

NameToViewBuilder FWGUIManager::m_nameToViewBuilder
private

Definition at line 272 of file FWGUIManager.h.

Referenced by createView(), and registerViewBuilder().

FWNavigatorBase* FWGUIManager::m_navigator
private

Definition at line 252 of file FWGUIManager.h.

Referenced by getCurrentEvent().

CmsShowHelpPopup* FWGUIManager::m_shortcutPopup
private

Definition at line 267 of file FWGUIManager.h.

Referenced by createShortcutPopup().

FWSummaryManager* FWGUIManager::m_summaryManager
private

Definition at line 246 of file FWGUIManager.h.

Referenced by createList(), and ~FWGUIManager().

std::auto_ptr<CmsShowTaskExecutor> FWGUIManager::m_tasks
private

Definition at line 279 of file FWGUIManager.h.

Referenced by subviewIsBeingDestroyed().

const FWViewManagerManager* FWGUIManager::m_viewManagerManager
private

Definition at line 250 of file FWGUIManager.h.

ViewMap_t FWGUIManager::m_viewMap
mutableprivate
CmsShowViewPopup* FWGUIManager::m_viewPopup
private
TEveWindowPack* FWGUIManager::m_viewPrimPack
private
TEveWindowPack* FWGUIManager::m_viewSecPack
private
int FWGUIManager::m_WMDecorH
private

Definition at line 281 of file FWGUIManager.h.

Referenced by measureWMOffsets(), resetWMOffsets(), and setWindowInfoFrom().

int FWGUIManager::m_WMOffsetX
private

Definition at line 281 of file FWGUIManager.h.

Referenced by measureWMOffsets(), resetWMOffsets(), and setWindowInfoFrom().

int FWGUIManager::m_WMOffsetY
private

Definition at line 281 of file FWGUIManager.h.

Referenced by measureWMOffsets(), resetWMOffsets(), and setWindowInfoFrom().

sigc::signal<void, const TGWindow*> FWGUIManager::showEventFilterGUI_
sigc::signal<void, const std::string&> FWGUIManager::writeToConfigurationFile_

Definition at line 209 of file FWGUIManager.h.

Referenced by promptForSaveConfigurationFile().

sigc::signal<void> FWGUIManager::writeToPresentConfigurationFile_

Definition at line 213 of file FWGUIManager.h.

Referenced by FWGUIManager().