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, int height)
 
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 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 95 of file FWGUIManager.h.

Member Typedef Documentation

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

Definition at line 100 of file FWGUIManager.h.

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

Definition at line 99 of file FWGUIManager.h.

typedef ViewMap_t::iterator FWGUIManager::ViewMap_i
private

Definition at line 103 of file FWGUIManager.h.

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

Definition at line 102 of file FWGUIManager.h.

Constructor & Destructor Documentation

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

Definition at line 97 of file FWGUIManager.cc.

References alignCSCRings::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_, create_public_lumi_plots::width, and writeToPresentConfigurationFile_.

99  :
100  m_context(ctx),
101  m_summaryManager(0),
103  m_viewManagerManager(iVMMgr),
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),
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 }
const std::string sKeyboardShort
Definition: ActionsList.cc:40
FWNumberEntryField * m_lumiEntry
sigc::signal< void > writeToPresentConfigurationFile_
Definition: FWGUIManager.h:211
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:61
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:244
void createHelpPopup()
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:261
const std::string sBackgroundColor
Definition: ActionsList.cc:25
FWColorManager * colorManager() const
Definition: Context.h:65
sigc::signal< void > activated
Definition: CSGAction.h:88
void newViewSlot(const std::string &iName)
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:239
FWCustomIconsButton * m_filterEnableBtn
void delaySliderChanged(Int_t)
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:247
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:277
void createShortcutPopup()
const std::string sSaveConfig
Definition: ActionsList.cc:17
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
sigc::signal< void > colorsHaveChangedFinished_
static TGFrame * makeGUIsubview(TEveCompositeFrame *cp, TGCompositeFrame *parent, Int_t height)
FWNavigatorBase * m_navigator
Definition: FWGUIManager.h:250
CSGAction * createNewViewerAction(const std::string &iActionName, bool seaprator)
void exportImagesOfAllViews()
FWNumberEntryField * m_eventEntry
void showInvMassDialog()
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
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:254
void exportImageOfMainView()
const std::string sExportImage
Definition: ActionsList.cc:19
FWSelectionManager * selectionManager() const
Definition: Context.h:57
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:258
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:260
CmsShowHelpPopup * m_helpGLPopup
Definition: FWGUIManager.h:266
const std::string sShowMainViewCtl
Definition: ActionsList.cc:35
const FWViewManagerManager * m_viewManagerManager
Definition: FWGUIManager.h:248
FWNumberEntryField * m_runEntry
const std::string sShowObjInsp
Definition: ActionsList.cc:33
CSGAction * getAction(const std::string name)
fireworks::Context * m_context
Definition: FWGUIManager.h:242
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:249
void measureWMOffsets()
void showCommonPopup()
void showViewPopup()
void createHelpGLPopup()
CmsShowHelpPopup * m_helpPopup
Definition: FWGUIManager.h:264
CmsShowHelpPopup * m_shortcutPopup
Definition: FWGUIManager.h:265
FWGUIManager::~FWGUIManager ( )
virtual

Definition at line 214 of file FWGUIManager.cc.

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

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 }
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:244
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:261
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:247
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
FWModelContextMenuHandler * m_contextMenuHandler
Definition: FWGUIManager.h:249
FWGUIManager::FWGUIManager ( const FWGUIManager )
private

Member Function Documentation

void FWGUIManager::addData ( )

Definition at line 412 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

413 {
414  if (0==m_dataAdder) {
415  m_dataAdder = new FWGUIEventDataAdder(100,100,
419  }
420  m_dataAdder->show();
421 }
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
FWGUIEventDataAdder * m_dataAdder
Definition: FWGUIManager.h:254
fireworks::Context * m_context
Definition: FWGUIManager.h:242
FWJobMetadataManager * metadataManager() const
Definition: Context.h:69
void FWGUIManager::addTo ( FWConfiguration oTo) const
virtual

Implements FWConfigurable.

Definition at line 1059 of file FWGUIManager.cc.

References addAreaInfoTo(), FWConfiguration::addKeyValue(), FWConfigurableParameterizable::addTo(), addWindowInfoTo(), CmsShowMainFrame::getSummaryViewWeight(), 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, contentValuesCheck::ss, groupFilesInBlocks::temp, FWViewBase::typeName(), and FWConfigurableParameterizable::version().

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);
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 }
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
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:120
static const std::string kViews("views")
static const std::string kObjectController("object")
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:272
static const std::string kCommonController("common")
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:273
static const std::string kCollectionController("collection")
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
static const std::string kMainWindow("main window")
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:258
static const std::string kViewArea("view area")
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:260
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 474 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().

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 }
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
void setInfoButton(bool downp)
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
TEveWindow * getSwapCandidate()
TEveWindow * getEveWindow() const
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void FWGUIManager::clearStatus ( )
void FWGUIManager::connectSubviewAreaSignals ( FWGUISubviewArea a)

Definition at line 203 of file FWGUIManager.cc.

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

Referenced by FWGUISubviewArea::FWGUISubviewArea().

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 }
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 618 of file FWGUIManager.cc.

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

Referenced by showEDIFrame().

619 {
620  if (m_ediFrame == 0)
621  {
623  m_ediFrame->CenterOnParent(kTRUE,TGTransientFrame::kTopRight);
625  }
626 }
void bindCSGActionKeys(const TGMainFrame *f) const
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
FWColorManager * colorManager() const
Definition: Context.h:65
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
FWSelectionManager * selectionManager() const
Definition: Context.h:57
fireworks::Context * m_context
Definition: FWGUIManager.h:242
void FWGUIManager::createHelpGLPopup ( )

Definition at line 738 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

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 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CmsShowHelpPopup * m_helpGLPopup
Definition: FWGUIManager.h:266
CSGAction * getAction(const std::string name)
const std::string sHelpGL
Definition: ActionsList.cc:41
void FWGUIManager::createHelpPopup ( )

Definition at line 711 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and m_helpPopup.

Referenced by FWGUIManager().

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 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CmsShowHelpPopup * m_helpPopup
Definition: FWGUIManager.h:264
TGVerticalFrame * FWGUIManager::createList ( TGCompositeFrame *  p)

Definition at line 578 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().

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 }
TGCompositeFrame * widget() const
const FWEventItemsManager * eventItemsManager() const
Definition: Context.h:61
FWSummaryManager * m_summaryManager
Definition: FWGUIManager.h:244
FWColorManager * colorManager() const
Definition: Context.h:65
FWSelectionManager * selectionManager() const
Definition: Context.h:57
FWModelChangeManager * modelChangeManager() const
Definition: Context.h:54
fireworks::Context * m_context
Definition: FWGUIManager.h:242
void FWGUIManager::createModelPopup ( )

Definition at line 651 of file FWGUIManager.cc.

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

Referenced by showModelPopup().

652 {
654  m_modelPopup->CenterOnParent(kTRUE,TGTransientFrame::kRight);
656 }
void bindCSGActionKeys(const TGMainFrame *f) const
FWColorManager * colorManager() const
Definition: Context.h:65
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:247
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
FWSelectionManager * selectionManager() const
Definition: Context.h:57
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:258
fireworks::Context * m_context
Definition: FWGUIManager.h:242
void FWGUIManager::createShortcutPopup ( )

Definition at line 725 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

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 }
const std::string sKeyboardShort
Definition: ActionsList.cc:40
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CSGAction * getAction(const std::string name)
CmsShowHelpPopup * m_shortcutPopup
Definition: FWGUIManager.h:265
FWGUIManager::ViewMap_i FWGUIManager::createView ( const std::string &  iName,
TEveWindowSlot *  slot = 0 
)

Definition at line 277 of file FWGUIManager.cc.

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

Referenced by newViewSlot(), and setFrom().

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 }
tuple base
Main Program
Definition: newFWLiteAna.py:92
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
NameToViewBuilder m_nameToViewBuilder
Definition: FWGUIManager.h:270
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:239
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:272
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:273
virtual FWViewContextMenuHandlerBase * contextMenuHandler() const
Definition: FWViewBase.cc:112
void showSelectedModelContextMenu(Int_t iGlobalX, Int_t iGlobalY, FWViewContextMenuHandlerBase *iHandler)
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
Definition: FWViewBase.h:56
void FWGUIManager::createViews ( TEveWindowSlot *  slot)

Definition at line 608 of file FWGUIManager.cc.

References m_viewPrimPack, and m_viewSecPack.

Referenced by CmsShowMainFrame::CmsShowMainFrame().

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 }
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:272
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:273
void FWGUIManager::delaySliderChanged ( Int_t  val)
private

Definition at line 1341 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

1342 {
1343  Float_t sec = val*0.001;
1344  m_cmsShowMainFrame->setPlayDelayGUI(sec, kFALSE);
1345  changedDelayBetweenEvents_.emit(sec);
1346 }
sigc::signal< void, Float_t > changedDelayBetweenEvents_
Definition: FWGUIManager.h:215
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void setPlayDelayGUI(Float_t val, Bool_t sliderChanged)
void FWGUIManager::disableNext ( )

Definition at line 377 of file FWGUIManager.cc.

References CmsShowMainFrame::enableNext(), and m_cmsShowMainFrame.

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

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

Definition at line 371 of file FWGUIManager.cc.

References CmsShowMainFrame::enablePrevious(), and m_cmsShowMainFrame.

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

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

Definition at line 331 of file FWGUIManager.cc.

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

Referenced by CmsShowMainBase::eventChangedImp().

331  {
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 }
int i
Definition: DBlmapReader.cc:9
void loadEvent(const edm::EventBase &event)
bool ev
FWDetailViewManager * m_detailViewManager
Definition: FWGUIManager.h:247
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
const edm::EventBase * getCurrentEvent() const
void FWGUIManager::eventIdChanged ( )

Definition at line 1376 of file FWGUIManager.cc.

References changedEventId_, FWNumberEntryField::GetUIntNumber(), FWNumberEntryField::GetULong64Number(), edm::invalidEventNumber, m_cmsShowMainFrame, CmsShowMainFrame::m_eventEntry, CmsShowMainFrame::m_lumiEntry, CmsShowMainFrame::m_runEntry, and FWNumberEntryField::SetULong64Number().

1377 {
1379  {
1381  }
1382 
1386 }
FWNumberEntryField * m_lumiEntry
virtual ULong64_t GetULong64Number()
EventNumber_t const invalidEventNumber
virtual void SetULong64Number(ULong64_t n)
FWNumberEntryField * m_eventEntry
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
virtual UInt_t GetUIntNumber()
FWNumberEntryField * m_runEntry
sigc::signal< void, edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t > changedEventId_
Definition: FWGUIManager.h:209
void FWGUIManager::evePreTerminate ( )

Definition at line 227 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and m_viewMap.

Referenced by CmsShowMain::doExit().

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 }
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void FWGUIManager::exportAllViews ( const std::string &  format,
int  height 
)

Definition at line 887 of file FWGUIManager.cc.

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

Referenced by exportImagesOfAllViews().

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 }
int i
Definition: DBlmapReader.cc:9
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
const double w
Definition: UKUtility.cc:23
bool ev
int j
Definition: DBlmapReader.cc:9
const edm::EventBase * getCurrentEvent() const
void FWGUIManager::exportImageOfMainView ( )

Definition at line 838 of file FWGUIManager.cc.

References fwLog, fwlog::kError, m_cmsShowMainFrame, m_viewMap, and m_viewPrimPack.

Referenced by FWGUIManager().

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 }
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:272
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
#define fwLog(_level_)
Definition: fwLog.h:50
void FWGUIManager::exportImagesOfAllViews ( )

Definition at line 853 of file FWGUIManager.cc.

References gather_cfg::cout, dir, alignCSCRings::e, exportAllViews(), m_cmsShowMainFrame, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by FWGUIManager().

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 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void exportAllViews(const std::string &format, int height)
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
void FWGUIManager::filterButtonClicked ( )

Definition at line 1406 of file FWGUIManager.cc.

References filterButtonClicked_.

1407 {
1408  filterButtonClicked_.emit();
1409 }
sigc::signal< void > filterButtonClicked_
Definition: FWGUIManager.h:205
void FWGUIManager::finishUpColorChange ( )
private

Definition at line 1389 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

1390 {
1394 
1395  gEve->FullRedraw3D();
1396 }
void colorSetChanged()
Definition: CmsShowEDI.cc:530
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:258
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:260
CSGAction * FWGUIManager::getAction ( const std::string  name)

Definition at line 347 of file FWGUIManager.cc.

References CSGActionSupervisor::getAction(), and m_cmsShowMainFrame.

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

348 {
350 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CSGAction * getAction(const std::string &name)
const edm::EventBase * FWGUIManager::getCurrentEvent ( ) const
FWGUIManager * FWGUIManager::getGUIManager ( )
static
CmsShowMainFrame* FWGUIManager::getMainFrame ( ) const
inline
TEveWindow * FWGUIManager::getSwapCandidate ( )
private

Definition at line 428 of file FWGUIManager.cc.

References m_viewPrimPack, m_viewSecPack, and createTree::pp.

Referenced by checkSubviewAreaIconState(), and subviewSwapped().

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 }
tuple pp
Definition: createTree.py:15
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:272
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:273
CSGContinuousAction * FWGUIManager::loopAction ( )

Definition at line 365 of file FWGUIManager.cc.

References CmsShowMainFrame::loopAction(), and m_cmsShowMainFrame.

366 {
367  return m_cmsShowMainFrame->loopAction();
368 }
CSGContinuousAction * loopAction() const
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void FWGUIManager::lumiIdChanged ( )

Definition at line 1365 of file FWGUIManager.cc.

References FWNumberEntryField::GetUIntNumber(), edm::invalidLuminosityBlockNumber, m_cmsShowMainFrame, CmsShowMainFrame::m_eventEntry, CmsShowMainFrame::m_lumiEntry, and FWNumberEntryField::SetUIntNumber().

1366 {
1368  {
1370  }
1371 
1372  m_cmsShowMainFrame->m_eventEntry->SetText("", kFALSE);
1373  m_cmsShowMainFrame->m_eventEntry->SetFocus();
1374 }
FWNumberEntryField * m_lumiEntry
virtual void SetUIntNumber(UInt_t n)
FWNumberEntryField * m_eventEntry
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
virtual UInt_t GetUIntNumber()
LuminosityBlockNumber_t const invalidLuminosityBlockNumber
TGFrame * FWGUIManager::makeGUIsubview ( TEveCompositeFrame *  cp,
TGCompositeFrame *  parent,
Int_t  height 
)
static

Definition at line 255 of file FWGUIManager.cc.

Referenced by FWGUIManager().

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

Definition at line 1433 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

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 }
tuple attr
Definition: asciidump.py:432
#define fwLog(_level_)
Definition: fwLog.h:50
Definition: DDAxes.h:10
void FWGUIManager::newItem ( const FWEventItem iItem)
private

Definition at line 401 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

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 }
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 270 of file FWGUIManager.cc.

References createView().

Referenced by FWGUIManager().

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

Definition at line 1332 of file FWGUIManager.cc.

1333 {
1334  gEve->GetBrowser()->MapWindow();
1335 }
const FWGUIManager& FWGUIManager::operator= ( const FWGUIManager )
private
CSGContinuousAction * FWGUIManager::playEventsAction ( )

Definition at line 353 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::playEventsAction().

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

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

Definition at line 359 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::playEventsBackwardsAction().

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

Definition at line 666 of file FWGUIManager.cc.

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

Referenced by setViewPopup().

667 {
668  if (m_viewPopup->getEveWindow())
669  {
671  sa->setInfoButton(kFALSE);
672  }
673 }
void setInfoButton(bool downp)
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
TEveWindow * getEveWindow() const
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
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 785 of file FWGUIManager.cc.

References dir, m_cmsShowMainFrame, alignBH_cfg::mode, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by promptForLoadConfigurationFile(), and promptForSaveConfigurationFile().

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 }
tuple result
Definition: query.py:137
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
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 815 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

816 {
818  if (!promptForConfigurationFile(name, kFDOpen))
819  return;
820 
821 
823 }
bool promptForConfigurationFile(std::string &result, enum EFileDialogMode mode)
sigc::signal< void, const std::string & > loadFromConfigurationFile_
Definition: FWGUIManager.h:208
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 829 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

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

Definition at line 1465 of file FWGUIManager.cc.

References m_WMDecorH, m_WMOffsetX, and m_WMOffsetY.

Referenced by CmsShowMain::CmsShowMain().

1466 {
1468 }
void FWGUIManager::runIdChanged ( )

Definition at line 1354 of file FWGUIManager.cc.

References FWNumberEntryField::GetUIntNumber(), edm::invalidRunNumber, m_cmsShowMainFrame, CmsShowMainFrame::m_lumiEntry, CmsShowMainFrame::m_runEntry, and FWNumberEntryField::SetUIntNumber().

1355 {
1357  {
1359  }
1360 
1361  m_cmsShowMainFrame->m_lumiEntry->SetText("", kFALSE);
1362  m_cmsShowMainFrame->m_lumiEntry->SetFocus();
1363 }
FWNumberEntryField * m_lumiEntry
virtual void SetUIntNumber(UInt_t n)
RunNumber_t const invalidRunNumber
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
virtual UInt_t GetUIntNumber()
FWNumberEntryField * m_runEntry
void FWGUIManager::setDelayBetweenEvents ( Float_t  val)

Definition at line 1349 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::setPlayDelayGUI().

1350 {
1351  m_cmsShowMainFrame->setPlayDelayGUI(val, kTRUE);
1352 }
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void setPlayDelayGUI(Float_t val, Bool_t sliderChanged)
void FWGUIManager::setFilterButtonIcon ( int  state)

Definition at line 1418 of file FWGUIManager.cc.

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

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

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

Implements FWConfigurable.

Definition at line 1200 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, FWGeometryTableViewBase::populate3DViewsFromConfig(), CmsShowMainFrame::setSummaryViewWeight(), setViewPopup(), setWindowInfoFrom(), showCommonPopup(), showEDIFrame(), showModelPopup(), AlCaHLTBitMon_QueryRunRegistry::string, subviewDestroyAll(), FWConfiguration::value(), FWConfiguration::valueForKey(), FWConfiguration::version(), and histoStyle::weight.

1200  {
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 }
std::vector< std::pair< std::string, FWConfiguration > > KeyValues
void bindCSGActionKeys(const TGMainFrame *f) const
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
void showModelPopup()
const KeyValues * keyValues() const
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
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:272
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:273
void setWindowInfoFrom(const FWConfiguration &iFrom, TGMainFrame *iFrame)
void checkSubviewAreaIconState(TEveWindow *)
static const std::string kCollectionController("collection")
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
static const std::string kMainWindow("main window")
static const std::string kUndocked("undocked views")
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:258
static const std::string kViewArea("view area")
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:260
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:50
KeyValues::const_iterator KeyValuesIt
void setSummaryViewWeight(float)
const FWConfiguration * valueForKey(const std::string &iKey) const
int weight
Definition: histoStyle.py:50
void showCommonPopup()
static const std::string kControllers("controllers")
void FWGUIManager::setPlayMode ( bool  play)

Definition at line 383 of file FWGUIManager.cc.

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

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

Definition at line 683 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().

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 }
void popupViewClosed()
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
sigc::signal< void > closed_
FWColorManager * colorManager() const
Definition: Context.h:65
virtual void UnmapWindow()
static FWGUIManager * m_guiManager
Definition: FWGUIManager.h:239
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
void reset(FWViewBase *, TEveWindow *ew)
fireworks::Context * m_context
Definition: FWGUIManager.h:242
void FWGUIManager::setWindowInfoFrom ( const FWConfiguration iFrom,
TGMainFrame *  iFrame 
)

Definition at line 1187 of file FWGUIManager.cc.

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

Referenced by setFrom().

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 }
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 640 of file FWGUIManager.cc.

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

Referenced by FWGUIManager(), and setFrom().

641 {
642  if (! m_commonPopup)
643  {
646  }
647  m_commonPopup->MapRaised();
648 }
void bindCSGActionKeys(const TGMainFrame *f) const
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
CmsShowCommonPopup * m_commonPopup
Definition: FWGUIManager.h:260
fireworks::Context * m_context
Definition: FWGUIManager.h:242
CmsShowCommon * commonPrefs() const
Definition: Context.cc:178
void FWGUIManager::showEDIFrame ( int  iInfoToShow = -1)

Allowed values are -1 or ones from FWDataCategories enum.

Definition at line 629 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().

630 {
631  createEDIFrame();
632  if (-1 != iToShow)
633  {
634  m_ediFrame->show(static_cast<FWDataCategories>(iToShow));
635  }
636  m_ediFrame->MapRaised();
637 }
CmsShowEDI * m_ediFrame
Definition: FWGUIManager.h:257
void createEDIFrame()
void show(FWDataCategories)
Definition: CmsShowEDI.cc:523
void FWGUIManager::showEventFilterGUI ( )

Definition at line 1400 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and showEventFilterGUI_.

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

1401 {
1403 }
sigc::signal< void, const TGWindow * > showEventFilterGUI_
Definition: FWGUIManager.h:206
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void FWGUIManager::showInvMassDialog ( )

Definition at line 700 of file FWGUIManager.cc.

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

Referenced by FWGUIManager().

701 {
702  if (! m_invMassDialog)
703  {
706  }
707  m_invMassDialog->MapRaised();
708 }
void bindCSGActionKeys(const TGMainFrame *f) const
FWInvMassDialog * m_invMassDialog
Definition: FWGUIManager.h:261
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
FWSelectionManager * selectionManager() const
Definition: Context.h:57
fireworks::Context * m_context
Definition: FWGUIManager.h:242
void FWGUIManager::showModelPopup ( )

Definition at line 659 of file FWGUIManager.cc.

References createModelPopup(), and m_modelPopup.

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

660 {
662  m_modelPopup->MapRaised();
663 }
CmsShowModelPopup * m_modelPopup
Definition: FWGUIManager.h:258
void createModelPopup()
void FWGUIManager::showSelectedModelContextMenu ( Int_t  iGlobalX,
Int_t  iGlobalY,
FWViewContextMenuHandlerBase iHandler 
)

Definition at line 752 of file FWGUIManager.cc.

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

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

753 {
754  if (! m_context->selectionManager()->selected().empty())
755  {
756  m_contextMenuHandler->showSelectedModelContext(iGlobalX,iGlobalY, iHandler);
757  }
758 }
const std::set< FWModelId > & selected() const
FWSelectionManager * selectionManager() const
Definition: Context.h:57
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:242
FWModelContextMenuHandler * m_contextMenuHandler
Definition: FWGUIManager.h:249
void FWGUIManager::showViewPopup ( )

Definition at line 676 of file FWGUIManager.cc.

References setViewPopup().

Referenced by FWGUIManager().

677 {
678  // CSG action.
679  setViewPopup(0);
680 }
void setViewPopup(TEveWindow *)
void FWGUIManager::subviewDestroy ( FWGUISubviewArea sva)

Definition at line 506 of file FWGUIManager.cc.

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

Referenced by subviewDestroyAll(), and subviewIsBeingDestroyed().

507 {
508  TEveWindow* ew = sva->getEveWindow();
509  FWViewBase* viewBase = m_viewMap[ew];
510  m_viewMap.erase(ew);
511  viewBase->destroy();
512 }
TEveWindow * getEveWindow()
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
void destroy()
Definition: FWViewBase.cc:64
void FWGUIManager::subviewDestroyAll ( )

Definition at line 515 of file FWGUIManager.cc.

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

Referenced by setFrom().

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 }
int i
Definition: DBlmapReader.cc:9
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
const double w
Definition: UKUtility.cc:23
void setViewPopup(TEveWindow *)
TEveWindowPack * m_viewPrimPack
Definition: FWGUIManager.h:272
TEveWindowPack * m_viewSecPack
Definition: FWGUIManager.h:273
void subviewDestroy(FWGUISubviewArea *)
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
double sd
void FWGUIManager::subviewInfoSelected ( FWGUISubviewArea sva)

Definition at line 549 of file FWGUIManager.cc.

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

Referenced by connectSubviewAreaSignals().

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 }
TEveWindow * getEveWindow()
ViewMap_t::iterator ViewMap_i
Definition: FWGUIManager.h:103
ViewMap_t m_viewMap
Definition: FWGUIManager.h:269
void setViewPopup(TEveWindow *)
void setInfoButton(bool downp)
static FWGUISubviewArea * getToolBarFromWindow(TEveWindow *)
void FWGUIManager::subviewInfoUnselected ( FWGUISubviewArea sva)

Definition at line 562 of file FWGUIManager.cc.

References m_viewPopup, and CmsShowViewPopup::UnmapWindow().

Referenced by connectSubviewAreaSignals().

563 {
565 }
virtual void UnmapWindow()
CmsShowViewPopup * m_viewPopup
Definition: FWGUIManager.h:259
void FWGUIManager::subviewIsBeingDestroyed ( FWGUISubviewArea sva)

Definition at line 494 of file FWGUIManager.cc.

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

Referenced by connectSubviewAreaSignals().

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 }
void setViewPopup(TEveWindow *)
std::auto_ptr< CmsShowTaskExecutor > m_tasks
Definition: FWGUIManager.h:277
void subviewDestroy(FWGUISubviewArea *)
double f[11][100]
bool isSelected() const
boost::function0< void > TaskFunctor
void FWGUIManager::subviewSwapped ( FWGUISubviewArea sva)

Definition at line 568 of file FWGUIManager.cc.

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

Referenced by connectSubviewAreaSignals().

569 {
570  TEveWindow* curr = getSwapCandidate();
571  TEveWindow* swap = sva->getEveWindow();
572  if (curr) swap->SwapWindow(curr);
573 
575 }
TEveWindow * getEveWindow()
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
void checkSubviewAreaIconState(TEveWindow *)
TEveWindow * getSwapCandidate()
void FWGUIManager::titleChanged ( const char *  title)

Definition at line 323 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and indexGen::title.

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

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

Definition at line 1427 of file FWGUIManager.cc.

References m_cmsShowMainFrame, and CmsShowMainFrame::m_filterEnableBtn.

Referenced by CmsShowMain::setupDataHandling().

1428 {
1429  m_cmsShowMainFrame->m_filterEnableBtn->SetEnabled(btnEnabled);
1430 }
FWCustomIconsButton * m_filterEnableBtn
CmsShowMainFrame * m_cmsShowMainFrame
Definition: FWGUIManager.h:251
void FWGUIManager::updateStatus ( const char *  status)

Member Data Documentation

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

Definition at line 215 of file FWGUIManager.h.

Referenced by delaySliderChanged().

sigc::signal<void> FWGUIManager::changedEventEntry_

Definition at line 214 of file FWGUIManager.h.

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

Definition at line 209 of file FWGUIManager.h.

Referenced by eventIdChanged().

sigc::signal<void> FWGUIManager::changedRunEntry_

Definition at line 213 of file FWGUIManager.h.

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

Definition at line 210 of file FWGUIManager.h.

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

Definition at line 208 of file FWGUIManager.h.

Referenced by promptForLoadConfigurationFile().

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

Definition at line 260 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 249 of file FWGUIManager.h.

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

FWGUIEventDataAdder* FWGUIManager::m_dataAdder
private

Definition at line 254 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 253 of file FWGUIManager.h.

FWGUIManager * FWGUIManager::m_guiManager = 0
staticprivate

Definition at line 239 of file FWGUIManager.h.

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

CmsShowHelpPopup* FWGUIManager::m_helpGLPopup
private

Definition at line 266 of file FWGUIManager.h.

Referenced by createHelpGLPopup().

CmsShowHelpPopup* FWGUIManager::m_helpPopup
private

Definition at line 264 of file FWGUIManager.h.

Referenced by createHelpPopup().

FWInvMassDialog* FWGUIManager::m_invMassDialog
private

Definition at line 261 of file FWGUIManager.h.

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

sigc::connection FWGUIManager::m_modelChangeConn
private

Definition at line 275 of file FWGUIManager.h.

CmsShowModelPopup* FWGUIManager::m_modelPopup
private

Definition at line 258 of file FWGUIManager.h.

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

NameToViewBuilder FWGUIManager::m_nameToViewBuilder
private

Definition at line 270 of file FWGUIManager.h.

Referenced by createView(), and registerViewBuilder().

FWNavigatorBase* FWGUIManager::m_navigator
private

Definition at line 250 of file FWGUIManager.h.

Referenced by getCurrentEvent().

CmsShowHelpPopup* FWGUIManager::m_shortcutPopup
private

Definition at line 265 of file FWGUIManager.h.

Referenced by createShortcutPopup().

FWSummaryManager* FWGUIManager::m_summaryManager
private

Definition at line 244 of file FWGUIManager.h.

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

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

Definition at line 277 of file FWGUIManager.h.

Referenced by subviewIsBeingDestroyed().

const FWViewManagerManager* FWGUIManager::m_viewManagerManager
private

Definition at line 248 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 279 of file FWGUIManager.h.

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

int FWGUIManager::m_WMOffsetX
private

Definition at line 279 of file FWGUIManager.h.

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

int FWGUIManager::m_WMOffsetY
private

Definition at line 279 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 207 of file FWGUIManager.h.

Referenced by promptForSaveConfigurationFile().

sigc::signal<void> FWGUIManager::writeToPresentConfigurationFile_

Definition at line 211 of file FWGUIManager.h.

Referenced by FWGUIManager().