CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends
CmsShowMainFrame Class Reference

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

Inheritance diagram for CmsShowMainFrame:
CSGActionSupervisor

Public Member Functions

void bindCSGActionKeys (const TGMainFrame *f) const
 
 ClassDefOverride (CmsShowMainFrame, 0)
 
void clearStatusBar ()
 
void CloseWindow () override
 
 CmsShowMainFrame (const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, FWGUIManager *m=nullptr)
 
CSGActioncreateNewViewerAction (const std::string &iActionName, bool seaprator)
 
void enableActions (bool enable=true) override
 
void enableComplexNavigation (bool enable=true)
 
void enableNavigatorControls ()
 
void enableNext (bool enable=true)
 
void enablePrevious (bool enable=true)
 
float getSummaryViewWeight () const
 
Bool_t HandleKey (Event_t *event) override
 
void HandleMenu (Int_t id) override
 
void loadEvent (const edm::EventBase &event)
 
CSGContinuousActionloopAction () const
 
bool nextIsEnabled ()
 
CSGContinuousActionplayEventsAction () const
 
CSGContinuousActionplayEventsBackwardsAction () const
 
bool previousIsEnabled ()
 
void quit ()
 
void setPlayDelayGUI (Float_t val, Bool_t sliderChanged)
 
void setSummaryViewWeight (float)
 
void showFWorksInfo ()
 
void updateStatusBar (const char *status)
 
 ~CmsShowMainFrame () override
 
- Public Member Functions inherited from CSGActionSupervisor
Bool_t activateMenuEntry (int entry)
 
Bool_t activateToolBarEntry (int entry)
 
void addToActionMap (CSGAction *action)
 
 CSGActionSupervisor ()
 
virtual void defaultAction ()
 
CSGActiongetAction (const std::string &name)
 
const std::vector< CSGAction * > & getListOfActions () const
 
Long_t getToolTipDelay () const
 
void resizeMenu (TGPopupMenu *menu)
 
virtual ~CSGActionSupervisor ()
 

Protected Attributes

FWIntValueListenerm_delaySliderListener
 
FWNumberEntryFieldm_eventEntry
 
FWCustomIconsButtonm_filterEnableBtn
 
const TGPicture * m_filterIcons [9]
 
TGTextButton * m_filterShowGUIBtn
 
FWNumberEntryFieldm_lumiEntry
 
FWNumberEntryFieldm_runEntry
 
- Protected Attributes inherited from CSGActionSupervisor
std::vector< CSGAction * > m_actionList
 

Private Member Functions

 CmsShowMainFrame (const CmsShowMainFrame &)
 
void makeFixedSizeLabel (TGHorizontalFrame *p, const char *txt, UInt_t bgCol, UInt_t txtCol, Int_t width, Int_t height)
 
const CmsShowMainFrameoperator= (const CmsShowMainFrame &)
 

Private Attributes

TGLabel * m_delayLabel
 
TGSlider * m_delaySlider
 
TGMainFrame * m_fworksAbout
 
CSGActionm_fworksInfo
 
CSGActionm_goToFirst
 
CSGActionm_goToLast
 
CSGContinuousActionm_loopAction
 
FWGUIManagerm_manager
 
TGPopupMenu * m_newViewerMenu
 
CSGActionm_nextEvent
 
CSGActionm_playDelay
 
CSGContinuousActionm_playEvents
 
CSGContinuousActionm_playEventsBack
 
CSGActionm_previousEvent
 
TGStatusBar * m_statBar
 
TGLabel * m_timeText
 
Long_t m_tooltipDelay
 

Friends

class FWGUIManager
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 56 of file CmsShowMainFrame.h.

Constructor & Destructor Documentation

CmsShowMainFrame::CmsShowMainFrame ( const TGWindow *  p = nullptr,
UInt_t  w = 1,
UInt_t  h = 1,
FWGUIManager m = nullptr 
)

Definition at line 76 of file CmsShowMainFrame.cc.

References popcon2dropbox::copy(), FWCheckBoxIcon::coreIcondir(), CSGContinuousAction::createCustomIconsButton(), CSGAction::createCustomIconsButton(), FWGUIManager::createList(), CSGAction::createMenuEntry(), CSGAction::createShortcut(), FWGUIManager::createViews(), TkAlMuonSelectors_cfi::cut, CSGAction::disable(), hcaldqm::fClient, createfilelist::help, label, heppy_loop::loop, m_delayLabel, m_delaySlider, m_delaySliderListener, m_eventEntry, m_filterEnableBtn, m_filterIcons, m_filterShowGUIBtn, m_goToFirst, m_goToLast, m_loopAction, m_lumiEntry, m_manager, m_newViewerMenu, m_nextEvent, m_playEvents, m_playEventsBack, m_previousEvent, m_runEntry, m_statBar, m_timeText, makeFixedSizeLabel(), GetRecoTauVFromDQM_MC_cff::next, quit(), cmsshow::sAppendData, cmsshow::sAutoRewind, cmsshow::sBackgroundColor, cmsshow::sCopy, cmsshow::sCut, CSGAction::setToolTip(), cmsshow::sExportAllImages, cmsshow::sExportImage, cmsshow::sGotoFirstEvent, cmsshow::sGotoLastEvent, cmsshow::sHelp, cmsshow::sHelpGL, cmsshow::sKeyboardShort, cmsshow::sLoadConfig, cmsshow::sLoadPartialConfig, cmsshow::sNextEvent, cmsshow::sOpenData, cmsshow::sPaste, cmsshow::sPlayEvents, cmsshow::sPlayEventsBack, cmsshow::sPreviousEvent, cmsshow::sQuit, cmsshow::sRedo, cmsshow::sSaveConfig, cmsshow::sSaveConfigAs, cmsshow::sSavePartialConfig, cmsshow::sSavePartialConfigAs, cmsshow::sSearchFiles, cmsshow::sShowAddCollection, cmsshow::sShowCommonInsp, cmsshow::sShowEventDisplayInsp, cmsshow::sShowInvMassDialog, cmsshow::sShowMainViewCtl, cmsshow::sShowObjInsp, cmsshow::sUndo, RecoTauValidation_cfi::textColor, and fftjetcommon_cfi::title.

76  :
77  TGMainFrame(p, w, h),
80  m_runEntry(nullptr),
81  m_lumiEntry(nullptr),
82  m_eventEntry(nullptr),
83  m_delaySliderListener(nullptr),
84  m_manager(m),
85  m_fworksAbout(nullptr)
86 {
87  const unsigned int backgroundColor=0x2f2f2f;
88  const unsigned int textColor= 0xb3b3b3;
89  gClient->SetStyle("classic");
90  CSGAction *openData = new CSGAction(this, cmsshow::sOpenData.c_str());
91  CSGAction *appendData = new CSGAction(this, cmsshow::sAppendData.c_str());
92  CSGAction *searchFiles = new CSGAction(this, cmsshow::sSearchFiles.c_str());
93 
94  CSGAction *loadConfig = new CSGAction(this, cmsshow::sLoadConfig.c_str());
95  CSGAction *saveConfig = new CSGAction(this, cmsshow::sSaveConfig.c_str());
96  CSGAction *saveConfigAs = new CSGAction(this, cmsshow::sSaveConfigAs.c_str());
97 
98 
99  CSGAction *loadPartialConfig = new CSGAction(this, cmsshow::sLoadPartialConfig.c_str());
100  CSGAction *savePartialConfig = new CSGAction(this, cmsshow::sSavePartialConfig.c_str());
101  CSGAction *savePartialConfigAs = new CSGAction(this, cmsshow::sSavePartialConfigAs.c_str());
102 
103 
104  CSGAction *exportImage = new CSGAction(this, cmsshow::sExportImage.c_str());
105  CSGAction *exportImages = new CSGAction(this, cmsshow::sExportAllImages.c_str());
106  CSGAction *quit = new CSGAction(this, cmsshow::sQuit.c_str());
107 
108  CSGAction *undo = new CSGAction(this, cmsshow::sUndo.c_str());
109  undo->disable(); //NOTE: All disables happen again later in this routine
110  CSGAction *redo = new CSGAction(this, cmsshow::sRedo.c_str());
111  redo->disable(); //NOTE: All disables happen again later in this routine
112  CSGAction *cut = new CSGAction(this, cmsshow::sCut.c_str());
113  cut->disable(); //NOTE: All disables happen again later in this routine
114  CSGAction *copy = new CSGAction(this, cmsshow::sCopy.c_str());
115  copy->disable(); //NOTE: All disables happen again later in this routine
116  CSGAction *paste = new CSGAction(this, cmsshow::sPaste.c_str());
117  paste->disable();//NOTE: All disables happen again later in this routine
118 
119  CSGAction *goToFirst = new CSGAction(this, cmsshow::sGotoFirstEvent.c_str());
120  CSGAction *goToLast = new CSGAction(this, cmsshow::sGotoLastEvent.c_str());
121 
122  CSGAction *nextEvent = new CSGAction(this, cmsshow::sNextEvent.c_str());
123  CSGAction *previousEvent = new CSGAction(this, cmsshow::sPreviousEvent.c_str());
124 
125  CSGContinuousAction *playEvents = new CSGContinuousAction(this, cmsshow::sPlayEvents.c_str());
126  CSGContinuousAction *playEventsBack = new CSGContinuousAction(this, cmsshow::sPlayEventsBack.c_str());
128 
129  CSGAction *showCommonInsp = new CSGAction(this, cmsshow::sShowCommonInsp.c_str());
130  CSGAction *colorset = new CSGAction(this, cmsshow::sBackgroundColor.c_str());
131 
132  CSGAction *showObjInsp = new CSGAction(this, cmsshow::sShowObjInsp.c_str());
133  CSGAction *showEventDisplayInsp = new CSGAction(this, cmsshow::sShowEventDisplayInsp.c_str());
134  CSGAction *showMainViewCtl = new CSGAction(this, cmsshow::sShowMainViewCtl.c_str());
135  CSGAction *showAddCollection = new CSGAction(this, cmsshow::sShowAddCollection.c_str());
136  CSGAction *showInvMassDialog = new CSGAction(this, cmsshow::sShowInvMassDialog.c_str());
137 
138  CSGAction *help = new CSGAction(this, cmsshow::sHelp.c_str());
139  CSGAction *keyboardShort = new CSGAction(this, cmsshow::sKeyboardShort.c_str());
140  CSGAction *helpGL = new CSGAction(this, cmsshow::sHelpGL.c_str());
141 
142  m_nextEvent = nextEvent;
143  m_previousEvent = previousEvent;
144  m_goToFirst = goToFirst;
145  m_goToLast = goToLast;
146  m_playEvents = playEvents;
147  m_playEventsBack = playEventsBack;
148  m_loopAction = loop;
149 
150  goToFirst->setToolTip("Goto first event");
151  goToLast->setToolTip("Goto last event");
152  previousEvent->setToolTip("Goto previous event");
153  nextEvent->setToolTip("Goto next event");
154  playEvents->setToolTip("Play events");
155  playEventsBack->setToolTip("Play events backwards");
156 
157  TGCompositeFrame *menuTopFrame = new TGCompositeFrame(this, 1, 1, kHorizontalFrame, backgroundColor);
158 
159  TGMenuBar *menuBar = new TGMenuBar(menuTopFrame, this->GetWidth(), 28, kHorizontalFrame);
160 
161  TGPopupMenu *fileMenu = new TGPopupMenu(gClient->GetRoot());
162  menuBar->AddPopup("File", fileMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
163 
164  openData->createMenuEntry(fileMenu);
165  appendData->createMenuEntry(fileMenu);
166  searchFiles->createMenuEntry(fileMenu);
167  //searchFiles->disable();
168 
169  fileMenu->AddSeparator();
170  loadConfig->createMenuEntry(fileMenu);
171  saveConfig->createMenuEntry(fileMenu);
172  saveConfigAs->createMenuEntry(fileMenu);
173 
174 
175  TGPopupMenu* partialSaveMenu = new TGPopupMenu(gClient->GetRoot());
176  fileMenu->AddPopup("Advanced Configuration", partialSaveMenu);
177 
178  loadPartialConfig->createMenuEntry(partialSaveMenu);
179  savePartialConfig->createMenuEntry(partialSaveMenu);
180  savePartialConfigAs->createMenuEntry(partialSaveMenu);
181  fileMenu->AddSeparator();
182 
183  exportImage->createMenuEntry(fileMenu);
184  exportImages->createMenuEntry(fileMenu);
185  fileMenu->AddSeparator();
186 
187  quit->createMenuEntry(fileMenu);
188 
189  openData->createShortcut(kKey_O, "CTRL", GetId());
190  loadConfig->createShortcut(kKey_L, "CTRL", GetId());
191  saveConfig->createShortcut(kKey_S, "CTRL", GetId());
192  saveConfigAs->createShortcut(kKey_S, "CTRL+SHIFT", GetId());
193  exportImage->createShortcut(kKey_P, "CTRL", GetId());
194  // comment out the followinf one, seems to get double open file dialog events on OSX
195  // exportImages->createShortcut(kKey_P, "CTRL+SHIFT", GetId());
196  quit->createShortcut(kKey_Q, "CTRL", GetId());
197 
198  TGPopupMenu *editMenu = new TGPopupMenu(gClient->GetRoot());
199  menuBar->AddPopup("Edit", editMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
200 
201  showCommonInsp->createMenuEntry(editMenu);
202  showCommonInsp->createShortcut(kKey_A, "CTRL+SHIFT", GetId());
203  colorset->createMenuEntry(editMenu);
204  colorset->createShortcut(kKey_B, "CTRL", GetId());
205  editMenu->AddSeparator();
206 
207  undo->createMenuEntry(editMenu);
208  undo->createShortcut(kKey_Z, "CTRL", GetId());
209  redo->createMenuEntry(editMenu);
210  redo->createShortcut(kKey_Z, "CTRL+SHIFT", GetId());
211  editMenu->AddSeparator();
212 
213  cut->createMenuEntry(editMenu);
214  cut->createShortcut(kKey_X, "CTRL", GetId());
215  copy->createMenuEntry(editMenu);
216  copy->createShortcut(kKey_C, "CTRL", GetId());
217  paste->createMenuEntry(editMenu);
218  paste->createShortcut(kKey_V, "CTRL", GetId());
219 
220  TGPopupMenu *viewMenu = new TGPopupMenu(gClient->GetRoot());
221  menuBar->AddPopup("View", viewMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
222 
223  m_newViewerMenu = new TGPopupMenu(gClient->GetRoot());
224  viewMenu->AddPopup("New Viewer", m_newViewerMenu);
225 
226  viewMenu->AddSeparator();
227 
228  nextEvent->createMenuEntry(viewMenu);
229  nextEvent->createShortcut(kKey_Right, "CTRL", GetId());
230  previousEvent->createMenuEntry(viewMenu);
231  previousEvent->createShortcut(kKey_Left, "CTRL", GetId());
232  goToFirst->createMenuEntry(viewMenu);
233  goToLast->createMenuEntry(viewMenu);
234  playEvents->createMenuEntry(viewMenu);
235  playEvents->createShortcut(kKey_Space, "CTRL", GetId());
236  playEventsBack->createMenuEntry(viewMenu);
237  playEventsBack->createShortcut(kKey_Space, "CTRL+SHIFT", GetId());
238  loop->createMenuEntry(viewMenu);
239 
240  TGPopupMenu* windowMenu = new TGPopupMenu(gClient->GetRoot());
241  menuBar->AddPopup("Window", windowMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
242 
243  showCommonInsp->createMenuEntry(windowMenu);
244  showObjInsp->createMenuEntry(windowMenu);
245  showEventDisplayInsp->createShortcut(kKey_I, "CTRL", GetId());
246  showEventDisplayInsp->createMenuEntry(windowMenu);
247  showAddCollection->createMenuEntry(windowMenu);
248  showMainViewCtl->createMenuEntry(windowMenu);
249  showInvMassDialog->createMenuEntry(windowMenu);
250 
251  TGPopupMenu *helpMenu = new TGPopupMenu(gClient->GetRoot());
252  menuBar->AddPopup("Help", helpMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
253  help->createMenuEntry(helpMenu);
254  keyboardShort->createMenuEntry(helpMenu);
255  helpMenu->AddSeparator();
256  helpGL->createMenuEntry(helpMenu);
257 
258  // colors
259  menuBar->SetBackgroundColor(backgroundColor);
260  TIter next(menuBar->GetTitles());
261  TGMenuTitle *title;
262  while ((title = (TGMenuTitle *)next()))
263  title->SetTextColor(textColor);
264 
265  menuTopFrame->AddFrame(menuBar, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
266 
267 
268  AddFrame(menuTopFrame, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
269 
270  // !!!! MT Line separating menu from other window components.
271  // I would even remove it and squeeze the navigation buttons up.
272  AddFrame(new TGFrame(this, 1, 1, kChildFrame, 0x503020),
273  new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
274 
275  m_statBar = new TGStatusBar(this, this->GetWidth(), 12);
276  AddFrame(m_statBar, new TGLayoutHints(kLHintsBottom | kLHintsExpandX));
277 
278  TGHorizontalFrame *fullbar = new TGHorizontalFrame(this, this->GetWidth(), 30,0, backgroundColor);
279 
280  /**************************************************************************/
281  // controls
282 
283  TGCompositeFrame* controlFrame = new TGVerticalFrame(fullbar, 10, 20, 0, backgroundColor);
284 
285  TGCompositeFrame* buttonFrame = new TGHorizontalFrame(controlFrame, 10, 10, 0, backgroundColor);
286  TImage *imgBtn = TImage::Open(FWCheckBoxIcon::coreIcondir()+"slider-bg-up.png");
287  buttonFrame->SetBackgroundPixmap(imgBtn->GetPixmap());
288 
289 
290  goToFirst->createCustomIconsButton(buttonFrame,
291  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-gotofirst.png"),
292  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-gotofirst-over.png"),
293  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-gotofirst-disabled.png"),
294  new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 4, 3, 10, 0));
295 
296  playEventsBack->createCustomIconsButton(buttonFrame,
297  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-backward.png"),
298  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-backward-over.png"),
299  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-backward-disabled.png"),
300  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-pause.png"),
301  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-pause-over.png"),
302  new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
303 
304  previousEvent->createCustomIconsButton(buttonFrame,
305  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-stepback.png"),
306  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-stepback-over.png"),
307  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-stepback-disabled.png"),
308  new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
309 
310  nextEvent->createCustomIconsButton(buttonFrame,
311  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-stepforward.png"),
312  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-stepforward-over.png"),
313  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-stepforward-disabled.png"),
314  new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
315 
316 
317  playEvents->createCustomIconsButton(buttonFrame,
318  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-forward.png"),
319  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-forward-over.png"),
320  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-forward-disabled.png"),
321  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-pause.png"),
322  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-pause-over.png"),
323  new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
324 
325  goToLast->createCustomIconsButton(buttonFrame,
326  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-gotolast.png"),
327  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-gotolast-over.png"),
328  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"button-gotolast-disabled.png"),
329  new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
330 
331  controlFrame->AddFrame(buttonFrame, new TGLayoutHints(kLHintsTop, 10, 0, 0, 0));
332 
333  /**************************************************************************/
334 
335  TGHorizontalFrame* sliderFrame = new TGHorizontalFrame(controlFrame, 10, 10, 0, backgroundColor);
336  TImage *imgSld = TImage::Open(FWCheckBoxIcon::coreIcondir()+"slider-bg-down.png");
337  sliderFrame->SetBackgroundPixmap(imgSld->GetPixmap());
338  TString sldBtn = FWCheckBoxIcon::coreIcondir() +"slider-button.png";
339 
340  m_delaySlider = new TGHSlider(sliderFrame, 109, kSlider1 | kScaleNo);
341  sliderFrame->AddFrame(m_delaySlider, new TGLayoutHints(kLHintsTop | kLHintsLeft, 39, 8, 1, 3));
342  m_delaySlider->SetRange(0, 10000);
343  m_delaySlider->SetPosition(0);
344  m_delaySlider->SetBackgroundColor(0x1a1a1a);
345  m_delaySlider->ChangeSliderPic(sldBtn);
346 
347  controlFrame->AddFrame(sliderFrame, new TGLayoutHints(kLHintsTop, 10, 0, 0, 0));
348 
349  fullbar->AddFrame(controlFrame, new TGLayoutHints(kLHintsLeft, 2, 2, 5, 8));
350 
352  TQObject::Connect(m_delaySlider, "PositionChanged(Int_t)", "FWIntValueListenerBase", m_delaySliderListener, "setValue(Int_t)");
353 
354  //==============================================================================
355 
356  // delay label
357  {
358  TGVerticalFrame* delayFrame = new TGVerticalFrame(fullbar, 60, 10, 0, backgroundColor);
359 
360  TGLabel *label = new TGLabel(delayFrame, "Delay");
361  label->SetTextJustify(kTextCenterX);
362  label->SetTextColor(0xb3b3b3);
363  label->SetBackgroundColor(backgroundColor);
364  delayFrame->AddFrame(label, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 0, 0, 22, 0));
365 
366  TGHorizontalFrame *labFixed = new TGHorizontalFrame(delayFrame, 70, 20, kFixedSize, backgroundColor);
367  m_delayLabel = new TGLabel(labFixed, "0.0s");
368  m_delayLabel->SetBackgroundColor(backgroundColor);
369  m_delayLabel->SetTextJustify(kTextCenterX);
370  m_delayLabel->SetTextColor(0xffffff);
371  labFixed->AddFrame(m_delayLabel, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 0, 0, 0, 0));
372  delayFrame->AddFrame(labFixed, new TGLayoutHints(kLHintsLeft, 0, 4, 0, 0));
373 
374  fullbar->AddFrame(delayFrame, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
375  }
376 
377  //==============================================================================
378 
379  // text/num entries
380 
381  Int_t entryHeight = 22;
382  TGVerticalFrame *texts = new TGVerticalFrame(fullbar, 400, 10, 0, backgroundColor);
383 
384  // upper row
385  {
386  TGPack *runInfo = new TGPack(texts, 400, entryHeight, kFixedHeight);
387  runInfo->SetVertical(kFALSE);
388  runInfo->SetUseSplitters(kFALSE);
389  runInfo->SetBackgroundColor(backgroundColor);
390 
391  TGHorizontalFrame *rLeft = new TGHorizontalFrame(runInfo, 1, entryHeight);
392  makeFixedSizeLabel(rLeft, "Run", backgroundColor, 0xffffff, 26, entryHeight);
393  m_runEntry = new FWNumberEntryField(rLeft, -1, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAPositive);
394  rLeft->AddFrame(m_runEntry, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 0,8,0,0));
395  runInfo->AddFrameWithWeight(rLeft, nullptr, 0.28);
396 
397  TGHorizontalFrame *rMid = new TGHorizontalFrame(runInfo, 1, entryHeight);
398  makeFixedSizeLabel(rMid, "Lumi", backgroundColor, 0xffffff, 36, entryHeight);
399  m_lumiEntry = new FWNumberEntryField(rMid, -1, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAPositive);
400  rMid->AddFrame(m_lumiEntry, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 0,8,0,0));
401  runInfo->AddFrameWithWeight(rMid, nullptr, 0.32);
402 
403  TGHorizontalFrame *rRight = new TGHorizontalFrame(runInfo, 1, entryHeight);
404  makeFixedSizeLabel(rRight, "Event", backgroundColor, 0xffffff, 42, entryHeight);
405  m_eventEntry = new FWNumberEntryField(rRight, -1, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAPositive);
406  rRight->AddFrame(m_eventEntry, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 0,0,0,0));
407  runInfo->AddFrameWithWeight(rRight, nullptr, 0.4);
408 
409  texts->AddFrame(runInfo, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,0,4));
410  }
411 
412  // lower row
413  {
414  TGHorizontalFrame *filterFrame = new TGHorizontalFrame(texts, 400, entryHeight, 0, backgroundColor);
415 
416  // filter state Off
417  m_filterIcons[0] = fClient->GetPicture("unchecked_t.xpm");
418  m_filterIcons[1] = fClient->GetPicture("unchecked_t.xpm");
419  m_filterIcons[2] = fClient->GetPicture("unchecked_dis_t.xpm");
420 
421  // filter state On
422  m_filterIcons[3] = fClient->GetPicture("checked_t.xpm");
423  m_filterIcons[4] = fClient->GetPicture("checked_t.xpm");
424  m_filterIcons[5] = fClient->GetPicture("checked_dis_t.xpm");
425 
426  // filter withdrawn
427  m_filterIcons[6] = fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-ltgraybg.png");
428  m_filterIcons[7] = fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-ltgraybg-over.png");
429  m_filterIcons[8] = fClient->GetPicture(FWCheckBoxIcon::coreIcondir() + "icon-alert-ltgraybg.png");
430 
432  m_filterEnableBtn->SetBackgroundColor(backgroundColor);
433  m_filterEnableBtn->SetToolTipText("Enable/disable event filtering");
434  filterFrame->AddFrame(m_filterEnableBtn, new TGLayoutHints(kLHintsLeft, 4,0,3,0));
435 
436  m_filterShowGUIBtn = new TGTextButton(filterFrame,"Event filtering is OFF");
437  m_filterShowGUIBtn->ChangeOptions(kRaisedFrame);
438  m_filterShowGUIBtn->SetBackgroundColor(backgroundColor);
439  m_filterShowGUIBtn->SetTextColor(0xFFFFFF);
440  m_filterShowGUIBtn->SetToolTipText("Edit filters");
441  filterFrame->AddFrame(m_filterShowGUIBtn, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 6,7,0,0));
442 
443  texts->AddFrame(filterFrame, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,4,0));
444  }
445 
446  fullbar->AddFrame(texts, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 5, 5, 12, 0));
447 
448  //==============================================================================
449 
450  TGVerticalFrame *texts2 = new TGVerticalFrame(fullbar, 200, 44, kFixedSize, backgroundColor);
451 
452  // time
453  m_timeText = new TGLabel(texts2, "...");
454  m_timeText->SetTextJustify(kTextLeft);
455  m_timeText->SetTextColor(0xffffff);
456  m_timeText->SetBackgroundColor(backgroundColor);
457  texts2->AddFrame(m_timeText, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,0,1));
458 
459  fullbar->AddFrame(texts2, new TGLayoutHints(kLHintsLeft, 5, 5, 16, 5));
460 
461  //==============================================================================
462 
463  // logo
464  {
465  TGVerticalFrame* parentLogoFrame = new TGVerticalFrame(fullbar, 70, 53, kFixedSize);
466  parentLogoFrame->SetBackgroundColor(backgroundColor);
467  fullbar->AddFrame(parentLogoFrame, new TGLayoutHints(kLHintsRight | kLHintsCenterY));
468 
469  TGVerticalFrame* logoFrame = new TGVerticalFrame(parentLogoFrame, 53, 53, kFixedSize);
470  TImage *logoImg = TImage::Open(FWCheckBoxIcon::coreIcondir() + "CMSRedOnBlackThick.png");
471  logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
472  parentLogoFrame->AddFrame(logoFrame, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 0, 14, 0, 0));
473  }
474  {
475  TGCompositeFrame *logoFrame = new TGCompositeFrame(this, 61, 23, kFixedSize | kHorizontalFrame, backgroundColor);
476  FWCustomIconsButton *infoBut =
477  new FWCustomIconsButton(logoFrame, fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"fireworksSmallGray.png"),
478  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"fireworksSmallGray-green.png"),
479  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"fireworksSmallGray-red.png"),
480  fClient->GetPicture(FWCheckBoxIcon::coreIcondir()+"fireworksSmallGray-red.png"));
481  logoFrame->AddFrame(infoBut);
482  infoBut->Connect("Clicked()", "CmsShowMainFrame", this, "showFWorksInfo()");
483  //TImage *logoImg = TImage::Open( FWCheckBoxIcon::coreIcondir() + "fireworksSmallGray.png");
484  //logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
485  menuTopFrame->AddFrame(logoFrame, new TGLayoutHints(kLHintsRight | kLHintsBottom, 0, 13, 3, 1));
486  }
487 
488  //==============================================================================
489 
490  AddFrame(fullbar, new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
491 
492  //Start disabled
493  goToFirst->disable();
494  goToLast->disable();
495  previousEvent->disable();
496  nextEvent->disable();
497  playEvents->disable();
498  playEventsBack->disable();
499  loop->disable();
500 
501  //NOTE: There appears to be a bug in ROOT such that creating a menu item and setting it as
502  // disabled immediately is ignored. Therefore we have to wait till here to actually get ROOT
503  // to disable these menu items
504  undo->disable();
505  redo->disable();
506  cut->disable();
507  copy->disable();
508  paste->disable();
509 
510  //==============================================================================
511 
512  FWPack *csArea = new FWPack(this);
513  csArea->SetVertical(kFALSE);
514 
515  TGCompositeFrame *cf = m_manager->createList(csArea);
516  csArea->AddFrameWithWeight(cf, nullptr, 20);
517 
518  TEveCompositeFrameInPack *slot = new TEveCompositeFrameInPack(csArea, nullptr, csArea);
519  csArea->AddFrameWithWeight(slot, nullptr, 80);
520  TEveWindowSlot *ew_slot = TEveWindow::CreateDefaultWindowSlot();
521  ew_slot->PopulateEmptyFrame(slot);
522  m_manager->createViews(ew_slot);
523 
524  AddFrame(csArea,new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 2));
525  csArea->MapSubwindows();
526 
527  SetWindowName("cmsShow");
528 }
const std::string sKeyboardShort
Definition: ActionsList.cc:46
TGVerticalFrame * createList(TGCompositeFrame *p)
static const TString & coreIcondir()
const std::string sSavePartialConfig
Definition: ActionsList.cc:21
FWNumberEntryField * m_lumiEntry
const std::string sShowCommonInsp
Definition: ActionsList.cc:30
const std::string sHelp
Definition: ActionsList.cc:45
const std::string sCut
Definition: ActionsList.cc:35
const std::string sSavePartialConfigAs
Definition: ActionsList.cc:22
const double w
Definition: UKUtility.cc:23
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
def copy(args, dbName)
void createViews(TEveWindowSlot *slot)
const std::string sBackgroundColor
Definition: ActionsList.cc:31
const std::string sPlayEvents
Definition: ActionsList.cc:7
FWGUIManager * m_manager
FWCustomIconsButton * m_filterEnableBtn
const std::string sOpenData
Definition: ActionsList.cc:12
FWIntValueListener * m_delaySliderListener
const std::string sRedo
Definition: ActionsList.cc:34
void createCustomIconsButton(TGCompositeFrame *p, const TGPicture *upPic, const TGPicture *downPic, const TGPicture *disabledPic, const TGPicture *upRunningPic, const TGPicture *downRunningPic, TGLayoutHints *l=nullptr, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), UInt_t option=0)
const std::string sSaveConfigAs
Definition: ActionsList.cc:18
void disable()
Definition: CSGAction.cc:289
CSGContinuousAction * m_playEventsBack
CSGAction * m_nextEvent
const std::string sNextEvent
Definition: ActionsList.cc:5
TGSlider * m_delaySlider
const std::string sSaveConfig
Definition: ActionsList.cc:17
char const * label
const TGPicture * m_filterIcons[9]
const std::string sAppendData
Definition: ActionsList.cc:13
void setToolTip(const std::string &tip)
Definition: CSGAction.cc:116
CSGContinuousAction * m_loopAction
TGMainFrame * m_fworksAbout
FWNumberEntryField * m_eventEntry
const std::string sShowAddCollection
Definition: ActionsList.cc:42
const std::string sGotoLastEvent
Definition: ActionsList.cc:4
TGPopupMenu * m_newViewerMenu
const std::string sExportImage
Definition: ActionsList.cc:25
const std::string sAutoRewind
Definition: ActionsList.cc:10
void createMenuEntry(TGPopupMenu *menu)
Definition: CSGAction.cc:213
const std::string sShowMainViewCtl
Definition: ActionsList.cc:41
FWNumberEntryField * m_runEntry
const std::string sPlayEventsBack
Definition: ActionsList.cc:8
const std::string sShowObjInsp
Definition: ActionsList.cc:39
CSGAction * m_previousEvent
const std::string sGotoFirstEvent
Definition: ActionsList.cc:3
const std::string sCopy
Definition: ActionsList.cc:36
CSGAction * m_goToLast
const std::string sShowInvMassDialog
Definition: ActionsList.cc:43
const std::string sShowEventDisplayInsp
Definition: ActionsList.cc:40
const std::string sPreviousEvent
Definition: ActionsList.cc:6
CSGContinuousAction * m_playEvents
CSGAction * m_goToFirst
const std::string sLoadConfig
Definition: ActionsList.cc:16
FWCustomIconsButton * createCustomIconsButton(TGCompositeFrame *p, const TGPicture *upPic, const TGPicture *downPic, const TGPicture *disabledPic, TGLayoutHints *l=nullptr, Int_t id=-1, GContext_t norm=TGButton::GetDefaultGC()(), UInt_t option=0)
Definition: CSGAction.cc:162
void makeFixedSizeLabel(TGHorizontalFrame *p, const char *txt, UInt_t bgCol, UInt_t txtCol, Int_t width, Int_t height)
void createShortcut(UInt_t key, const char *mod, int windowID)
Definition: CSGAction.cc:182
const std::string sExportAllImages
Definition: ActionsList.cc:26
const std::string sPaste
Definition: ActionsList.cc:37
const std::string sQuit
Definition: ActionsList.cc:28
TGTextButton * m_filterShowGUIBtn
const std::string sHelpGL
Definition: ActionsList.cc:47
const std::string sLoadPartialConfig
Definition: ActionsList.cc:20
const std::string sUndo
Definition: ActionsList.cc:33
TGStatusBar * m_statBar
const std::string sSearchFiles
Definition: ActionsList.cc:14
CmsShowMainFrame::~CmsShowMainFrame ( )
override

Definition at line 535 of file CmsShowMainFrame.cc.

535  {
536  Cleanup();
537 }
CmsShowMainFrame::CmsShowMainFrame ( const CmsShowMainFrame )
private

Member Function Documentation

void CmsShowMainFrame::bindCSGActionKeys ( const TGMainFrame *  f) const

Definition at line 835 of file CmsShowMainFrame.cc.

References mps_fire::i, and CSGActionSupervisor::m_actionList.

Referenced by FWGUIManager::createEDIFrame(), FWGUIManager::createModelPopup(), FWGUIEventFilter::HandleKey(), FWGUIManager::setFrom(), FWGUIManager::showCommonPopup(), FWGUIManager::showInvMassDialog(), and FWGUISubviewArea::undock().

836 {
837  for (std::vector<CSGAction*>::const_iterator i = m_actionList.begin(); i != m_actionList.end(); ++i)
838  {
839  if ((*i)-> getKeycode())
840  f->BindKey(this, (*i)->getKeycode(), (*i)->getModcode());
841  }
842 }
std::vector< CSGAction * > m_actionList
double f[11][100]
CmsShowMainFrame::ClassDefOverride ( CmsShowMainFrame  ,
 
)
void CmsShowMainFrame::clearStatusBar ( )

Definition at line 669 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::clearStatus().

670 {
671  m_statBar->SetText("", 0);
672  //don't process immediately since we want this on the event queue
673  // since results of the last action may still be happening
674 }
TGStatusBar * m_statBar
void CmsShowMainFrame::CloseWindow ( )
override

Definition at line 584 of file CmsShowMainFrame.cc.

References CSGAction::activated, CSGActionSupervisor::getAction(), and cmsshow::sQuit.

585 {
587 }
sigc::signal< void > activated
Definition: CSGAction.h:88
CSGAction * getAction(const std::string &name)
const std::string sQuit
Definition: ActionsList.cc:28
CSGAction * CmsShowMainFrame::createNewViewerAction ( const std::string &  iActionName,
bool  seaprator 
)

Definition at line 556 of file CmsShowMainFrame.cc.

References mps_fire::action, CSGAction::createMenuEntry(), and m_newViewerMenu.

Referenced by FWGUIManager::FWGUIManager().

557 {
558  CSGAction* action(new CSGAction(this, iActionName.c_str()));
559  action->createMenuEntry(m_newViewerMenu);
560  if (separator) m_newViewerMenu->AddSeparator();
561  return action;
562 }
string separator
Definition: mps_merge.py:78
TGPopupMenu * m_newViewerMenu
void CmsShowMainFrame::enableActions ( bool  enable = true)
overridevirtual

Reimplemented from CSGActionSupervisor.

Definition at line 594 of file CmsShowMainFrame.cc.

References CSGActionSupervisor::enableActions(), m_eventEntry, m_filterEnableBtn, m_filterShowGUIBtn, m_lumiEntry, and m_runEntry.

Referenced by FWGUIManager::enableActions().

595 {
597 
598  m_runEntry->SetEnabled(enable);
599  m_lumiEntry->SetEnabled(enable);
600  m_eventEntry->SetEnabled(enable);
601  m_filterEnableBtn->SetEnabled(enable);
602  m_filterShowGUIBtn->SetEnabled(enable);
603 }
FWNumberEntryField * m_lumiEntry
virtual void enableActions(bool enable=true)
FWCustomIconsButton * m_filterEnableBtn
FWNumberEntryField * m_eventEntry
FWNumberEntryField * m_runEntry
TGTextButton * m_filterShowGUIBtn
void CmsShowMainFrame::enableComplexNavigation ( bool  enable = true)

To disable GUI to jump from event to another, when this is not possible (i.e. when in full framework mode).

Definition at line 643 of file CmsShowMainFrame.cc.

References CSGAction::disable(), CSGAction::enable(), and m_goToLast.

644 {
645  if (enable)
646  m_goToLast->enable();
647  else
648  m_goToLast->disable();
649 }
void enable()
Definition: CSGAction.cc:284
void disable()
Definition: CSGAction.cc:289
CSGAction * m_goToLast
void CmsShowMainFrame::enableNavigatorControls ( )

Definition at line 573 of file CmsShowMainFrame.cc.

References CSGAction::enable(), m_goToFirst, m_goToLast, m_loopAction, m_nextEvent, m_playEvents, m_playEventsBack, and m_previousEvent.

Referenced by CmsShowMain::checkPosition().

574 {
575  m_nextEvent->enable();
577  m_goToFirst->enable();
578  m_goToLast->enable();
579  m_playEvents->enable();
581  m_loopAction->enable();
582 }
void enable()
Definition: CSGAction.cc:284
CSGContinuousAction * m_playEventsBack
CSGAction * m_nextEvent
CSGContinuousAction * m_loopAction
CSGAction * m_previousEvent
CSGAction * m_goToLast
CSGContinuousAction * m_playEvents
CSGAction * m_goToFirst
void CmsShowMainFrame::enableNext ( bool  enable = true)

Definition at line 623 of file CmsShowMainFrame.cc.

References CSGAction::disable(), CSGAction::enable(), m_goToLast, m_nextEvent, m_playEvents, and CSGContinuousAction::stop().

Referenced by FWGUIManager::disableNext().

624 {
625  if (m_nextEvent != nullptr) {
626  if (enable) {
627  m_nextEvent->enable();
628  m_goToLast->enable();
629  m_playEvents->enable();
630  } else {
631  m_nextEvent->disable();
632  m_goToLast->disable();
634  m_playEvents->stop();
635  }
636  }
637 }
void enable()
Definition: CSGAction.cc:284
void disable()
Definition: CSGAction.cc:289
CSGAction * m_nextEvent
CSGAction * m_goToLast
CSGContinuousAction * m_playEvents
void CmsShowMainFrame::enablePrevious ( bool  enable = true)

Definition at line 606 of file CmsShowMainFrame.cc.

References CSGAction::disable(), CSGAction::enable(), m_goToFirst, m_playEventsBack, m_previousEvent, and CSGContinuousAction::stop().

Referenced by FWGUIManager::disablePrevious().

607 {
608  if (m_previousEvent != nullptr) {
609  if (enable) {
611  m_goToFirst->enable();
613  } else {
615  m_goToFirst->disable();
618  }
619  }
620 }
void enable()
Definition: CSGAction.cc:284
void disable()
Definition: CSGAction.cc:289
CSGContinuousAction * m_playEventsBack
CSGAction * m_previousEvent
CSGAction * m_goToFirst
float CmsShowMainFrame::getSummaryViewWeight ( ) const

Definition at line 863 of file CmsShowMainFrame.cc.

References timeUnitHelper::pack().

Referenced by FWGUIManager::addTo().

864 {
865  TGFrameElement* fe = (TGFrameElement*)GetList()->Last();
866  TGPack* pack = (TGPack*)(fe->fFrame);
867 
868  TGFrameElementPack* fep = (TGFrameElementPack*)pack->GetList()->At(1);
869  return fep->fWeight;
870 
871 }
def pack(high, low)
Bool_t CmsShowMainFrame::HandleKey ( Event_t *  event)
override

Definition at line 689 of file CmsShowMainFrame.cc.

References CSGActionSupervisor::getListOfActions(), playEventsAction(), playEventsBackwardsAction(), and CSGContinuousAction::switchMode().

689  {
690 
691  if (event->fType == kGKeyPress) {
692  const std::vector<CSGAction*>& alist = getListOfActions();
693  std::vector<CSGAction*>::const_iterator it_act;
694  Int_t keycode;
695  Int_t modcode;
696  for (it_act = alist.begin(); it_act != alist.end(); ++it_act) {
697  keycode = (*it_act)->getKeycode();
698  modcode = (*it_act)->getModcode();
699  if ((event->fCode == (UInt_t)keycode) &&
700  ((event->fState == (UInt_t)modcode) ||
701  (event->fState == (UInt_t)(modcode | kKeyMod2Mask)) ||
702  (event->fState == (UInt_t)(modcode | kKeyLockMask)) ||
703  (event->fState == (UInt_t)(modcode | kKeyMod2Mask | kKeyLockMask)))) {
704  (*it_act)->activated.emit();
705  // return kTRUE;
706  return false;
707  }
708  }
709 
710  // special case is --live option where Space key is grabbed
711  static UInt_t spacecode = gVirtualX->KeysymToKeycode((int)kKey_Space);
712  if (event->fCode == spacecode && event->fState == 0 ) {
713  if (playEventsAction()->isRunning() )
715  else if (playEventsBackwardsAction()->isRunning() )
717  }
718  }
719  return kFALSE;
720 }
CSGContinuousAction * playEventsBackwardsAction() const
const std::vector< CSGAction * > & getListOfActions() const
CSGContinuousAction * playEventsAction() const
Definition: event.py:1
void CmsShowMainFrame::HandleMenu ( Int_t  id)
overridevirtual

Reimplemented from CSGActionSupervisor.

Definition at line 676 of file CmsShowMainFrame.cc.

References fwLog, and fwlog::kInfo.

676  {
677  switch(id) {
678  case 1:
679  {
680  gApplication->Terminate(0);
681  }
682  break;
683  default:
684  fwLog(fwlog::kInfo) << "Invalid menu id\n";
685  break;
686  }
687 }
#define fwLog(_level_)
Definition: fwLog.h:50
void CmsShowMainFrame::loadEvent ( const edm::EventBase event)

Definition at line 564 of file CmsShowMainFrame.cc.

References edm::EventID::event(), fireworks::getLocalTime(), edm::EventBase::id(), edm::EventID::luminosityBlock(), m_eventEntry, m_lumiEntry, m_runEntry, m_timeText, edm::EventID::run(), FWNumberEntryField::SetUIntNumber(), and FWNumberEntryField::SetULong64Number().

Referenced by FWGUIManager::eventChangedCallback().

565 {
566  m_runEntry ->SetUIntNumber(event.id().run());
569 
570  m_timeText->SetText( fireworks::getLocalTime( event ).c_str() );
571 }
RunNumber_t run() const
Definition: EventID.h:39
FWNumberEntryField * m_lumiEntry
EventNumber_t event() const
Definition: EventID.h:41
virtual void SetUIntNumber(UInt_t n)
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:40
virtual void SetULong64Number(ULong64_t n)
FWNumberEntryField * m_eventEntry
FWNumberEntryField * m_runEntry
edm::EventID id() const
Definition: EventBase.h:60
std::string getLocalTime(const edm::EventBase &event)
CSGContinuousAction* CmsShowMainFrame::loopAction ( ) const
inline

Definition at line 90 of file CmsShowMainFrame.h.

Referenced by FWGUIManager::loopAction().

90  {
91  return m_loopAction;
92  }
CSGContinuousAction * m_loopAction
void CmsShowMainFrame::makeFixedSizeLabel ( TGHorizontalFrame *  p,
const char *  txt,
UInt_t  bgCol,
UInt_t  txtCol,
Int_t  width,
Int_t  height 
)
private

Definition at line 731 of file CmsShowMainFrame.cc.

References label.

Referenced by CmsShowMainFrame().

734 {
735  // Utility function.
736 
737 
738  p->SetBackgroundColor(bgCol);
739  TGCompositeFrame *lframe = new TGHorizontalFrame(p, width, height, kFixedSize, bgCol);
740  TGLabel* label = new TGLabel(lframe, txt);
741  label->SetBackgroundColor(bgCol);
742  label->SetTextColor(txtCol);
743  lframe->AddFrame(label, new TGLayoutHints(kLHintsRight | kLHintsTop, 0, 4));
744  p->AddFrame(lframe, new TGLayoutHints(kLHintsLeft, 0, 0, 3, 0));
745 }
char const * label
bool CmsShowMainFrame::nextIsEnabled ( )

Definition at line 652 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_nextEvent.

653 {
654  return m_nextEvent->isEnabled();
655 }
CSGAction * m_nextEvent
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:308
const CmsShowMainFrame& CmsShowMainFrame::operator= ( const CmsShowMainFrame )
private
CSGContinuousAction* CmsShowMainFrame::playEventsAction ( ) const
inline

Definition at line 87 of file CmsShowMainFrame.h.

Referenced by HandleKey(), and FWGUIManager::playEventsAction().

87  {
88  return m_playEvents;
89  }
CSGContinuousAction * m_playEvents
CSGContinuousAction* CmsShowMainFrame::playEventsBackwardsAction ( ) const
inline

Definition at line 94 of file CmsShowMainFrame.h.

References f, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by HandleKey(), and FWGUIManager::playEventsBackwardsAction().

94  {
95  return m_playEventsBack;
96  }
CSGContinuousAction * m_playEventsBack
bool CmsShowMainFrame::previousIsEnabled ( )

Definition at line 658 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_previousEvent.

659 {
660  return m_previousEvent->isEnabled();
661 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:308
CSGAction * m_previousEvent
void CmsShowMainFrame::quit ( )

Definition at line 589 of file CmsShowMainFrame.cc.

References CSGAction::activated, CSGActionSupervisor::getAction(), and cmsshow::sQuit.

Referenced by CmsShowMainFrame().

589  {
591 }
sigc::signal< void > activated
Definition: CSGAction.h:88
CSGAction * getAction(const std::string &name)
const std::string sQuit
Definition: ActionsList.cc:28
void CmsShowMainFrame::setPlayDelayGUI ( Float_t  val,
Bool_t  sliderChanged 
)

Definition at line 723 of file CmsShowMainFrame.cc.

References m_delayLabel, and m_delaySlider.

Referenced by FWGUIManager::delaySliderChanged(), and FWGUIManager::setDelayBetweenEvents().

724 {
725  m_delayLabel->SetText(Form("%.1fs", val));
726  if (sliderChanged)
727  m_delaySlider->SetPosition(Int_t(val*1000));
728 }
TGSlider * m_delaySlider
void CmsShowMainFrame::setSummaryViewWeight ( float  x)

Definition at line 845 of file CmsShowMainFrame.cc.

References timeUnitHelper::pack(), and x.

Referenced by FWGUIManager::setFrom().

846 {
847 
848  TGFrameElement* fe = (TGFrameElement*) GetList()->Last();
849  FWPack* pack = (FWPack*)(fe->fFrame);
850 
851  TGFrameElementPack* fep;
852  fep = (TGFrameElementPack*)pack->GetList()->At(1);
853  fep->fWeight = x;
854 
855  fep = (TGFrameElementPack*)pack->GetList()->At(3);
856  fep->fWeight = 100 -x;
857 
858  pack->ResizeExistingFrames();
859  pack->Layout();
860 }
def pack(high, low)
void CmsShowMainFrame::showFWorksInfo ( )

Definition at line 759 of file CmsShowMainFrame.cc.

References FWCheckBoxIcon::coreIcondir(), label, mps_splice::line, m_fworksAbout, edmIntegrityCheck::pool, fireworks::setPath(), and AlCaHLTBitMon_QueryRunRegistry::string.

760 {
761  if (m_fworksAbout == nullptr)
762  {
763  UInt_t ww = 280, hh = 190;
764  int number_of_lines = 0;
765  int fontSize = 8;
766  TString infoText;
767  if (gSystem->Getenv("CMSSW_VERSION"))
768  {
769  infoText = "Version ";
770  infoText += gSystem->Getenv("CMSSW_VERSION");
771  infoText +="\n";
772  number_of_lines += 1;
773  }
774  else
775  {
776  TString infoFileName("/data/version.txt");
777  fireworks::setPath(infoFileName);
779  std::ifstream infoFile(infoFileName);
780  while (std::getline(infoFile, line))
781  {
782  ++number_of_lines;
783  infoText += line.c_str();
784  infoText += "\n";
785  }
786  infoFile.close();
787  }
788  infoText += "\nIt works or we fix it for free!\nhn-cms-visualization@cern.ch\n";
789 
790  hh = 130 + 2* fontSize*(number_of_lines + 1);
791 
792  m_fworksAbout = new InfoFrame(gClient->GetRoot(), ww, hh, kVerticalFrame | kFixedSize);
793  m_fworksAbout->SetWMSizeHints(ww, hh, ww, hh, 0, 0);
794  m_fworksAbout->SetBackgroundColor(0x2f2f2f);
795 
796  TGFrame* logoFrame = new TGFrame(m_fworksAbout, 140, 48, kFixedSize);
797  TImage *logoImg = TImage::Open(FWCheckBoxIcon::coreIcondir()+"logo-fireworks.png");
798  logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
799  m_fworksAbout->AddFrame(logoFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 0, 0, 16, 0));
800 
801  TGLabel* label = new TGLabel(m_fworksAbout, infoText);
802  label->SetBackgroundColor(0x2f2f2f);
803  label->SetForegroundColor(0xffffff);
804 
805  FontStruct_t defaultFontStruct = label->GetDefaultFontStruct();
806  try
807  {
808  TGFontPool *pool = gClient->GetFontPool();
809  TGFont* defaultFont = pool->GetFont(defaultFontStruct);
810  FontAttributes_t attributes = defaultFont->GetFontAttributes();
811  label->SetTextFont(pool->GetFont(attributes.fFamily, fontSize,
812  attributes.fWeight, attributes.fSlant));
813  }
814  catch(...)
815  {
816  }
817 
818  m_fworksAbout->AddFrame(label, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 0, 0, 12, 0));
819 
820  TGTextButton* btn = new TGTextButton(m_fworksAbout, " OK ");
821  btn->SetBackgroundColor(0x2f2f2f);
822  btn->SetForegroundColor(0xffffff);
823  m_fworksAbout->AddFrame(btn, new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 0, 0, 0, 12));
824  btn->Connect("Clicked()", "TGMainFrame", m_fworksAbout, "CloseWindow()");
825 
826  m_fworksAbout->MapSubwindows();
827  m_fworksAbout->Layout();
828  }
829 
830  m_fworksAbout->MapRaised();
831 }
static const TString & coreIcondir()
char const * label
TGMainFrame * m_fworksAbout
void setPath(TString &v)
Definition: fwPaths.cc:15
void CmsShowMainFrame::updateStatusBar ( const char *  status)

Definition at line 663 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::updateStatus().

663  {
664  m_statBar->SetText(status, 0);
665  //force the status bar to update its image
666  gClient->ProcessEventsFor(m_statBar);
667 }
TGStatusBar * m_statBar

Friends And Related Function Documentation

friend class FWGUIManager
friend

Definition at line 61 of file CmsShowMainFrame.h.

Member Data Documentation

TGLabel* CmsShowMainFrame::m_delayLabel
private

Definition at line 145 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and setPlayDelayGUI().

TGSlider* CmsShowMainFrame::m_delaySlider
private

Definition at line 144 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and setPlayDelayGUI().

FWIntValueListener* CmsShowMainFrame::m_delaySliderListener
protected

Definition at line 115 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and FWGUIManager::FWGUIManager().

FWNumberEntryField* CmsShowMainFrame::m_eventEntry
protected
FWCustomIconsButton* CmsShowMainFrame::m_filterEnableBtn
protected
const TGPicture* CmsShowMainFrame::m_filterIcons[9]
protected

Definition at line 117 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and FWGUIManager::setFilterButtonIcon().

TGTextButton* CmsShowMainFrame::m_filterShowGUIBtn
protected
TGMainFrame* CmsShowMainFrame::m_fworksAbout
private

Definition at line 142 of file CmsShowMainFrame.h.

Referenced by showFWorksInfo().

CSGAction* CmsShowMainFrame::m_fworksInfo
private

Definition at line 137 of file CmsShowMainFrame.h.

CSGAction* CmsShowMainFrame::m_goToFirst
private

Definition at line 134 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), enableNavigatorControls(), and enablePrevious().

CSGAction* CmsShowMainFrame::m_goToLast
private
CSGContinuousAction* CmsShowMainFrame::m_loopAction
private

Definition at line 140 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and enableNavigatorControls().

FWNumberEntryField* CmsShowMainFrame::m_lumiEntry
protected
FWGUIManager* CmsShowMainFrame::m_manager
private

Definition at line 129 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame().

TGPopupMenu* CmsShowMainFrame::m_newViewerMenu
private

Definition at line 149 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and createNewViewerAction().

CSGAction* CmsShowMainFrame::m_nextEvent
private
CSGAction* CmsShowMainFrame::m_playDelay
private

Definition at line 136 of file CmsShowMainFrame.h.

CSGContinuousAction* CmsShowMainFrame::m_playEvents
private

Definition at line 138 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), enableNavigatorControls(), and enableNext().

CSGContinuousAction* CmsShowMainFrame::m_playEventsBack
private

Definition at line 139 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), enableNavigatorControls(), and enablePrevious().

CSGAction* CmsShowMainFrame::m_previousEvent
private
FWNumberEntryField* CmsShowMainFrame::m_runEntry
protected
TGStatusBar* CmsShowMainFrame::m_statBar
private

Definition at line 147 of file CmsShowMainFrame.h.

Referenced by clearStatusBar(), CmsShowMainFrame(), and updateStatusBar().

TGLabel* CmsShowMainFrame::m_timeText
private

Definition at line 131 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and loadEvent().

Long_t CmsShowMainFrame::m_tooltipDelay
private

Definition at line 130 of file CmsShowMainFrame.h.