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 75 of file CmsShowMainFrame.cc.

References filterCSVwithJSON::copy, FWCheckBoxIcon::coreIcondir(), CSGContinuousAction::createCustomIconsButton(), CSGAction::createCustomIconsButton(), FWGUIManager::createList(), CSGAction::createMenuEntry(), CSGAction::createShortcut(), FWGUIManager::createViews(), TkAlMuonSelectors_cfi::cut, CSGAction::disable(), hcaldqm::fClient, writedatasetfile::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 overlapproblemtsosanalyzer_cfi::title.

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

Definition at line 533 of file CmsShowMainFrame.cc.

533 { Cleanup(); }
CmsShowMainFrame::CmsShowMainFrame ( const CmsShowMainFrame )
private

Member Function Documentation

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

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

780  {
781  for (std::vector<CSGAction *>::const_iterator i = m_actionList.begin(); i != m_actionList.end(); ++i) {
782  if ((*i)->getKeycode())
783  f->BindKey(this, (*i)->getKeycode(), (*i)->getModcode());
784  }
785 }
std::vector< CSGAction * > m_actionList
double f[11][100]
CmsShowMainFrame::ClassDefOverride ( CmsShowMainFrame  ,
 
)
void CmsShowMainFrame::clearStatusBar ( )

Definition at line 641 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::clearStatus().

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

Definition at line 577 of file CmsShowMainFrame.cc.

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

sigc::signal< void > activated
Definition: CSGAction.h:100
CSGAction * getAction(const std::string &name)
const std::string sQuit
Definition: ActionsList.cc:27
CSGAction * CmsShowMainFrame::createNewViewerAction ( const std::string &  iActionName,
bool  seaprator 
)

Definition at line 551 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::FWGUIManager().

551  {
552  CSGAction *action(new CSGAction(this, iActionName.c_str()));
553  action->createMenuEntry(m_newViewerMenu);
554  if (separator)
555  m_newViewerMenu->AddSeparator();
556  return action;
557 }
string separator
Definition: mps_merge.py:79
TGPopupMenu * m_newViewerMenu
void CmsShowMainFrame::enableActions ( bool  enable = true)
overridevirtual

Reimplemented from CSGActionSupervisor.

Definition at line 581 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::enableActions().

581  {
583 
584  m_runEntry->SetEnabled(enable);
585  m_lumiEntry->SetEnabled(enable);
586  m_eventEntry->SetEnabled(enable);
587  m_filterEnableBtn->SetEnabled(enable);
588  m_filterShowGUIBtn->SetEnabled(enable);
589 }
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 624 of file CmsShowMainFrame.cc.

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

624  {
625  if (enable)
626  m_goToLast->enable();
627  else
628  m_goToLast->disable();
629 }
void enable()
Definition: CSGAction.cc:268
void disable()
Definition: CSGAction.cc:273
CSGAction * m_goToLast
void CmsShowMainFrame::enableNavigatorControls ( )

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

567  {
568  m_nextEvent->enable();
570  m_goToFirst->enable();
571  m_goToLast->enable();
572  m_playEvents->enable();
574  m_loopAction->enable();
575 }
void enable()
Definition: CSGAction.cc:268
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 606 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::disableNext().

606  {
607  if (m_nextEvent != nullptr) {
608  if (enable) {
609  m_nextEvent->enable();
610  m_goToLast->enable();
611  m_playEvents->enable();
612  } else {
613  m_nextEvent->disable();
614  m_goToLast->disable();
616  m_playEvents->stop();
617  }
618  }
619 }
void enable()
Definition: CSGAction.cc:268
void disable()
Definition: CSGAction.cc:273
CSGAction * m_nextEvent
CSGAction * m_goToLast
CSGContinuousAction * m_playEvents
void CmsShowMainFrame::enablePrevious ( bool  enable = true)

Definition at line 591 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::disablePrevious().

591  {
592  if (m_previousEvent != nullptr) {
593  if (enable) {
595  m_goToFirst->enable();
597  } else {
599  m_goToFirst->disable();
602  }
603  }
604 }
void enable()
Definition: CSGAction.cc:268
void disable()
Definition: CSGAction.cc:273
CSGContinuousAction * m_playEventsBack
CSGAction * m_previousEvent
CSGAction * m_goToFirst
float CmsShowMainFrame::getSummaryViewWeight ( ) const

Definition at line 802 of file CmsShowMainFrame.cc.

References timeUnitHelper::pack().

Referenced by FWGUIManager::addTo().

802  {
803  TGFrameElement *fe = (TGFrameElement *)GetList()->Last();
804  TGPack *pack = (TGPack *)(fe->fFrame);
805 
806  TGFrameElementPack *fep = (TGFrameElementPack *)pack->GetList()->At(1);
807  return fep->fWeight;
808 }
def pack(high, low)
Bool_t CmsShowMainFrame::HandleKey ( Event_t *  event)
override

Definition at line 658 of file CmsShowMainFrame.cc.

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

658  {
659  if (event->fType == kGKeyPress) {
660  const std::vector<CSGAction *> &alist = getListOfActions();
661  std::vector<CSGAction *>::const_iterator it_act;
662  Int_t keycode;
663  Int_t modcode;
664  for (it_act = alist.begin(); it_act != alist.end(); ++it_act) {
665  keycode = (*it_act)->getKeycode();
666  modcode = (*it_act)->getModcode();
667  if ((event->fCode == (UInt_t)keycode) &&
668  ((event->fState == (UInt_t)modcode) || (event->fState == (UInt_t)(modcode | kKeyMod2Mask)) ||
669  (event->fState == (UInt_t)(modcode | kKeyLockMask)) ||
670  (event->fState == (UInt_t)(modcode | kKeyMod2Mask | kKeyLockMask)))) {
671  (*it_act)->activated.emit();
672  // return kTRUE;
673  return false;
674  }
675  }
676 
677  // special case is --live option where Space key is grabbed
678  static UInt_t spacecode = gVirtualX->KeysymToKeycode((int)kKey_Space);
679  if (event->fCode == spacecode && event->fState == 0) {
680  if (playEventsAction()->isRunning())
682  else if (playEventsBackwardsAction()->isRunning())
684  }
685  }
686  return kFALSE;
687 }
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 647 of file CmsShowMainFrame.cc.

References fwLog, and fwlog::kInfo.

647  {
648  switch (id) {
649  case 1: {
650  gApplication->Terminate(0);
651  } break;
652  default:
653  fwLog(fwlog::kInfo) << "Invalid menu id\n";
654  break;
655  }
656 }
#define fwLog(_level_)
Definition: fwLog.h:45
void CmsShowMainFrame::loadEvent ( const edm::EventBase event)

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

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

Definition at line 91 of file CmsShowMainFrame.h.

Referenced by FWGUIManager::loopAction().

91 { return m_loopAction; }
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 695 of file CmsShowMainFrame.cc.

References label.

Referenced by CmsShowMainFrame().

696  {
697  // Utility function.
698 
699  p->SetBackgroundColor(bgCol);
700  TGCompositeFrame *lframe = new TGHorizontalFrame(p, width, height, kFixedSize, bgCol);
701  TGLabel *label = new TGLabel(lframe, txt);
702  label->SetBackgroundColor(bgCol);
703  label->SetTextColor(txtCol);
704  lframe->AddFrame(label, new TGLayoutHints(kLHintsRight | kLHintsTop, 0, 4));
705  p->AddFrame(lframe, new TGLayoutHints(kLHintsLeft, 0, 0, 3, 0));
706 }
char const * label
bool CmsShowMainFrame::nextIsEnabled ( )

Definition at line 631 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_nextEvent.

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

Definition at line 90 of file CmsShowMainFrame.h.

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

90 { return m_playEvents; }
CSGContinuousAction * m_playEvents
CSGContinuousAction* CmsShowMainFrame::playEventsBackwardsAction ( ) const
inline

Definition at line 93 of file CmsShowMainFrame.h.

References f, and AlCaHLTBitMon_QueryRunRegistry::string.

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

93 { return m_playEventsBack; }
CSGContinuousAction * m_playEventsBack
bool CmsShowMainFrame::previousIsEnabled ( )

Definition at line 633 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_previousEvent.

633 { return m_previousEvent->isEnabled(); }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:288
CSGAction * m_previousEvent
void CmsShowMainFrame::quit ( )

Definition at line 579 of file CmsShowMainFrame.cc.

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

Referenced by CmsShowMainFrame().

sigc::signal< void > activated
Definition: CSGAction.h:100
CSGAction * getAction(const std::string &name)
const std::string sQuit
Definition: ActionsList.cc:27
void CmsShowMainFrame::setPlayDelayGUI ( Float_t  val,
Bool_t  sliderChanged 
)

Definition at line 689 of file CmsShowMainFrame.cc.

References m_delayLabel, and m_delaySlider.

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

689  {
690  m_delayLabel->SetText(Form("%.1fs", val));
691  if (sliderChanged)
692  m_delaySlider->SetPosition(Int_t(val * 1000));
693 }
TGSlider * m_delaySlider
void CmsShowMainFrame::setSummaryViewWeight ( float  x)

Definition at line 787 of file CmsShowMainFrame.cc.

References timeUnitHelper::pack(), and x.

Referenced by FWGUIManager::setFrom().

787  {
788  TGFrameElement *fe = (TGFrameElement *)GetList()->Last();
789  FWPack *pack = (FWPack *)(fe->fFrame);
790 
791  TGFrameElementPack *fep;
792  fep = (TGFrameElementPack *)pack->GetList()->At(1);
793  fep->fWeight = x;
794 
795  fep = (TGFrameElementPack *)pack->GetList()->At(3);
796  fep->fWeight = 100 - x;
797 
798  pack->ResizeExistingFrames();
799  pack->Layout();
800 }
def pack(high, low)
void CmsShowMainFrame::showFWorksInfo ( )

Definition at line 716 of file CmsShowMainFrame.cc.

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

716  {
717  if (m_fworksAbout == nullptr) {
718  UInt_t ww = 280, hh = 190;
719  int number_of_lines = 0;
720  int fontSize = 8;
721  TString infoText;
722  if (gSystem->Getenv("CMSSW_VERSION")) {
723  infoText = "Version ";
724  infoText += gSystem->Getenv("CMSSW_VERSION");
725  infoText += "\n";
726  number_of_lines += 1;
727  } else {
728  TString infoFileName("/data/version.txt");
729  fireworks::setPath(infoFileName);
731  std::ifstream infoFile(infoFileName);
732  while (std::getline(infoFile, line)) {
733  ++number_of_lines;
734  infoText += line.c_str();
735  infoText += "\n";
736  }
737  infoFile.close();
738  }
739  infoText += "\nIt works or we fix it for free!\nhn-cms-visualization@cern.ch\n";
740 
741  hh = 130 + 2 * fontSize * (number_of_lines + 1);
742 
743  m_fworksAbout = new InfoFrame(gClient->GetRoot(), ww, hh, kVerticalFrame | kFixedSize);
744  m_fworksAbout->SetWMSizeHints(ww, hh, ww, hh, 0, 0);
745  m_fworksAbout->SetBackgroundColor(0x2f2f2f);
746 
747  TGFrame *logoFrame = new TGFrame(m_fworksAbout, 140, 48, kFixedSize);
748  TImage *logoImg = TImage::Open(FWCheckBoxIcon::coreIcondir() + "logo-fireworks.png");
749  logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
750  m_fworksAbout->AddFrame(logoFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 0, 0, 16, 0));
751 
752  TGLabel *label = new TGLabel(m_fworksAbout, infoText);
753  label->SetBackgroundColor(0x2f2f2f);
754  label->SetForegroundColor(0xffffff);
755 
756  FontStruct_t defaultFontStruct = label->GetDefaultFontStruct();
757  try {
758  TGFontPool *pool = gClient->GetFontPool();
759  TGFont *defaultFont = pool->GetFont(defaultFontStruct);
760  FontAttributes_t attributes = defaultFont->GetFontAttributes();
761  label->SetTextFont(pool->GetFont(attributes.fFamily, fontSize, attributes.fWeight, attributes.fSlant));
762  } catch (...) {
763  }
764 
765  m_fworksAbout->AddFrame(label, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 0, 0, 12, 0));
766 
767  TGTextButton *btn = new TGTextButton(m_fworksAbout, " OK ");
768  btn->SetBackgroundColor(0x2f2f2f);
769  btn->SetForegroundColor(0xffffff);
770  m_fworksAbout->AddFrame(btn, new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 0, 0, 0, 12));
771  btn->Connect("Clicked()", "TGMainFrame", m_fworksAbout, "CloseWindow()");
772 
773  m_fworksAbout->MapSubwindows();
774  m_fworksAbout->Layout();
775  }
776 
777  m_fworksAbout->MapRaised();
778 }
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 635 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::updateStatus().

635  {
636  m_statBar->SetText(status, 0);
637  //force the status bar to update its image
638  gClient->ProcessEventsFor(m_statBar);
639 }
TGStatusBar * m_statBar

Friends And Related Function Documentation

friend class FWGUIManager
friend

Definition at line 63 of file CmsShowMainFrame.h.

Member Data Documentation

TGLabel* CmsShowMainFrame::m_delayLabel
private

Definition at line 140 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and setPlayDelayGUI().

TGSlider* CmsShowMainFrame::m_delaySlider
private

Definition at line 139 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and setPlayDelayGUI().

FWIntValueListener* CmsShowMainFrame::m_delaySliderListener
protected

Definition at line 112 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 114 of file CmsShowMainFrame.h.

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

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

Definition at line 137 of file CmsShowMainFrame.h.

Referenced by showFWorksInfo().

CSGAction* CmsShowMainFrame::m_fworksInfo
private

Definition at line 132 of file CmsShowMainFrame.h.

CSGAction* CmsShowMainFrame::m_goToFirst
private

Definition at line 129 of file CmsShowMainFrame.h.

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

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

Definition at line 135 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and enableNavigatorControls().

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

Definition at line 124 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame().

TGPopupMenu* CmsShowMainFrame::m_newViewerMenu
private

Definition at line 144 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and createNewViewerAction().

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

Definition at line 131 of file CmsShowMainFrame.h.

CSGContinuousAction* CmsShowMainFrame::m_playEvents
private

Definition at line 133 of file CmsShowMainFrame.h.

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

CSGContinuousAction* CmsShowMainFrame::m_playEventsBack
private

Definition at line 134 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 142 of file CmsShowMainFrame.h.

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

TGLabel* CmsShowMainFrame::m_timeText
private

Definition at line 126 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and loadEvent().

Long_t CmsShowMainFrame::m_tooltipDelay
private

Definition at line 125 of file CmsShowMainFrame.h.