CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
 ClassDef (CmsShowMainFrame, 0)
 
void clearStatusBar ()
 
virtual void CloseWindow ()
 
 CmsShowMainFrame (const TGWindow *p=0, UInt_t w=1, UInt_t h=1, FWGUIManager *m=0)
 
CSGActioncreateNewViewerAction (const std::string &iActionName, bool seaprator)
 
virtual void enableActions (bool enable=true)
 
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)
 
virtual void HandleMenu (Int_t id)
 
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)
 
virtual ~CmsShowMainFrame ()
 
- 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 = 0,
UInt_t  w = 1,
UInt_t  h = 1,
FWGUIManager m = 0 
)

Definition at line 73 of file CmsShowMainFrame.cc.

References filterCSVwithJSON::copy, FWCheckBoxIcon::coreIcondir(), CSGContinuousAction::createCustomIconsButton(), CSGAction::createCustomIconsButton(), FWGUIManager::createList(), CSGAction::createMenuEntry(), CSGAction::createShortcut(), FWGUIManager::createViews(), GOODCOLL_filter_cfg::cut, CSGAction::disable(), hcaldqm::fClient, mps_alisetup::help, diffTwoXMLs::label, cmsHarvester::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, and indexGen::title.

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

Definition at line 531 of file CmsShowMainFrame.cc.

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

Member Function Documentation

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

Definition at line 831 of file CmsShowMainFrame.cc.

References i, and CSGActionSupervisor::m_actionList.

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

832 {
833  for (std::vector<CSGAction*>::const_iterator i = m_actionList.begin(); i != m_actionList.end(); ++i)
834  {
835  if ((*i)-> getKeycode())
836  f->BindKey(this, (*i)->getKeycode(), (*i)->getModcode());
837  }
838 }
int i
Definition: DBlmapReader.cc:9
std::vector< CSGAction * > m_actionList
double f[11][100]
CmsShowMainFrame::ClassDef ( CmsShowMainFrame  ,
 
)
void CmsShowMainFrame::clearStatusBar ( )

Definition at line 665 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::clearStatus().

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

Definition at line 580 of file CmsShowMainFrame.cc.

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

581 {
583 }
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 552 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::FWGUIManager().

553 {
554  CSGAction* action(new CSGAction(this, iActionName.c_str()));
555  action->createMenuEntry(m_newViewerMenu);
556  if (separator) m_newViewerMenu->AddSeparator();
557  return action;
558 }
TGPopupMenu * m_newViewerMenu
void CmsShowMainFrame::enableActions ( bool  enable = true)
virtual

Reimplemented from CSGActionSupervisor.

Definition at line 590 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::enableActions().

591 {
593 
594  m_runEntry->SetEnabled(enable);
595  m_lumiEntry->SetEnabled(enable);
596  m_eventEntry->SetEnabled(enable);
597  m_filterEnableBtn->SetEnabled(enable);
598  m_filterShowGUIBtn->SetEnabled(enable);
599 }
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 639 of file CmsShowMainFrame.cc.

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

Referenced by FWFFLooper::autoLoadNewEvent(), FWFFLooper::checkPosition(), and FWFFLooper::stopPlaying().

640 {
641  if (enable)
642  m_goToLast->enable();
643  else
644  m_goToLast->disable();
645 }
void enable()
Definition: CSGAction.cc:284
void disable()
Definition: CSGAction.cc:289
CSGAction * m_goToLast
void CmsShowMainFrame::enableNavigatorControls ( )

Definition at line 569 of file CmsShowMainFrame.cc.

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

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

570 {
571  m_nextEvent->enable();
573  m_goToFirst->enable();
574  m_goToLast->enable();
575  m_playEvents->enable();
577  m_loopAction->enable();
578 }
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 619 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::disableNext().

620 {
621  if (m_nextEvent != 0) {
622  if (enable) {
623  m_nextEvent->enable();
624  m_goToLast->enable();
625  m_playEvents->enable();
626  } else {
627  m_nextEvent->disable();
628  m_goToLast->disable();
630  m_playEvents->stop();
631  }
632  }
633 }
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 602 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::disablePrevious().

603 {
604  if (m_previousEvent != 0) {
605  if (enable) {
607  m_goToFirst->enable();
609  } else {
611  m_goToFirst->disable();
614  }
615  }
616 }
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 859 of file CmsShowMainFrame.cc.

References timeUnitHelper::pack().

Referenced by FWGUIManager::addTo().

860 {
861  TGFrameElement* fe = (TGFrameElement*)GetList()->Last();
862  TGPack* pack = (TGPack*)(fe->fFrame);
863 
864  TGFrameElementPack* fep = (TGFrameElementPack*)pack->GetList()->At(1);
865  return fep->fWeight;
866 
867 }
Bool_t CmsShowMainFrame::HandleKey ( Event_t *  event)

Definition at line 685 of file CmsShowMainFrame.cc.

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

685  {
686 
687  if (event->fType == kGKeyPress) {
688  const std::vector<CSGAction*>& alist = getListOfActions();
689  std::vector<CSGAction*>::const_iterator it_act;
690  Int_t keycode;
691  Int_t modcode;
692  for (it_act = alist.begin(); it_act != alist.end(); ++it_act) {
693  keycode = (*it_act)->getKeycode();
694  modcode = (*it_act)->getModcode();
695  if ((event->fCode == (UInt_t)keycode) &&
696  ((event->fState == (UInt_t)modcode) ||
697  (event->fState == (UInt_t)(modcode | kKeyMod2Mask)) ||
698  (event->fState == (UInt_t)(modcode | kKeyLockMask)) ||
699  (event->fState == (UInt_t)(modcode | kKeyMod2Mask | kKeyLockMask)))) {
700  (*it_act)->activated.emit();
701  // return kTRUE;
702  return false;
703  }
704  }
705 
706  // special case is --live option where Space key is grabbed
707  static UInt_t spacecode = gVirtualX->KeysymToKeycode((int)kKey_Space);
708  if (event->fCode == spacecode && event->fState == 0 ) {
709  if (playEventsAction()->isRunning() )
711  else if (playEventsBackwardsAction()->isRunning() )
713  }
714  }
715  return kFALSE;
716 }
CSGContinuousAction * playEventsBackwardsAction() const
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
const std::vector< CSGAction * > & getListOfActions() const
CSGContinuousAction * playEventsAction() const
void CmsShowMainFrame::HandleMenu ( Int_t  id)
virtual

Reimplemented from CSGActionSupervisor.

Definition at line 672 of file CmsShowMainFrame.cc.

References fwLog, and fwlog::kInfo.

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

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

561 {
562  m_runEntry ->SetUIntNumber(event.id().run());
565 
566  m_timeText->SetText( fireworks::getLocalTime( event ).c_str() );
567 }
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:59
std::string getLocalTime(const edm::EventBase &event)
CSGContinuousAction* CmsShowMainFrame::loopAction ( ) const
inline

Definition at line 90 of file CmsShowMainFrame.h.

References m_loopAction.

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

References diffTwoXMLs::label.

Referenced by CmsShowMainFrame().

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

Definition at line 648 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_nextEvent.

649 {
650  return m_nextEvent->isEnabled();
651 }
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.

References m_playEvents.

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 m_playEventsBack.

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

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

Definition at line 654 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_previousEvent.

655 {
656  return m_previousEvent->isEnabled();
657 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:308
CSGAction * m_previousEvent
void CmsShowMainFrame::quit ( )

Definition at line 585 of file CmsShowMainFrame.cc.

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

Referenced by CmsShowMainFrame().

585  {
587 }
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 719 of file CmsShowMainFrame.cc.

References m_delayLabel, and m_delaySlider.

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

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

Definition at line 841 of file CmsShowMainFrame.cc.

References timeUnitHelper::pack(), and x.

Referenced by FWGUIManager::setFrom().

842 {
843 
844  TGFrameElement* fe = (TGFrameElement*) GetList()->Last();
845  FWPack* pack = (FWPack*)(fe->fFrame);
846 
847  TGFrameElementPack* fep;
848  fep = (TGFrameElementPack*)pack->GetList()->At(1);
849  fep->fWeight = x;
850 
851  fep = (TGFrameElementPack*)pack->GetList()->At(3);
852  fep->fWeight = 100 -x;
853 
854  pack->ResizeExistingFrames();
855  pack->Layout();
856 }
void CmsShowMainFrame::showFWorksInfo ( )

Definition at line 755 of file CmsShowMainFrame.cc.

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

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

Definition at line 659 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::updateStatus().

659  {
660  m_statBar->SetText(status, 0);
661  //force the status bar to update its image
662  gClient->ProcessEventsFor(m_statBar);
663 }
TGStatusBar * m_statBar
tuple status
Definition: mps_update.py:57

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(), enableNavigatorControls(), and loopAction().

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
CSGContinuousAction* CmsShowMainFrame::m_playEventsBack
private
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.