17#include <TGNumberEntry.h>
18#include <TViewerX3D.h>
186#ifndef BES_EZMenuViewOption
187#define BES_EZMenuViewOption
264class TRootEmbeddedCanvas;
273class TGHorizontal3DLine;
287class TGPictureButton;
307 TGeometry *fGeometry;
330 TGLayoutHints *fMenuBarLayout;
331 TGLayoutHints *fMenuBarFirstItemLayout;
332 TGLayoutHints *fMenuBarItemLayout;
333 TGLayoutHints *fMenuBarLastItemLayout;
334 TGLayoutHints *fECLayout;
338 TGPopupMenu *fMenuFile;
339 TGPopupMenu *fMenuEdit;
340 TGPopupMenu *fMenuView;
341 TGPopupMenu *fMenuHelp;
343 TGPopupMenu *fMenuViewOptionHeader;
344 TGPopupMenu *fMenuViewOptionCgem;
345 TGPopupMenu *fMenuViewOptionMdc;
346 TGPopupMenu *fMenuViewOptionTof;
347 TGPopupMenu *fMenuViewOptionEmc;
348 TGPopupMenu *fMenuViewOptionMuc;
349 TGPopupMenu *fMenuViewOptionFull3D;
350 TGPopupMenu *fMenuViewOptionOthers;
351 TGPopupMenu *fMenuViewOptionCgemHits;
352 TGPopupMenu *fMenuViewOptionMdcHits;
353 TGPopupMenu *fMenuViewOptionTofHits;
354 TGPopupMenu *fMenuViewOptionEmcHits;
355 TGPopupMenu *fMenuViewOptionMucHits;
356 TGPopupMenu *fMenuViewOptionTracks;
357 TGPopupMenu *fMenuViewOptionMC;
359 TGLayoutHints *fUpButtonBarFirstItemLayout;
360 TGLayoutHints *fUpButtonBarItemLayout;
361 TGLayoutHints *fUpButtonBarLastItemLayout;
362 TGCompositeFrame *fUpButtonBarFrame;
364 static const int kNUpSplitter = 4;
371 static const int kNCursorState = 2;
378 TGNumberEntryField *fZoomRatioNumber;
388 TGLayoutHints *fDisplayModeBarItemLayout;
389 TGCompositeFrame *fDisplayModeBarFrame;
390 static const int kNDisplayMode = 7;
393 TGLayoutHints *fToolBarFirstItemLayout;
394 TGLayoutHints *fToolBarItemLayout;
395 TGLayoutHints *fToolBarLastItemLayout;
396 TGCompositeFrame *fToolBarFrame;
398 static const int kNToolSplitter = 4;
409 TGCanvas *fEventListView;
410 TRootEmbeddedCanvas *fEmbeddedCanvas;
414 TGVerticalFrame *fV1;
418 TGListTree *fEventListTree;
419 TGListTreeItem *fItem;
420 TGListTreeItem *fRunItem;
423 TGCompositeFrame *fEventDownFrame;
424 TGCompositeFrame *fEventControlFrame;
425 TGCompositeFrame *fEventControlTextFrame;
426 TGCompositeFrame *fEventNavFrame;
427 TGCompositeFrame *fEventPlayTextFrame;
428 TGCompositeFrame *fEventPlayButtonFrame;
429 TGCompositeFrame *fEventPlaySpeedFrame;
430 TGCompositeFrame *fEventListFrame;
431 TGCompositeFrame *fEventListTextFrame;
432 TGCompositeFrame *fEventListContentFrame;
434 TGCompositeFrame *fAutoFrame;
435 TGCompositeFrame *fAutoTextFrame;
437 TGCompositeFrame *fViewFrame;
438 TGCompositeFrame *fViewTextFrame;
439 TGCompositeFrame *fViewContentFrame;
440 TGCompositeFrame *fViewContent1Frame;
441 TGCompositeFrame *fViewContent2Frame;
442 TGCompositeFrame *fViewContent3Frame;
443 TGCompositeFrame *fViewAngleFrame;
444 TGCompositeFrame *fViewAngleThetaFrame;
445 TGCompositeFrame *fViewAnglePhiFrame;
446 TGCompositeFrame *fViewAnglePsiFrame;
448 TGNumberEntry *fNumEntryRunNo;
449 TGNumberEntry *fNumEntryEventNo;
450 TGNumberEntry *fNumEntryEventPlaySpeed;
453 TGLabel *fEventControlTextLabel;
454 TGLabel *fBesLabelRun;
455 TGLabel *fBesLabelEvent;
456 TGLabel *fEventPlayTextLabel;
457 TGLabel *fEventPlaySpeedLabel;
458 TGLabel *fEventListTextLabel;
459 TGLabel *fViewTextLabel;
460 TGLabel *fAutoTextLabel;
462 TGHSlider *fEventPlaySlider;
479 TGVSlider *fViewAngleThetaSlider;
480 TGNumberEntryField *fViewAngleThetaNumber;
481 TGLabel *fViewAngleThetaLabel;
485 TGVSlider *fViewAnglePhiSlider;
486 TGNumberEntryField *fViewAnglePhiNumber;
487 TGLabel *fViewAnglePhiLabel;
491 TGVSlider *fViewAnglePsiSlider;
492 TGNumberEntryField *fViewAnglePsiNumber;
493 TGLabel *fViewAnglePsiLabel;
495 TGCompositeFrame *fRotateStepFrame;
496 TGLabel *fRotateStepLabel;
497 TGNumberEntryField *fNumEntryRotateStep;
498 TGLabel *fRotateStepUnitLabel;
500 TGGroupFrame *fFrameAutoRotate;
501 TGCheckButton *fChkBtnAutoRotate;
503 TGCompositeFrame *fRotateSpeedFrame;
504 TGNumberEntryField *fNumEntryRotateSpeed;
505 TGLabel *fRotateSpeedLabel;
507 TGCompositeFrame *fRotateFPSFrame;
508 TGNumberEntry *fNumEntryRotateFPS;
509 TGLabel *fRotateFPSLabel;
512 TGStatusBar *fStatusBar;
514 TGGroupFrame *fFrameHeader;
515 TGGroupFrame *fFrameHits;
516 TGGroupFrame *fFrameTracks;
518 TGGroupFrame *fFrameSubDetector;
523 TGGroupFrame *fFrameOthers;
525 TGGroupFrame *fFrameMdcMatch;
526 TGGroupFrame *fFrameTofMatch;
527 TGGroupFrame *fFrameMagnetic;
529 TGHorizontalFrame *fTitleFrame;
530 TGHorizontalFrame *fMainFrame;
532 TGHorizontalFrame *fBesRunFrame;
533 TGHorizontalFrame *fBesEventFrame;
535 TGCheckButton *fChkBtnHeaderGlobal;
538 TGCheckButton *fChkBtnCgemHitsGlobal;
539 TGCheckButton *fChkBtnCgemHitsXStrip;
540 TGCheckButton *fChkBtnCgemHitsVStrip;
541 TGCheckButton *fChkBtnCgemHitsClusters;
542 TGCheckButton *fChkBtnCgemHitsFiredHL;
544 TGCheckButton *fChkBtnMdcHitsGlobal;
545 TGCheckButton *fChkBtnTofHitsGlobal;
546 TGCheckButton *fChkBtnTofHitsEast;
547 TGCheckButton *fChkBtnTofHitsBarrel;
548 TGCheckButton *fChkBtnTofHitsWest;
549 TGCheckButton *fChkBtnEmcHitsGlobal;
550 TGCheckButton *fChkBtnEmcHitsEast;
551 TGCheckButton *fChkBtnEmcHitsBarrel;
552 TGCheckButton *fChkBtnEmcHitsWest;
553 TGCheckButton *fChkBtnEmcHitsSide;
554 TGCheckButton *fChkBtnMucHitsGlobal;
555 TGCheckButton *fChkBtnMucHitsEast;
556 TGCheckButton *fChkBtnMucHitsBarrel;
557 TGCheckButton *fChkBtnMucHitsWest;
559 TGCheckButton *fChkBtnTracksGlobal;
560 TGCheckButton *fChkBtnTracksMdc;
561 TGCheckButton *fChkBtnTracksIdeal;
562 TGCheckButton *fChkBtnTracksTof;
563 TGCheckButton *fChkBtnTracksEmc;
564 TGCheckButton *fChkBtnTracksMuc;
565 TGCheckButton *fChkBtnTracksExt;
566 TGCheckButton *fChkBtnMCTruthTrack;
569 TGCheckButton *fChkBtnCgemGlobal;
570 TGCheckButton *fChkBtnCgemLayers;
571 TGCheckButton *fChkBtnCgemXStrips;
572 TGCheckButton *fChkBtnCgemVStrips;
574 TGCheckButton *fChkBtnMdcGlobal;
575 TGCheckButton *fChkBtnMdcTubes;
576 TGCheckButton *fChkBtnMdcWires;
577 TGCheckButton *fChkBtnTofGlobal;
578 TGCheckButton *fChkBtnTofEast;
579 TGCheckButton *fChkBtnTofBarrel;
580 TGCheckButton *fChkBtnTofWest;
581 TGCheckButton *fChkBtnEmcGlobal;
582 TGCheckButton *fChkBtnEmcEast;
583 TGCheckButton *fChkBtnEmcBarrel;
584 TGCheckButton *fChkBtnEmcWest;
585 TGCheckButton *fChkBtnEmcSide;
586 TGCheckButton *fChkBtnMucGlobal;
587 TGCheckButton *fChkBtnMucEast;
588 TGCheckButton *fChkBtnMucBarrel;
589 TGCheckButton *fChkBtnMucWest;
590 TGCheckButton *fChkBtnMucStrips;
592 TGCheckButton *fChkBtnBeamPipe;
593 TGCheckButton *fChkBtnZRPlaneOnXY;
594 TGCheckButton *fChkBtnAxis;
596 TGCheckButton *fChkBtnMdcTOverflowGlobal;
597 TGCheckButton *fChkBtnMdcQOverflowGlobal;
598 TGCheckButton *fChkBtnMdcTMatchGlobal;
599 TGCheckButton *fChkBtnMdcQMatchGlobal;
600 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
601 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
602 TGCheckButton *fChkBtnTofTMatchGlobal;
603 TGCheckButton *fChkBtnTofQMatchGlobal;
605 TGNumberEntry *fNumEntryMagnetic;
610 Long64_t fBesEventNo;
611 Long64_t fCurrentEvent;
612 Int_t fEventPlaySpeed;
613 Bool_t fAutoDisplayEvent;
614 TTimer *fAutoDisplayEventTimer;
616 Double_t fMoveFactor;
617 Double_t fRotateStep;
619 Double_t fRotateSpeed;
621 TTimer *fAutoRotateTimer;
622 Int_t fAutoRotateClockWise;
623 Int_t fAutoRotateTheta;
624 Int_t fAutoRotatePhi;
625 Int_t fAutoRotatePsi;
629 Double_t fViewThetaPreStep;
630 Double_t fViewPhiPreStep;
632 Double_t fHomeX[3], fHomeY[3];
638 TGLayoutHints *fLayout;
649 std::string f_HelpText;
661 void SetMdcQNotOverflow(Bool_t input);
662 void SetMdcTFire(Bool_t input);
663 void SetMdcQFire(Bool_t input);
664 void SetMdcColorfulWire(Bool_t input);
665 void SetMdcTimeSubEvTime(Bool_t input);
666 void SetTofTMatch(Bool_t input);
667 void SetTofQMatch(Bool_t input);
670 BesClient(
const TGWindow *p,
const char* title, UInt_t width, UInt_t height, Option_t *option =
"", Int_t argc = 0,
char **argv = 0);
678 virtual void CreateWidget(
const char* title, UInt_t width, UInt_t height);
706 virtual void OpenEventFile(TString filename,
bool auto_sel_geom =
false);
726 virtual Bool_t
GetEvent(Long64_t i,
bool openfile =
false,
bool sel_geom =
false);
742 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
743 virtual void SetState(Int_t
id = -1);
750 virtual Pixmap_t
GetPic(
const char *file);
752 virtual void SetRange(Double_t &input, Double_t min, Double_t max);
763 inline void SetRotateStep() {
if (fRotateFPS != 0) fRotateStep = fRotateSpeed/fRotateFPS;
else fRotateStep = 0.0; }
@ kM_Mdc_QNotOverflow_Global
@ kM_Mdc_ColorfulWire_Global
@ kM_Mdc_MdcTimeSubEvTime_Global
@ kM_Option_DefaultPicType
@ kM_Button_SwitchDisplayMode
@ kM_Button_ViewAnglePhiMinus
@ kM_Button_ViewAnglePsiNumber
@ kM_Button_ViewAnglePhiNumber
@ kM_Button_ViewResetAngle
@ kM_Slider_ViewAngleTheta
@ kM_Button_OpenEventFile
@ kM_Button_ViewAnglePhiPlus
@ kM_Button_DisplayMode2D
@ kM_Button_DisplayModeZR
@ kM_Button_ZoomRatioNumber
@ kM_Button_DisplayModeCgemUF
@ kM_Button_ViewMoveRight
@ kM_Button_DisplayMode3D
@ kM_Button_ViewMoveCenter
@ kM_Button_DisplayModeCgemUFAll
@ kM_Button_EventPlaySpeed
@ kM_Button_ViewClockWise
@ kM_Button_ViewAngleThetaMinus
@ kM_Button_ViewAnglePsiMinus
@ kM_Button_ViewAnglePsiPlus
@ kM_Button_DisplayModeXY
@ kM_Button_PerspectiveView
@ kM_Button_DisplayModeAll
@ kM_Button_ViewCounterClockWise
@ kM_Button_ViewAngleThetaPlus
@ kM_Button_ViewAngleThetaNumber
Int_t GetEventPlaySpeed()
virtual void CreateMainFrame()
virtual void CreateTitleBar()
virtual void UpdateAllView()
virtual void HandleMenu(Int_t id)
virtual void SetAllDisplayModeButtonUnHL()
virtual void CreateToolBar()
virtual Bool_t GetEvent(Long64_t i, bool openfile=false, bool sel_geom=false)
virtual void SavePicAsPS()
virtual void CreateDisplayModeBar()
virtual void HandleSliders(Int_t id)
virtual void CreateTabs()
virtual Bool_t LastEvent()
virtual void SaveMyConfig()
virtual void RotatePsi(int pn)
virtual void RotateClockWise(int clockwise)
virtual void CreateMenuBar()
virtual void RotateTheta(int pn)
virtual void RotatePhi(int pn)
virtual void HandleViewOptionMenu(Int_t id)
virtual void HandleEventList(TGListTreeItem *entry, Int_t btn)
virtual void OpenEventFile()
virtual void HandleStatusBar(const char *msg)
virtual Pixmap_t GetPic(const char *file)
virtual void AutoRotateCommand()
virtual void UpdateStatus()
virtual void CreateWidget(const char *title, UInt_t width, UInt_t height)
virtual void CloseWindow()
virtual void CreateHorizontalRuler()
virtual void InitGeoSelector(const char *geomsel_file)
virtual void InitConnections()
virtual void UpdateCurrentPad()
virtual void HandleError(const char *msg)
virtual void CreateCanvas()
virtual void HandleInfoBar(const char *msg)
virtual Bool_t FirstEvent()
virtual void LoadMdcPalette()
virtual Bool_t GetRecEvent()
virtual void SetRange(Double_t &input, Double_t min, Double_t max)
virtual void AutoDisplayEvent()
virtual Bool_t NextEvent()
virtual void CreateStatusBar()
virtual void CreateUpButtonBar()
virtual void AutoDisplayEventCommand()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel)
virtual void ExecuteReturn()
virtual void LoadMyConfig()
virtual Bool_t PrevEvent()
virtual void HandleButtons(Int_t id=-1)
virtual Bool_t FileExists(TString fname)
virtual void SetState(Int_t id=-1)
virtual void AutoRotate()
virtual void OpenGeoFile(TString filename)
virtual void ChangeFocus()
virtual const char * GetCurrentPadString()
Double_t GetRotateSpeed()
virtual void InitParameter()
virtual void UpdateBesInputFields()
virtual void LoadGeoFile()