17#include <TGNumberEntry.h>
18#include <TViewerX3D.h>
28#include "BesVisLib/BesGMenuBar.h"
29#include "BesVisLib/BesGPictureButton.h"
30#include "BesVisLib/BesVisDisplay.h"
31#include "BesVisLib/BesEvent.h"
32#include "RootEventData/TRecTrackEvent.h"
33#include "RootEventData/TDigiEvent.h"
34#include "RootEventData/TTrigEvent.h"
35#include "RootEventData/TRecEvTime.h"
36#include "RootEventData/TRecEmcShower.h"
37#include "RootEventData/TRecCgemCluster.h"
38#include "RootEventData/TDstEvent.h"
39#include "RootEventData/TMcEvent.h"
186#ifndef BES_EZMenuViewOption
187#define BES_EZMenuViewOption
263class TRootEmbeddedCanvas;
272class TGHorizontal3DLine;
286class TGPictureButton;
306 TGeometry *fGeometry;
329 TGLayoutHints *fMenuBarLayout;
330 TGLayoutHints *fMenuBarFirstItemLayout;
331 TGLayoutHints *fMenuBarItemLayout;
332 TGLayoutHints *fMenuBarLastItemLayout;
333 TGLayoutHints *fECLayout;
337 TGPopupMenu *fMenuFile;
338 TGPopupMenu *fMenuEdit;
339 TGPopupMenu *fMenuView;
340 TGPopupMenu *fMenuHelp;
342 TGPopupMenu *fMenuViewOptionHeader;
343 TGPopupMenu *fMenuViewOptionCgem;
344 TGPopupMenu *fMenuViewOptionMdc;
345 TGPopupMenu *fMenuViewOptionTof;
346 TGPopupMenu *fMenuViewOptionEmc;
347 TGPopupMenu *fMenuViewOptionMuc;
348 TGPopupMenu *fMenuViewOptionFull3D;
349 TGPopupMenu *fMenuViewOptionOthers;
350 TGPopupMenu *fMenuViewOptionCgemHits;
351 TGPopupMenu *fMenuViewOptionMdcHits;
352 TGPopupMenu *fMenuViewOptionTofHits;
353 TGPopupMenu *fMenuViewOptionEmcHits;
354 TGPopupMenu *fMenuViewOptionMucHits;
355 TGPopupMenu *fMenuViewOptionTracks;
356 TGPopupMenu *fMenuViewOptionMC;
358 TGLayoutHints *fUpButtonBarFirstItemLayout;
359 TGLayoutHints *fUpButtonBarItemLayout;
360 TGLayoutHints *fUpButtonBarLastItemLayout;
361 TGCompositeFrame *fUpButtonBarFrame;
363 static const int kNUpSplitter = 4;
370 static const int kNCursorState = 2;
377 TGNumberEntryField *fZoomRatioNumber;
387 TGLayoutHints *fDisplayModeBarItemLayout;
388 TGCompositeFrame *fDisplayModeBarFrame;
389 static const int kNDisplayMode = 7;
392 TGLayoutHints *fToolBarFirstItemLayout;
393 TGLayoutHints *fToolBarItemLayout;
394 TGLayoutHints *fToolBarLastItemLayout;
395 TGCompositeFrame *fToolBarFrame;
397 static const int kNToolSplitter = 4;
408 TGCanvas *fEventListView;
409 TRootEmbeddedCanvas *fEmbeddedCanvas;
413 TGVerticalFrame *fV1;
417 TGListTree *fEventListTree;
418 TGListTreeItem *fItem;
419 TGListTreeItem *fRunItem;
422 TGCompositeFrame *fEventDownFrame;
423 TGCompositeFrame *fEventControlFrame;
424 TGCompositeFrame *fEventControlTextFrame;
425 TGCompositeFrame *fEventNavFrame;
426 TGCompositeFrame *fEventPlayTextFrame;
427 TGCompositeFrame *fEventPlayButtonFrame;
428 TGCompositeFrame *fEventPlaySpeedFrame;
429 TGCompositeFrame *fEventListFrame;
430 TGCompositeFrame *fEventListTextFrame;
431 TGCompositeFrame *fEventListContentFrame;
433 TGCompositeFrame *fAutoFrame;
434 TGCompositeFrame *fAutoTextFrame;
436 TGCompositeFrame *fViewFrame;
437 TGCompositeFrame *fViewTextFrame;
438 TGCompositeFrame *fViewContentFrame;
439 TGCompositeFrame *fViewContent1Frame;
440 TGCompositeFrame *fViewContent2Frame;
441 TGCompositeFrame *fViewContent3Frame;
442 TGCompositeFrame *fViewAngleFrame;
443 TGCompositeFrame *fViewAngleThetaFrame;
444 TGCompositeFrame *fViewAnglePhiFrame;
445 TGCompositeFrame *fViewAnglePsiFrame;
447 TGNumberEntry *fNumEntryRunNo;
448 TGNumberEntry *fNumEntryEventNo;
449 TGNumberEntry *fNumEntryEventPlaySpeed;
452 TGLabel *fEventControlTextLabel;
453 TGLabel *fBesLabelRun;
454 TGLabel *fBesLabelEvent;
455 TGLabel *fEventPlayTextLabel;
456 TGLabel *fEventPlaySpeedLabel;
457 TGLabel *fEventListTextLabel;
458 TGLabel *fViewTextLabel;
459 TGLabel *fAutoTextLabel;
461 TGHSlider *fEventPlaySlider;
478 TGVSlider *fViewAngleThetaSlider;
479 TGNumberEntryField *fViewAngleThetaNumber;
480 TGLabel *fViewAngleThetaLabel;
484 TGVSlider *fViewAnglePhiSlider;
485 TGNumberEntryField *fViewAnglePhiNumber;
486 TGLabel *fViewAnglePhiLabel;
490 TGVSlider *fViewAnglePsiSlider;
491 TGNumberEntryField *fViewAnglePsiNumber;
492 TGLabel *fViewAnglePsiLabel;
494 TGCompositeFrame *fRotateStepFrame;
495 TGLabel *fRotateStepLabel;
496 TGNumberEntryField *fNumEntryRotateStep;
497 TGLabel *fRotateStepUnitLabel;
499 TGGroupFrame *fFrameAutoRotate;
500 TGCheckButton *fChkBtnAutoRotate;
502 TGCompositeFrame *fRotateSpeedFrame;
503 TGNumberEntryField *fNumEntryRotateSpeed;
504 TGLabel *fRotateSpeedLabel;
506 TGCompositeFrame *fRotateFPSFrame;
507 TGNumberEntry *fNumEntryRotateFPS;
508 TGLabel *fRotateFPSLabel;
511 TGStatusBar *fStatusBar;
513 TGGroupFrame *fFrameHeader;
514 TGGroupFrame *fFrameHits;
515 TGGroupFrame *fFrameTracks;
517 TGGroupFrame *fFrameSubDetector;
522 TGGroupFrame *fFrameOthers;
524 TGGroupFrame *fFrameMdcMatch;
525 TGGroupFrame *fFrameTofMatch;
526 TGGroupFrame *fFrameMagnetic;
528 TGHorizontalFrame *fTitleFrame;
529 TGHorizontalFrame *fMainFrame;
531 TGHorizontalFrame *fBesRunFrame;
532 TGHorizontalFrame *fBesEventFrame;
534 TGCheckButton *fChkBtnHeaderGlobal;
537 TGCheckButton *fChkBtnCgemHitsGlobal;
538 TGCheckButton *fChkBtnCgemHitsXStrip;
539 TGCheckButton *fChkBtnCgemHitsVStrip;
540 TGCheckButton *fChkBtnCgemHitsClusters;
541 TGCheckButton *fChkBtnCgemHitsFiredHL;
543 TGCheckButton *fChkBtnMdcHitsGlobal;
544 TGCheckButton *fChkBtnTofHitsGlobal;
545 TGCheckButton *fChkBtnTofHitsEast;
546 TGCheckButton *fChkBtnTofHitsBarrel;
547 TGCheckButton *fChkBtnTofHitsWest;
548 TGCheckButton *fChkBtnEmcHitsGlobal;
549 TGCheckButton *fChkBtnEmcHitsEast;
550 TGCheckButton *fChkBtnEmcHitsBarrel;
551 TGCheckButton *fChkBtnEmcHitsWest;
552 TGCheckButton *fChkBtnEmcHitsSide;
553 TGCheckButton *fChkBtnMucHitsGlobal;
554 TGCheckButton *fChkBtnMucHitsEast;
555 TGCheckButton *fChkBtnMucHitsBarrel;
556 TGCheckButton *fChkBtnMucHitsWest;
558 TGCheckButton *fChkBtnTracksGlobal;
559 TGCheckButton *fChkBtnTracksMdc;
560 TGCheckButton *fChkBtnTracksTof;
561 TGCheckButton *fChkBtnTracksEmc;
562 TGCheckButton *fChkBtnTracksMuc;
563 TGCheckButton *fChkBtnTracksExt;
564 TGCheckButton *fChkBtnMCTruthTrack;
567 TGCheckButton *fChkBtnCgemGlobal;
568 TGCheckButton *fChkBtnCgemLayers;
569 TGCheckButton *fChkBtnCgemXStrips;
570 TGCheckButton *fChkBtnCgemVStrips;
572 TGCheckButton *fChkBtnMdcGlobal;
573 TGCheckButton *fChkBtnMdcTubes;
574 TGCheckButton *fChkBtnMdcWires;
575 TGCheckButton *fChkBtnTofGlobal;
576 TGCheckButton *fChkBtnTofEast;
577 TGCheckButton *fChkBtnTofBarrel;
578 TGCheckButton *fChkBtnTofWest;
579 TGCheckButton *fChkBtnEmcGlobal;
580 TGCheckButton *fChkBtnEmcEast;
581 TGCheckButton *fChkBtnEmcBarrel;
582 TGCheckButton *fChkBtnEmcWest;
583 TGCheckButton *fChkBtnEmcSide;
584 TGCheckButton *fChkBtnMucGlobal;
585 TGCheckButton *fChkBtnMucEast;
586 TGCheckButton *fChkBtnMucBarrel;
587 TGCheckButton *fChkBtnMucWest;
588 TGCheckButton *fChkBtnMucStrips;
590 TGCheckButton *fChkBtnBeamPipe;
591 TGCheckButton *fChkBtnZRPlaneOnXY;
592 TGCheckButton *fChkBtnAxis;
594 TGCheckButton *fChkBtnMdcTOverflowGlobal;
595 TGCheckButton *fChkBtnMdcQOverflowGlobal;
596 TGCheckButton *fChkBtnMdcTMatchGlobal;
597 TGCheckButton *fChkBtnMdcQMatchGlobal;
598 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
599 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
600 TGCheckButton *fChkBtnTofTMatchGlobal;
601 TGCheckButton *fChkBtnTofQMatchGlobal;
603 TGNumberEntry *fNumEntryMagnetic;
608 Long64_t fBesEventNo;
609 Long64_t fCurrentEvent;
610 Int_t fEventPlaySpeed;
611 Bool_t fAutoDisplayEvent;
612 TTimer *fAutoDisplayEventTimer;
614 Double_t fMoveFactor;
615 Double_t fRotateStep;
617 Double_t fRotateSpeed;
619 TTimer *fAutoRotateTimer;
620 Int_t fAutoRotateClockWise;
621 Int_t fAutoRotateTheta;
622 Int_t fAutoRotatePhi;
623 Int_t fAutoRotatePsi;
627 Double_t fViewThetaPreStep;
628 Double_t fViewPhiPreStep;
630 Double_t fHomeX[3], fHomeY[3];
636 TGLayoutHints *fLayout;
647 std::string f_HelpText;
659 void SetMdcQNotOverflow(Bool_t input);
660 void SetMdcTFire(Bool_t input);
661 void SetMdcQFire(Bool_t input);
662 void SetMdcColorfulWire(Bool_t input);
663 void SetMdcTimeSubEvTime(Bool_t input);
664 void SetTofTMatch(Bool_t input);
665 void SetTofQMatch(Bool_t input);
668 BesClient(
const TGWindow *p,
const char* title, UInt_t width, UInt_t height, Option_t *option =
"", Int_t argc = 0,
char **argv = 0);
676 virtual void CreateWidget(
const char* title, UInt_t width, UInt_t height);
704 virtual void OpenEventFile(TString filename,
bool auto_sel_geom =
false);
724 virtual Bool_t
GetEvent(Long64_t i,
bool openfile =
false,
bool sel_geom =
false);
740 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
741 virtual void SetState(Int_t
id = -1);
748 virtual Pixmap_t
GetPic(
const char *file);
750 virtual void SetRange(Double_t &input, Double_t min, Double_t max);
761 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()