17 #include <TCollection.h>
18 #include <TApplication.h>
19 #include <TEveWindow.h>
27 #include <TGStatusBar.h>
28 #include <KeySymbols.h>
65 FWPack(
const TGWindow* w) : TGPack(w, 100, 100) {}
83 const unsigned int backgroundColor=0x2f2f2f;
84 const unsigned int textColor= 0xb3b3b3;
141 previousEvent->
setToolTip(
"Goto previous event");
144 playEventsBack->
setToolTip(
"Play events backwards");
146 TGCompositeFrame *menuTopFrame =
new TGCompositeFrame(
this, 1, 1, kHorizontalFrame, backgroundColor);
148 TGMenuBar *menuBar =
new TGMenuBar(menuTopFrame, this->GetWidth(), 28, kHorizontalFrame);
150 TGPopupMenu *fileMenu =
new TGPopupMenu(gClient->GetRoot());
151 menuBar->AddPopup(
"File", fileMenu,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
160 fileMenu->AddSeparator();
164 fileMenu->AddSeparator();
176 TGPopupMenu *editMenu =
new TGPopupMenu(gClient->GetRoot());
177 menuBar->AddPopup(
"Edit", editMenu,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
183 editMenu->AddSeparator();
189 editMenu->AddSeparator();
198 TGPopupMenu *viewMenu =
new TGPopupMenu(gClient->GetRoot());
199 menuBar->AddPopup(
"View", viewMenu,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
204 viewMenu->AddSeparator();
215 playEventsBack->
createShortcut(kKey_Space,
"CTRL+SHIFT", GetId());
218 TGPopupMenu* windowMenu =
new TGPopupMenu(gClient->GetRoot());
219 menuBar->AddPopup(
"Window", windowMenu,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
229 TGPopupMenu *helpMenu =
new TGPopupMenu(gClient->GetRoot());
230 menuBar->AddPopup(
"Help", helpMenu,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 2, 0));
233 helpMenu->AddSeparator();
237 menuBar->SetBackgroundColor(backgroundColor);
238 TIter next(menuBar->GetTitles());
240 while ((title = (TGMenuTitle *)next()))
241 title->SetTextColor(textColor);
243 menuTopFrame->AddFrame(menuBar,
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
244 AddFrame(menuTopFrame,
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
248 AddFrame(
new TGFrame(
this, 1, 1, kChildFrame, 0x503020),
249 new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
251 m_statBar =
new TGStatusBar(
this, this->GetWidth(), 12);
252 AddFrame(
m_statBar,
new TGLayoutHints(kLHintsBottom | kLHintsExpandX));
254 TGHorizontalFrame *fullbar =
new TGHorizontalFrame(
this, this->GetWidth(), 30,0, backgroundColor);
259 TGCompositeFrame* controlFrame =
new TGVerticalFrame(fullbar, 10, 20, 0, backgroundColor);
261 TGCompositeFrame* buttonFrame =
new TGHorizontalFrame(controlFrame, 10, 10, 0, backgroundColor);
263 buttonFrame->SetBackgroundPixmap(imgBtn->GetPixmap());
270 new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 4, 3, 10, 0));
278 new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
284 new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
290 new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
299 new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
305 new TGLayoutHints(kLHintsCenterY| kLHintsLeft, 2, 3, 10, 0));
307 controlFrame->AddFrame(buttonFrame,
new TGLayoutHints(kLHintsTop, 10, 0, 0, 0));
311 TGHorizontalFrame* sliderFrame =
new TGHorizontalFrame(controlFrame, 10, 10, 0, backgroundColor);
313 sliderFrame->SetBackgroundPixmap(imgSld->GetPixmap());
316 m_delaySlider =
new TGHSlider(sliderFrame, 109, kSlider1 | kScaleNo);
317 sliderFrame->AddFrame(
m_delaySlider,
new TGLayoutHints(kLHintsTop | kLHintsLeft, 39, 8, 1, 3));
323 controlFrame->AddFrame(sliderFrame,
new TGLayoutHints(kLHintsTop, 10, 0, 0, 0));
325 fullbar->AddFrame(controlFrame,
new TGLayoutHints(kLHintsLeft, 2, 2, 5, 8));
334 TGVerticalFrame* delayFrame =
new TGVerticalFrame(fullbar, 60, 10, 0, backgroundColor);
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));
342 TGHorizontalFrame *labFixed =
new TGHorizontalFrame(delayFrame, 70, 20, kFixedSize, backgroundColor);
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));
350 fullbar->AddFrame(delayFrame,
new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
357 Int_t entryHeight = 22;
358 TGVerticalFrame *texts =
new TGVerticalFrame(fullbar, 400, 10, 0, backgroundColor);
362 TGPack *runInfo =
new TGPack(texts, 400, entryHeight, kFixedHeight);
363 runInfo->SetVertical(kFALSE);
364 runInfo->SetUseSplitters(kFALSE);
365 runInfo->SetBackgroundColor(backgroundColor);
367 TGHorizontalFrame *rLeft =
new TGHorizontalFrame(runInfo, 1, entryHeight);
370 rLeft->AddFrame(
m_runEntry,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 0,8,0,0));
371 runInfo->AddFrameWithWeight(rLeft, 0, 0.28);
373 TGHorizontalFrame *rMid =
new TGHorizontalFrame(runInfo, 1, entryHeight);
376 rMid->AddFrame(
m_lumiEntry,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 0,8,0,0));
377 runInfo->AddFrameWithWeight(rMid, 0, 0.32);
379 TGHorizontalFrame *rRight =
new TGHorizontalFrame(runInfo, 1, entryHeight);
382 rRight->AddFrame(
m_eventEntry,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 0,0,0,0));
383 runInfo->AddFrameWithWeight(rRight, 0, 0.4);
385 texts->AddFrame(runInfo,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,0,4));
390 TGHorizontalFrame *filterFrame =
new TGHorizontalFrame(texts, 400, entryHeight, 0, backgroundColor);
395 m_filterIcons[2] = fClient->GetPicture(
"unchecked_dis_t.xpm");
410 filterFrame->AddFrame(
m_filterEnableBtn,
new TGLayoutHints(kLHintsLeft, 4,0,3,0));
417 filterFrame->AddFrame(
m_filterShowGUIBtn,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 6,7,0,0));
419 texts->AddFrame(filterFrame,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,4,0));
422 fullbar->AddFrame(texts,
new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 5, 5, 12, 0));
426 TGVerticalFrame *texts2 =
new TGVerticalFrame(fullbar, 200, 44, kFixedSize, backgroundColor);
432 m_timeText->SetBackgroundColor(backgroundColor);
433 texts2->AddFrame(
m_timeText,
new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0,0,0,1));
435 fullbar->AddFrame(texts2,
new TGLayoutHints(kLHintsLeft, 5, 5, 16, 5));
441 TGVerticalFrame* parentLogoFrame =
new TGVerticalFrame(fullbar, 70, 53, kFixedSize);
442 parentLogoFrame->SetBackgroundColor(backgroundColor);
443 fullbar->AddFrame(parentLogoFrame,
new TGLayoutHints(kLHintsRight | kLHintsCenterY));
445 TGVerticalFrame* logoFrame =
new TGVerticalFrame(parentLogoFrame, 53, 53, kFixedSize);
447 logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
448 parentLogoFrame->AddFrame(logoFrame,
new TGLayoutHints(kLHintsRight | kLHintsCenterY, 0, 14, 0, 0));
451 TGCompositeFrame *logoFrame =
new TGCompositeFrame(
this, 61, 23, kFixedSize | kHorizontalFrame, backgroundColor);
457 logoFrame->AddFrame(infoBut);
458 infoBut->Connect(
"Clicked()",
"CmsShowMainFrame",
this,
"showFWorksInfo()");
461 menuTopFrame->AddFrame(logoFrame,
new TGLayoutHints(kLHintsRight | kLHintsBottom, 0, 13, 3, 1));
466 AddFrame(fullbar,
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0));
489 csArea->SetVertical(kFALSE);
492 csArea->AddFrameWithWeight(cf, 0, 20);
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);
500 AddFrame(csArea,
new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 2));
501 csArea->MapSubwindows();
503 SetWindowName(
"cmsShow");
656 gApplication->Terminate(0);
666 if (event->fType == kGKeyPress) {
668 std::vector<CSGAction*>::const_iterator it_act;
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();
699 Int_t
width, Int_t height)
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));
729 TString infoFileName(
"$(CMSSW_BASE)/src/Fireworks/Core/data/version.txt");
730 gSystem->ExpandPathName(infoFileName);
732 ifstream infoFile(infoFileName);
734 infoText.ReadFile(infoFile);
737 const UInt_t ww = 280, hh = 180;
743 TGFrame* logoFrame =
new TGFrame(
m_fworksAbout, 140, 48, kFixedSize);
745 logoFrame->SetBackgroundPixmap(logoImg->GetPixmap());
746 m_fworksAbout->AddFrame(logoFrame,
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 0, 0, 16, 0));
749 label->SetBackgroundColor(0x2f2f2f);
750 label->SetForegroundColor(0xffffff);
751 m_fworksAbout->AddFrame(label,
new TGLayoutHints(kLHintsCenterX | kLHintsCenterY));
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()");
772 if ((*i)-> getKeycode())
773 f->BindKey(
this, (*i)->getKeycode(), (*i)->getModcode());
781 TGFrameElement* fe = (TGFrameElement*) GetList()->Last();
784 TGFrameElementPack* fep;
785 fep = (TGFrameElementPack*)pack->GetList()->At(1);
788 fep = (TGFrameElementPack*)pack->GetList()->At(3);
789 fep->fWeight = 100 -
x;
791 pack->ResizeExistingFrames();
798 TGFrameElement* fe = (TGFrameElement*)GetList()->Last();
799 TGPack*
pack = (TGPack*)(fe->fFrame);
801 TGFrameElementPack* fep = (TGFrameElementPack*)pack->GetList()->At(1);
const std::string sKeyboardShort
TGVerticalFrame * createList(TGCompositeFrame *p)
static const TString & coreIcondir()
FWNumberEntryField * m_lumiEntry
EventNumber_t event() const
void bindCSGActionKeys(const TGMainFrame *f) const
const std::string sShowCommonInsp
virtual void SetUIntNumber(UInt_t n)
FWPack(const TGWindow *w)
InfoFrame(const TGWindow *p, UInt_t w, UInt_t h, UInt_t opts)
void loadEvent(const edm::EventBase &event)
void createViews(TEveWindowSlot *slot)
virtual void enableActions(bool enable=true)
const std::string sBackgroundColor
const std::string sPlayEvents
sigc::signal< void > activated
FWCustomIconsButton * m_filterEnableBtn
void enableNext(bool enable=true)
const std::string sOpenData
FWIntValueListener * m_delaySliderListener
void enableNavigatorControls()
LuminosityBlockNumber_t luminosityBlock() const
const std::string sSaveConfigAs
CSGContinuousAction * m_playEventsBack
const std::string sNextEvent
const std::string sSaveConfig
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)
std::vector< CSGAction * > m_actionList
const std::string sAppendData
void setToolTip(const std::string &tip)
virtual Bool_t isEnabled() const
CSGContinuousAction * m_loopAction
TGMainFrame * m_fworksAbout
CSGAction * createNewViewerAction(const std::string &iActionName, bool seaprator)
virtual void CloseWindow()
FWNumberEntryField * m_eventEntry
virtual ~CmsShowMainFrame()
void updateStatusBar(const char *status)
const std::string sShowAddCollection
const std::string sGotoLastEvent
TGPopupMenu * m_newViewerMenu
const std::string sExportImage
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::string sAutoRewind
void createMenuEntry(TGPopupMenu *menu)
Bool_t HandleKey(Event_t *event)
const std::string sShowMainViewCtl
FWNumberEntryField * m_runEntry
const std::string sPlayEventsBack
CSGAction * getAction(const std::string &name)
virtual void enableActions(bool enable=true)
const std::string sShowObjInsp
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)
CSGAction * m_previousEvent
const std::string sGotoFirstEvent
virtual void CloseWindow()
const std::string sShowInvMassDialog
void setSummaryViewWeight(float)
const std::string sShowEventDisplayInsp
void enablePrevious(bool enable=true)
const std::string sPreviousEvent
CSGContinuousAction * m_playEvents
std::string getLocalTime(const edm::EventBase &event)
float getSummaryViewWeight() const
const std::vector< CSGAction * > & getListOfActions() const
const std::string sLoadConfig
virtual void HandleMenu(Int_t id)
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)
const std::string sExportAllImages
void enableComplexNavigation(bool enable=true)
TGTextButton * m_filterShowGUIBtn
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
CmsShowMainFrame(const TGWindow *p=0, UInt_t w=1, UInt_t h=1, FWGUIManager *m=0)
const std::string sHelpGL
void setPlayDelayGUI(Float_t val, Bool_t sliderChanged)
const std::string sSearchFiles