17#include <TGNumberEntry.h>
18#include <TViewerX3D.h>
183#ifndef BES_EZMenuViewOption
184#define BES_EZMenuViewOption
251class TRootEmbeddedCanvas;
260class TGHorizontal3DLine;
274class TGPictureButton;
294 TGeometry *fGeometry;
316 TGLayoutHints *fMenuBarLayout;
317 TGLayoutHints *fMenuBarFirstItemLayout;
318 TGLayoutHints *fMenuBarItemLayout;
319 TGLayoutHints *fMenuBarLastItemLayout;
320 TGLayoutHints *fECLayout;
324 TGPopupMenu *fMenuFile;
325 TGPopupMenu *fMenuEdit;
326 TGPopupMenu *fMenuView;
327 TGPopupMenu *fMenuHelp;
329 TGPopupMenu *fMenuViewOptionHeader;
330 TGPopupMenu *fMenuViewOptionMdc;
331 TGPopupMenu *fMenuViewOptionTof;
332 TGPopupMenu *fMenuViewOptionEmc;
333 TGPopupMenu *fMenuViewOptionMuc;
334 TGPopupMenu *fMenuViewOptionFull3D;
335 TGPopupMenu *fMenuViewOptionOthers;
336 TGPopupMenu *fMenuViewOptionMdcHits;
337 TGPopupMenu *fMenuViewOptionTofHits;
338 TGPopupMenu *fMenuViewOptionEmcHits;
339 TGPopupMenu *fMenuViewOptionMucHits;
340 TGPopupMenu *fMenuViewOptionTracks;
341 TGPopupMenu *fMenuViewOptionMC;
343 TGLayoutHints *fUpButtonBarFirstItemLayout;
344 TGLayoutHints *fUpButtonBarItemLayout;
345 TGLayoutHints *fUpButtonBarLastItemLayout;
346 TGCompositeFrame *fUpButtonBarFrame;
348 static const int kNUpSplitter = 4;
355 static const int kNCursorState = 2;
362 TGNumberEntryField *fZoomRatioNumber;
372 TGLayoutHints *fDisplayModeBarItemLayout;
373 TGCompositeFrame *fDisplayModeBarFrame;
374 static const int kNDisplayMode = 5;
377 TGLayoutHints *fToolBarFirstItemLayout;
378 TGLayoutHints *fToolBarItemLayout;
379 TGLayoutHints *fToolBarLastItemLayout;
380 TGCompositeFrame *fToolBarFrame;
382 static const int kNToolSplitter = 4;
393 TGCanvas *fEventListView;
394 TRootEmbeddedCanvas *fEmbeddedCanvas;
398 TGVerticalFrame *fV1;
402 TGListTree *fEventListTree;
403 TGListTreeItem *fItem;
404 TGListTreeItem *fRunItem;
407 TGCompositeFrame *fEventDownFrame;
408 TGCompositeFrame *fEventControlFrame;
409 TGCompositeFrame *fEventControlTextFrame;
410 TGCompositeFrame *fEventNavFrame;
411 TGCompositeFrame *fEventPlayTextFrame;
412 TGCompositeFrame *fEventPlayButtonFrame;
413 TGCompositeFrame *fEventPlaySpeedFrame;
414 TGCompositeFrame *fEventListFrame;
415 TGCompositeFrame *fEventListTextFrame;
416 TGCompositeFrame *fEventListContentFrame;
418 TGCompositeFrame *fAutoFrame;
419 TGCompositeFrame *fAutoTextFrame;
421 TGCompositeFrame *fViewFrame;
422 TGCompositeFrame *fViewTextFrame;
423 TGCompositeFrame *fViewContentFrame;
424 TGCompositeFrame *fViewContent1Frame;
425 TGCompositeFrame *fViewContent2Frame;
426 TGCompositeFrame *fViewContent3Frame;
427 TGCompositeFrame *fViewAngleFrame;
428 TGCompositeFrame *fViewAngleThetaFrame;
429 TGCompositeFrame *fViewAnglePhiFrame;
430 TGCompositeFrame *fViewAnglePsiFrame;
432 TGNumberEntry *fNumEntryRunNo;
433 TGNumberEntry *fNumEntryEventNo;
434 TGNumberEntry *fNumEntryEventPlaySpeed;
437 TGLabel *fEventControlTextLabel;
438 TGLabel *fBesLabelRun;
439 TGLabel *fBesLabelEvent;
440 TGLabel *fEventPlayTextLabel;
441 TGLabel *fEventPlaySpeedLabel;
442 TGLabel *fEventListTextLabel;
443 TGLabel *fViewTextLabel;
444 TGLabel *fAutoTextLabel;
446 TGHSlider *fEventPlaySlider;
463 TGVSlider *fViewAngleThetaSlider;
464 TGNumberEntryField *fViewAngleThetaNumber;
465 TGLabel *fViewAngleThetaLabel;
469 TGVSlider *fViewAnglePhiSlider;
470 TGNumberEntryField *fViewAnglePhiNumber;
471 TGLabel *fViewAnglePhiLabel;
475 TGVSlider *fViewAnglePsiSlider;
476 TGNumberEntryField *fViewAnglePsiNumber;
477 TGLabel *fViewAnglePsiLabel;
479 TGCompositeFrame *fRotateStepFrame;
480 TGLabel *fRotateStepLabel;
481 TGNumberEntryField *fNumEntryRotateStep;
482 TGLabel *fRotateStepUnitLabel;
484 TGGroupFrame *fFrameAutoRotate;
485 TGCheckButton *fChkBtnAutoRotate;
487 TGCompositeFrame *fRotateSpeedFrame;
488 TGNumberEntryField *fNumEntryRotateSpeed;
489 TGLabel *fRotateSpeedLabel;
491 TGCompositeFrame *fRotateFPSFrame;
492 TGNumberEntry *fNumEntryRotateFPS;
493 TGLabel *fRotateFPSLabel;
496 TGStatusBar *fStatusBar;
498 TGGroupFrame *fFrameHeader;
499 TGGroupFrame *fFrameHits;
500 TGGroupFrame *fFrameTracks;
502 TGGroupFrame *fFrameSubDetector;
507 TGGroupFrame *fFrameOthers;
509 TGGroupFrame *fFrameMdcMatch;
510 TGGroupFrame *fFrameTofMatch;
511 TGGroupFrame *fFrameMagnetic;
513 TGHorizontalFrame *fTitleFrame;
514 TGHorizontalFrame *fMainFrame;
516 TGHorizontalFrame *fBesRunFrame;
517 TGHorizontalFrame *fBesEventFrame;
519 TGCheckButton *fChkBtnHeaderGlobal;
521 TGCheckButton *fChkBtnMdcHitsGlobal;
522 TGCheckButton *fChkBtnTofHitsGlobal;
523 TGCheckButton *fChkBtnTofHitsEast;
524 TGCheckButton *fChkBtnTofHitsBarrel;
525 TGCheckButton *fChkBtnTofHitsWest;
526 TGCheckButton *fChkBtnEmcHitsGlobal;
527 TGCheckButton *fChkBtnEmcHitsEast;
528 TGCheckButton *fChkBtnEmcHitsBarrel;
529 TGCheckButton *fChkBtnEmcHitsWest;
530 TGCheckButton *fChkBtnEmcHitsSide;
531 TGCheckButton *fChkBtnMucHitsGlobal;
532 TGCheckButton *fChkBtnMucHitsEast;
533 TGCheckButton *fChkBtnMucHitsBarrel;
534 TGCheckButton *fChkBtnMucHitsWest;
536 TGCheckButton *fChkBtnTracksGlobal;
537 TGCheckButton *fChkBtnTracksMdc;
538 TGCheckButton *fChkBtnTracksIdeal;
539 TGCheckButton *fChkBtnTracksTof;
540 TGCheckButton *fChkBtnTracksEmc;
541 TGCheckButton *fChkBtnTracksMuc;
542 TGCheckButton *fChkBtnTracksExt;
543 TGCheckButton *fChkBtnMCTruthTrack;
545 TGCheckButton *fChkBtnMdcGlobal;
546 TGCheckButton *fChkBtnMdcTubes;
547 TGCheckButton *fChkBtnMdcWires;
548 TGCheckButton *fChkBtnTofGlobal;
549 TGCheckButton *fChkBtnTofEast;
550 TGCheckButton *fChkBtnTofBarrel;
551 TGCheckButton *fChkBtnTofWest;
552 TGCheckButton *fChkBtnEmcGlobal;
553 TGCheckButton *fChkBtnEmcEast;
554 TGCheckButton *fChkBtnEmcBarrel;
555 TGCheckButton *fChkBtnEmcWest;
556 TGCheckButton *fChkBtnEmcSide;
557 TGCheckButton *fChkBtnMucGlobal;
558 TGCheckButton *fChkBtnMucEast;
559 TGCheckButton *fChkBtnMucBarrel;
560 TGCheckButton *fChkBtnMucWest;
561 TGCheckButton *fChkBtnMucStrips;
563 TGCheckButton *fChkBtnBeamPipe;
564 TGCheckButton *fChkBtnZRPlaneOnXY;
565 TGCheckButton *fChkBtnAxis;
567 TGCheckButton *fChkBtnMdcTOverflowGlobal;
568 TGCheckButton *fChkBtnMdcQOverflowGlobal;
569 TGCheckButton *fChkBtnMdcTMatchGlobal;
570 TGCheckButton *fChkBtnMdcQMatchGlobal;
571 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
572 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
573 TGCheckButton *fChkBtnTofTMatchGlobal;
574 TGCheckButton *fChkBtnTofQMatchGlobal;
576 TGNumberEntry *fNumEntryMagnetic;
581 Long64_t fBesEventNo;
582 Long64_t fCurrentEvent;
583 Int_t fEventPlaySpeed;
584 Bool_t fAutoDisplayEvent;
585 TTimer *fAutoDisplayEventTimer;
587 Double_t fMoveFactor;
588 Double_t fRotateStep;
590 Double_t fRotateSpeed;
592 TTimer *fAutoRotateTimer;
593 Int_t fAutoRotateClockWise;
594 Int_t fAutoRotateTheta;
595 Int_t fAutoRotatePhi;
596 Int_t fAutoRotatePsi;
600 Double_t fViewThetaPreStep;
601 Double_t fViewPhiPreStep;
603 Double_t fHomeX[3], fHomeY[3];
609 TGLayoutHints *fLayout;
620 std::string f_HelpText;
632 void SetMdcQNotOverflow(Bool_t input);
633 void SetMdcTFire(Bool_t input);
634 void SetMdcQFire(Bool_t input);
635 void SetMdcColorfulWire(Bool_t input);
636 void SetMdcTimeSubEvTime(Bool_t input);
637 void SetTofTMatch(Bool_t input);
638 void SetTofQMatch(Bool_t input);
641 BesClient(
const TGWindow *p,
const char*
title, UInt_t width, UInt_t height, Option_t *option =
"", Int_t argc = 0,
char **argv = 0);
677 virtual void OpenEventFile(TString filename,
bool auto_sel_geom =
false);
697 virtual Bool_t
GetEvent(Long64_t i,
bool openfile =
false,
bool sel_geom =
false);
713 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
714 virtual void SetState(Int_t
id = -1);
723 virtual void SetRange(Double_t &input, Double_t
min, Double_t
max);
734 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_ViewMoveRight
@ kM_Button_DisplayMode3D
@ kM_Button_ViewMoveCenter
@ 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()