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

References filterCSVwithJSON::copy, FWCheckBoxIcon::coreIcondir(), CSGContinuousAction::createCustomIconsButton(), CSGAction::createCustomIconsButton(), FWGUIManager::createList(), CSGAction::createMenuEntry(), CSGAction::createShortcut(), FWGUIManager::createViews(), align_tpl::cut, CSGAction::disable(), alignmentValidation::help, label, python.cmstools::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(), 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::sNextEvent, cmsshow::sOpenData, cmsshow::sPaste, cmsshow::sPlayEvents, cmsshow::sPlayEventsBack, cmsshow::sPreviousEvent, cmsshow::sQuit, cmsshow::sRedo, cmsshow::sSaveConfig, cmsshow::sSaveConfigAs, cmsshow::sSearchFiles, cmsshow::sShowAddCollection, cmsshow::sShowCommonInsp, cmsshow::sShowEventDisplayInsp, cmsshow::sShowInvMassDialog, cmsshow::sShowMainViewCtl, cmsshow::sShowObjInsp, cmsshow::sUndo, and indexGen::title.

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

Definition at line 511 of file CmsShowMainFrame.cc.

511  {
512  Cleanup();
513 }
CmsShowMainFrame::CmsShowMainFrame ( const CmsShowMainFrame )
private

Member Function Documentation

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

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

769 {
770  for (std::vector<CSGAction*>::const_iterator i = m_actionList.begin(); i != m_actionList.end(); ++i)
771  {
772  if ((*i)-> getKeycode())
773  f->BindKey(this, (*i)->getKeycode(), (*i)->getModcode());
774  }
775 }
int i
Definition: DBlmapReader.cc:9
std::vector< CSGAction * > m_actionList
double f[11][100]
CmsShowMainFrame::ClassDef ( CmsShowMainFrame  ,
 
)
void CmsShowMainFrame::clearStatusBar ( )

Definition at line 645 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::clearStatus().

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

Definition at line 560 of file CmsShowMainFrame.cc.

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

561 {
563 }
sigc::signal< void > activated
Definition: CSGAction.h:89
CSGAction * getAction(const std::string &name)
const std::string sQuit
Definition: ActionsList.cc:22
CSGAction * CmsShowMainFrame::createNewViewerAction ( const std::string &  iActionName,
bool  seaprator 
)

Definition at line 532 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::FWGUIManager().

533 {
534  CSGAction* action(new CSGAction(this, iActionName.c_str()));
535  action->createMenuEntry(m_newViewerMenu);
536  if (separator) m_newViewerMenu->AddSeparator();
537  return action;
538 }
TGPopupMenu * m_newViewerMenu
void CmsShowMainFrame::enableActions ( bool  enable = true)
virtual

Reimplemented from CSGActionSupervisor.

Definition at line 570 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::enableActions().

571 {
573 
574  m_runEntry->SetEnabled(enable);
575  m_lumiEntry->SetEnabled(enable);
576  m_eventEntry->SetEnabled(enable);
577  m_filterEnableBtn->SetEnabled(enable);
578  m_filterShowGUIBtn->SetEnabled(enable);
579 }
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 619 of file CmsShowMainFrame.cc.

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

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

620 {
621  if (enable)
622  m_goToLast->enable();
623  else
624  m_goToLast->disable();
625 }
void enable()
Definition: CSGAction.cc:274
void disable()
Definition: CSGAction.cc:279
CSGAction * m_goToLast
void CmsShowMainFrame::enableNavigatorControls ( )

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

550 {
551  m_nextEvent->enable();
553  m_goToFirst->enable();
554  m_goToLast->enable();
555  m_playEvents->enable();
557  m_loopAction->enable();
558 }
void enable()
Definition: CSGAction.cc:274
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 599 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::disableNext().

600 {
601  if (m_nextEvent != 0) {
602  if (enable) {
603  m_nextEvent->enable();
604  m_goToLast->enable();
605  m_playEvents->enable();
606  } else {
607  m_nextEvent->disable();
608  m_goToLast->disable();
610  m_playEvents->stop();
611  }
612  }
613 }
void enable()
Definition: CSGAction.cc:274
void disable()
Definition: CSGAction.cc:279
CSGAction * m_nextEvent
CSGAction * m_goToLast
CSGContinuousAction * m_playEvents
void CmsShowMainFrame::enablePrevious ( bool  enable = true)

Definition at line 582 of file CmsShowMainFrame.cc.

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

Referenced by FWGUIManager::disablePrevious().

583 {
584  if (m_previousEvent != 0) {
585  if (enable) {
587  m_goToFirst->enable();
589  } else {
591  m_goToFirst->disable();
594  }
595  }
596 }
void enable()
Definition: CSGAction.cc:274
void disable()
Definition: CSGAction.cc:279
CSGContinuousAction * m_playEventsBack
CSGAction * m_previousEvent
CSGAction * m_goToFirst
float CmsShowMainFrame::getSummaryViewWeight ( ) const

Definition at line 796 of file CmsShowMainFrame.cc.

References python.timeUnitHelper::pack().

Referenced by FWGUIManager::addTo().

797 {
798  TGFrameElement* fe = (TGFrameElement*)GetList()->Last();
799  TGPack* pack = (TGPack*)(fe->fFrame);
800 
801  TGFrameElementPack* fep = (TGFrameElementPack*)pack->GetList()->At(1);
802  return fep->fWeight;
803 
804 }
Bool_t CmsShowMainFrame::HandleKey ( Event_t *  event)

Definition at line 665 of file CmsShowMainFrame.cc.

References CSGActionSupervisor::getListOfActions().

665  {
666  if (event->fType == kGKeyPress) {
667  const std::vector<CSGAction*>& alist = getListOfActions();
668  std::vector<CSGAction*>::const_iterator it_act;
669  Int_t keycode;
670  Int_t modcode;
671  for (it_act = alist.begin(); it_act != alist.end(); ++it_act) {
672  keycode = (*it_act)->getKeycode();
673  modcode = (*it_act)->getModcode();
674  if ((event->fCode == (UInt_t)keycode) &&
675  ((event->fState == (UInt_t)modcode) ||
676  (event->fState == (UInt_t)(modcode | kKeyMod2Mask)) ||
677  (event->fState == (UInt_t)(modcode | kKeyLockMask)) ||
678  (event->fState == (UInt_t)(modcode | kKeyMod2Mask | kKeyLockMask)))) {
679  (*it_act)->activated.emit();
680  // return kTRUE;
681  return false;
682  }
683  }
684  }
685  return kFALSE;
686 }
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
unsigned int UInt_t
Definition: FUTypes.h:12
const std::vector< CSGAction * > & getListOfActions() const
void CmsShowMainFrame::HandleMenu ( Int_t  id)
virtual

Reimplemented from CSGActionSupervisor.

Definition at line 652 of file CmsShowMainFrame.cc.

References fwLog, and fwlog::kInfo.

652  {
653  switch(id) {
654  case 1:
655  {
656  gApplication->Terminate(0);
657  }
658  break;
659  default:
660  fwLog(fwlog::kInfo) << "Invalid menu id\n";
661  break;
662  }
663 }
#define fwLog(_level_)
Definition: fwLog.h:51
void CmsShowMainFrame::loadEvent ( const edm::EventBase event)

Definition at line 540 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(), and FWNumberEntryField::SetUIntNumber().

Referenced by FWGUIManager::eventChangedCallback().

541 {
542  m_runEntry ->SetUIntNumber(event.id().run());
544  m_eventEntry->SetUIntNumber(event.id().event());
545 
546  m_timeText->SetText( fireworks::getLocalTime( event ).c_str() );
547 }
RunNumber_t run() const
Definition: EventID.h:42
FWNumberEntryField * m_lumiEntry
EventNumber_t event() const
Definition: EventID.h:44
virtual void SetUIntNumber(UInt_t n)
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:43
FWNumberEntryField * m_eventEntry
FWNumberEntryField * m_runEntry
edm::EventID id() const
Definition: EventBase.h:56
std::string getLocalTime(const edm::EventBase &event)
CSGContinuousAction* CmsShowMainFrame::loopAction ( ) const
inline

Definition at line 91 of file CmsShowMainFrame.h.

References m_loopAction.

Referenced by FWGUIManager::loopAction().

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

References label.

Referenced by CmsShowMainFrame().

700 {
701  // Utility function.
702 
703 
704  p->SetBackgroundColor(bgCol);
705  TGCompositeFrame *lframe = new TGHorizontalFrame(p, width, height, kFixedSize, bgCol);
706  TGLabel* label = new TGLabel(lframe, txt);
707  label->SetBackgroundColor(bgCol);
708  label->SetTextColor(txtCol);
709  lframe->AddFrame(label, new TGLayoutHints(kLHintsRight | kLHintsTop, 0, 4));
710  p->AddFrame(lframe, new TGLayoutHints(kLHintsLeft, 0, 0, 3, 0));
711 }
const std::string & label
Definition: MVAComputer.cc:186
bool CmsShowMainFrame::nextIsEnabled ( )

Definition at line 628 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_nextEvent.

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

Definition at line 88 of file CmsShowMainFrame.h.

References m_playEvents.

Referenced by FWGUIManager::playEventsAction().

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

Definition at line 95 of file CmsShowMainFrame.h.

References m_playEventsBack.

Referenced by FWGUIManager::playEventsBackwardsAction().

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

Definition at line 634 of file CmsShowMainFrame.cc.

References CSGAction::isEnabled(), and m_previousEvent.

635 {
636  return m_previousEvent->isEnabled();
637 }
virtual Bool_t isEnabled() const
Definition: CSGAction.cc:298
CSGAction * m_previousEvent
void CmsShowMainFrame::quit ( )

Definition at line 565 of file CmsShowMainFrame.cc.

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

Referenced by CmsShowMainFrame().

565  {
567 }
sigc::signal< void > activated
Definition: CSGAction.h:89
CSGAction * getAction(const std::string &name)
const std::string sQuit
Definition: ActionsList.cc:22
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().

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

Definition at line 778 of file CmsShowMainFrame.cc.

References python.timeUnitHelper::pack(), and x.

Referenced by FWGUIManager::setFrom().

779 {
780 
781  TGFrameElement* fe = (TGFrameElement*) GetList()->Last();
782  FWPack* pack = (FWPack*)(fe->fFrame);
783 
784  TGFrameElementPack* fep;
785  fep = (TGFrameElementPack*)pack->GetList()->At(1);
786  fep->fWeight = x;
787 
788  fep = (TGFrameElementPack*)pack->GetList()->At(3);
789  fep->fWeight = 100 -x;
790 
791  pack->ResizeExistingFrames();
792  pack->Layout();
793 }
Definition: DDAxes.h:10
void CmsShowMainFrame::showFWorksInfo ( )

Definition at line 725 of file CmsShowMainFrame.cc.

References FWCheckBoxIcon::coreIcondir(), label, and m_fworksAbout.

726 {
727  if (m_fworksAbout == 0)
728  {
729  TString infoFileName("$(CMSSW_BASE)/src/Fireworks/Core/data/version.txt");
730  gSystem->ExpandPathName(infoFileName);
731 
732  ifstream infoFile(infoFileName);
733  TString infoText;
734  infoText.ReadFile(infoFile);
735  infoFile.close();
736 
737  const UInt_t ww = 280, hh = 180;
738 
739  m_fworksAbout = new InfoFrame(gClient->GetRoot(), ww, hh, kVerticalFrame | kFixedSize);
740  m_fworksAbout->SetWMSizeHints(ww, hh, ww, hh, 0, 0);
741  m_fworksAbout->SetBackgroundColor(0x2f2f2f);
742 
743  TGFrame* logoFrame = new TGFrame(m_fworksAbout, 140, 48, kFixedSize);
744  TImage *logoImg = TImage::Open(FWCheckBoxIcon::coreIcondir()+"logo-fireworks.png");
745  logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
746  m_fworksAbout->AddFrame(logoFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 0, 0, 16, 0));
747 
748  TGLabel* label = new TGLabel(m_fworksAbout, infoText);
749  label->SetBackgroundColor(0x2f2f2f);
750  label->SetForegroundColor(0xffffff);
751  m_fworksAbout->AddFrame(label, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY));
752 
753  TGTextButton* btn = new TGTextButton(m_fworksAbout, " OK ");
754  btn->SetBackgroundColor(0x2f2f2f);
755  btn->SetForegroundColor(0xffffff);
756  m_fworksAbout->AddFrame(btn, new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 0, 0, 0, 12));
757  btn->Connect("Clicked()", "TGMainFrame", m_fworksAbout, "CloseWindow()");
758 
759  m_fworksAbout->MapSubwindows();
760  m_fworksAbout->Layout();
761  }
762 
763  m_fworksAbout->MapRaised();
764 }
static const TString & coreIcondir()
const std::string & label
Definition: MVAComputer.cc:186
TGMainFrame * m_fworksAbout
unsigned int UInt_t
Definition: FUTypes.h:12
void CmsShowMainFrame::updateStatusBar ( const char *  status)

Definition at line 639 of file CmsShowMainFrame.cc.

References m_statBar.

Referenced by FWGUIManager::updateStatus().

639  {
640  m_statBar->SetText(status, 0);
641  //force the status bar to update its image
642  gClient->ProcessEventsFor(m_statBar);
643 }
tuple status
Definition: ntuplemaker.py:245
TGStatusBar * m_statBar

Friends And Related Function Documentation

friend class FWGUIManager
friend

Definition at line 62 of file CmsShowMainFrame.h.

Member Data Documentation

TGLabel* CmsShowMainFrame::m_delayLabel
private

Definition at line 146 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and setPlayDelayGUI().

TGSlider* CmsShowMainFrame::m_delaySlider
private

Definition at line 145 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and setPlayDelayGUI().

FWIntValueListener* CmsShowMainFrame::m_delaySliderListener
protected

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

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

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

Definition at line 143 of file CmsShowMainFrame.h.

Referenced by showFWorksInfo().

CSGAction* CmsShowMainFrame::m_fworksInfo
private

Definition at line 138 of file CmsShowMainFrame.h.

CSGAction* CmsShowMainFrame::m_goToFirst
private

Definition at line 135 of file CmsShowMainFrame.h.

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

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

Definition at line 141 of file CmsShowMainFrame.h.

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

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

Definition at line 130 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame().

TGPopupMenu* CmsShowMainFrame::m_newViewerMenu
private

Definition at line 150 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and createNewViewerAction().

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

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

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

TGLabel* CmsShowMainFrame::m_timeText
private

Definition at line 132 of file CmsShowMainFrame.h.

Referenced by CmsShowMainFrame(), and loadEvent().

Long_t CmsShowMainFrame::m_tooltipDelay
private

Definition at line 131 of file CmsShowMainFrame.h.