16#include <TGNumberEntry.h>
17#include <TViewerX3D.h>
25#include "BesVisLib/BesGMenuBar.h"
26#include "BesVisLib/BesGPictureButton.h"
27#include "BesVisLib/BesVisDisplay.h"
28#include "BesVisLib/BesEvent.h"
29#include "RootEventData/TRecTrackEvent.h"
30#include "RootEventData/TDigiEvent.h"
31#include "RootEventData/TTrigEvent.h"
32#include "RootEventData/TRecEvTime.h"
33#include "RootEventData/TRecEmcShower.h"
178#ifndef BES_EZMenuViewOption
179#define BES_EZMenuViewOption
244class TRootEmbeddedCanvas;
253class TGHorizontal3DLine;
267class TGPictureButton;
287 TGeometry *fGeometry;
305 TGLayoutHints *fMenuBarLayout;
306 TGLayoutHints *fMenuBarFirstItemLayout;
307 TGLayoutHints *fMenuBarItemLayout;
308 TGLayoutHints *fMenuBarLastItemLayout;
309 TGLayoutHints *fECLayout;
313 TGPopupMenu *fMenuFile;
314 TGPopupMenu *fMenuEdit;
315 TGPopupMenu *fMenuView;
316 TGPopupMenu *fMenuHelp;
318 TGPopupMenu *fMenuViewOptionHeader;
319 TGPopupMenu *fMenuViewOptionMdc;
320 TGPopupMenu *fMenuViewOptionTof;
321 TGPopupMenu *fMenuViewOptionEmc;
322 TGPopupMenu *fMenuViewOptionMuc;
323 TGPopupMenu *fMenuViewOptionFull3D;
324 TGPopupMenu *fMenuViewOptionOthers;
325 TGPopupMenu *fMenuViewOptionMdcHits;
326 TGPopupMenu *fMenuViewOptionTofHits;
327 TGPopupMenu *fMenuViewOptionEmcHits;
328 TGPopupMenu *fMenuViewOptionMucHits;
329 TGPopupMenu *fMenuViewOptionTracks;
331 TGLayoutHints *fUpButtonBarFirstItemLayout;
332 TGLayoutHints *fUpButtonBarItemLayout;
333 TGLayoutHints *fUpButtonBarLastItemLayout;
334 TGCompositeFrame *fUpButtonBarFrame;
336 static const int kNUpSplitter = 4;
343 static const int kNCursorState = 2;
350 TGNumberEntryField *fZoomRatioNumber;
360 TGLayoutHints *fDisplayModeBarItemLayout;
361 TGCompositeFrame *fDisplayModeBarFrame;
362 static const int kNDisplayMode = 5;
365 TGLayoutHints *fToolBarFirstItemLayout;
366 TGLayoutHints *fToolBarItemLayout;
367 TGLayoutHints *fToolBarLastItemLayout;
368 TGCompositeFrame *fToolBarFrame;
370 static const int kNToolSplitter = 4;
381 TGCanvas *fEventListView;
382 TRootEmbeddedCanvas *fEmbeddedCanvas;
386 TGVerticalFrame *fV1;
390 TGListTree *fEventListTree;
391 TGListTreeItem *fItem;
392 TGListTreeItem *fRunItem;
395 TGCompositeFrame *fEventDownFrame;
396 TGCompositeFrame *fEventControlFrame;
397 TGCompositeFrame *fEventControlTextFrame;
398 TGCompositeFrame *fEventNavFrame;
399 TGCompositeFrame *fEventPlayTextFrame;
400 TGCompositeFrame *fEventPlayButtonFrame;
401 TGCompositeFrame *fEventPlaySpeedFrame;
402 TGCompositeFrame *fEventListFrame;
403 TGCompositeFrame *fEventListTextFrame;
404 TGCompositeFrame *fEventListContentFrame;
406 TGCompositeFrame *fAutoFrame;
407 TGCompositeFrame *fAutoTextFrame;
409 TGCompositeFrame *fViewFrame;
410 TGCompositeFrame *fViewTextFrame;
411 TGCompositeFrame *fViewContentFrame;
412 TGCompositeFrame *fViewContent1Frame;
413 TGCompositeFrame *fViewContent2Frame;
414 TGCompositeFrame *fViewContent3Frame;
415 TGCompositeFrame *fViewAngleFrame;
416 TGCompositeFrame *fViewAngleThetaFrame;
417 TGCompositeFrame *fViewAnglePhiFrame;
418 TGCompositeFrame *fViewAnglePsiFrame;
420 TGNumberEntry *fNumEntryRunNo;
421 TGNumberEntry *fNumEntryEventNo;
422 TGNumberEntry *fNumEntryEventPlaySpeed;
425 TGLabel *fEventControlTextLabel;
426 TGLabel *fBesLabelRun;
427 TGLabel *fBesLabelEvent;
428 TGLabel *fEventPlayTextLabel;
429 TGLabel *fEventPlaySpeedLabel;
430 TGLabel *fEventListTextLabel;
431 TGLabel *fViewTextLabel;
432 TGLabel *fAutoTextLabel;
434 TGHSlider *fEventPlaySlider;
451 TGVSlider *fViewAngleThetaSlider;
452 TGNumberEntryField *fViewAngleThetaNumber;
453 TGLabel *fViewAngleThetaLabel;
457 TGVSlider *fViewAnglePhiSlider;
458 TGNumberEntryField *fViewAnglePhiNumber;
459 TGLabel *fViewAnglePhiLabel;
463 TGVSlider *fViewAnglePsiSlider;
464 TGNumberEntryField *fViewAnglePsiNumber;
465 TGLabel *fViewAnglePsiLabel;
467 TGCompositeFrame *fRotateStepFrame;
468 TGLabel *fRotateStepLabel;
469 TGNumberEntryField *fNumEntryRotateStep;
470 TGLabel *fRotateStepUnitLabel;
472 TGGroupFrame *fFrameAutoRotate;
473 TGCheckButton *fChkBtnAutoRotate;
475 TGCompositeFrame *fRotateSpeedFrame;
476 TGNumberEntryField *fNumEntryRotateSpeed;
477 TGLabel *fRotateSpeedLabel;
479 TGCompositeFrame *fRotateFPSFrame;
480 TGNumberEntry *fNumEntryRotateFPS;
481 TGLabel *fRotateFPSLabel;
484 TGStatusBar *fStatusBar;
486 TGGroupFrame *fFrameHeader;
487 TGGroupFrame *fFrameHits;
488 TGGroupFrame *fFrameTracks;
490 TGGroupFrame *fFrameSubDetector;
495 TGGroupFrame *fFrameOthers;
497 TGGroupFrame *fFrameMdcMatch;
498 TGGroupFrame *fFrameTofMatch;
499 TGGroupFrame *fFrameMagnetic;
501 TGHorizontalFrame *fTitleFrame;
502 TGHorizontalFrame *fMainFrame;
504 TGHorizontalFrame *fBesRunFrame;
505 TGHorizontalFrame *fBesEventFrame;
507 TGCheckButton *fChkBtnHeaderGlobal;
509 TGCheckButton *fChkBtnMdcHitsGlobal;
510 TGCheckButton *fChkBtnTofHitsGlobal;
511 TGCheckButton *fChkBtnTofHitsEast;
512 TGCheckButton *fChkBtnTofHitsBarrel;
513 TGCheckButton *fChkBtnTofHitsWest;
514 TGCheckButton *fChkBtnEmcHitsGlobal;
515 TGCheckButton *fChkBtnEmcHitsEast;
516 TGCheckButton *fChkBtnEmcHitsBarrel;
517 TGCheckButton *fChkBtnEmcHitsWest;
518 TGCheckButton *fChkBtnEmcHitsSide;
519 TGCheckButton *fChkBtnMucHitsGlobal;
520 TGCheckButton *fChkBtnMucHitsEast;
521 TGCheckButton *fChkBtnMucHitsBarrel;
522 TGCheckButton *fChkBtnMucHitsWest;
524 TGCheckButton *fChkBtnTracksGlobal;
525 TGCheckButton *fChkBtnTracksMdc;
526 TGCheckButton *fChkBtnTracksTof;
527 TGCheckButton *fChkBtnTracksEmc;
528 TGCheckButton *fChkBtnTracksMuc;
529 TGCheckButton *fChkBtnTracksExt;
531 TGCheckButton *fChkBtnMdcGlobal;
532 TGCheckButton *fChkBtnMdcTubes;
533 TGCheckButton *fChkBtnMdcWires;
534 TGCheckButton *fChkBtnTofGlobal;
535 TGCheckButton *fChkBtnTofEast;
536 TGCheckButton *fChkBtnTofBarrel;
537 TGCheckButton *fChkBtnTofWest;
538 TGCheckButton *fChkBtnEmcGlobal;
539 TGCheckButton *fChkBtnEmcEast;
540 TGCheckButton *fChkBtnEmcBarrel;
541 TGCheckButton *fChkBtnEmcWest;
542 TGCheckButton *fChkBtnEmcSide;
543 TGCheckButton *fChkBtnMucGlobal;
544 TGCheckButton *fChkBtnMucEast;
545 TGCheckButton *fChkBtnMucBarrel;
546 TGCheckButton *fChkBtnMucWest;
547 TGCheckButton *fChkBtnMucStrips;
549 TGCheckButton *fChkBtnBeamPipe;
550 TGCheckButton *fChkBtnZRPlaneOnXY;
551 TGCheckButton *fChkBtnAxis;
553 TGCheckButton *fChkBtnMdcTOverflowGlobal;
554 TGCheckButton *fChkBtnMdcQOverflowGlobal;
555 TGCheckButton *fChkBtnMdcTMatchGlobal;
556 TGCheckButton *fChkBtnMdcQMatchGlobal;
557 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
558 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
559 TGCheckButton *fChkBtnTofTMatchGlobal;
560 TGCheckButton *fChkBtnTofQMatchGlobal;
562 TGNumberEntry *fNumEntryMagnetic;
567 Long64_t fBesEventNo;
568 Long64_t fCurrentEvent;
569 Int_t fEventPlaySpeed;
570 Bool_t fAutoDisplayEvent;
571 TTimer *fAutoDisplayEventTimer;
573 Double_t fMoveFactor;
574 Double_t fRotateStep;
576 Double_t fRotateSpeed;
578 TTimer *fAutoRotateTimer;
579 Int_t fAutoRotateClockWise;
580 Int_t fAutoRotateTheta;
581 Int_t fAutoRotatePhi;
582 Int_t fAutoRotatePsi;
586 Double_t fViewThetaPreStep;
587 Double_t fViewPhiPreStep;
589 Double_t fHomeX[3], fHomeY[3];
595 TGLayoutHints *fLayout;
606 void SetMdcQNotOverflow(Bool_t input);
607 void SetMdcTFire(Bool_t input);
608 void SetMdcQFire(Bool_t input);
609 void SetMdcColorfulWire(Bool_t input);
610 void SetMdcTimeSubEvTime(Bool_t input);
611 void SetTofTMatch(Bool_t input);
612 void SetTofQMatch(Bool_t input);
615 BesClient(
const TGWindow *p,
const char*
title, UInt_t width, UInt_t height, Option_t *option =
"", Int_t argc = 0,
char **argv = 0);
665 virtual Bool_t
GetEvent(Long64_t i);
680 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
681 virtual void SetState(Int_t
id = -1);
690 virtual void SetRange(Double_t &input, Double_t
min, Double_t
max);
700 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 void SavePicAsPS()
virtual void CreateDisplayModeBar()
virtual void HandleSliders(Int_t id)
virtual void CreateTabs()
virtual void SaveMyConfig()
virtual void RotatePsi(int pn)
virtual void RotateClockWise(int clockwise)
virtual void CreateMenuBar()
virtual Bool_t GetEvent(Long64_t i)
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 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()
Double_t GetRotateSpeed()
virtual void InitParameter()
virtual void UpdateBesInputFields()
virtual void LoadGeoFile()