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/TDstEvent.h"
182#ifndef BES_EZMenuViewOption
183#define BES_EZMenuViewOption
248class TRootEmbeddedCanvas;
257class TGHorizontal3DLine;
271class TGPictureButton;
291 TGeometry *fGeometry;
312 TGLayoutHints *fMenuBarLayout;
313 TGLayoutHints *fMenuBarFirstItemLayout;
314 TGLayoutHints *fMenuBarItemLayout;
315 TGLayoutHints *fMenuBarLastItemLayout;
316 TGLayoutHints *fECLayout;
320 TGPopupMenu *fMenuFile;
321 TGPopupMenu *fMenuEdit;
322 TGPopupMenu *fMenuView;
323 TGPopupMenu *fMenuHelp;
325 TGPopupMenu *fMenuViewOptionHeader;
326 TGPopupMenu *fMenuViewOptionMdc;
327 TGPopupMenu *fMenuViewOptionTof;
328 TGPopupMenu *fMenuViewOptionEmc;
329 TGPopupMenu *fMenuViewOptionMuc;
330 TGPopupMenu *fMenuViewOptionFull3D;
331 TGPopupMenu *fMenuViewOptionOthers;
332 TGPopupMenu *fMenuViewOptionMdcHits;
333 TGPopupMenu *fMenuViewOptionTofHits;
334 TGPopupMenu *fMenuViewOptionEmcHits;
335 TGPopupMenu *fMenuViewOptionMucHits;
336 TGPopupMenu *fMenuViewOptionTracks;
338 TGLayoutHints *fUpButtonBarFirstItemLayout;
339 TGLayoutHints *fUpButtonBarItemLayout;
340 TGLayoutHints *fUpButtonBarLastItemLayout;
341 TGCompositeFrame *fUpButtonBarFrame;
343 static const int kNUpSplitter = 4;
350 static const int kNCursorState = 2;
357 TGNumberEntryField *fZoomRatioNumber;
367 TGLayoutHints *fDisplayModeBarItemLayout;
368 TGCompositeFrame *fDisplayModeBarFrame;
369 static const int kNDisplayMode = 5;
372 TGLayoutHints *fToolBarFirstItemLayout;
373 TGLayoutHints *fToolBarItemLayout;
374 TGLayoutHints *fToolBarLastItemLayout;
375 TGCompositeFrame *fToolBarFrame;
377 static const int kNToolSplitter = 4;
388 TGCanvas *fEventListView;
389 TRootEmbeddedCanvas *fEmbeddedCanvas;
393 TGVerticalFrame *fV1;
397 TGListTree *fEventListTree;
398 TGListTreeItem *fItem;
399 TGListTreeItem *fRunItem;
402 TGCompositeFrame *fEventDownFrame;
403 TGCompositeFrame *fEventControlFrame;
404 TGCompositeFrame *fEventControlTextFrame;
405 TGCompositeFrame *fEventNavFrame;
406 TGCompositeFrame *fEventPlayTextFrame;
407 TGCompositeFrame *fEventPlayButtonFrame;
408 TGCompositeFrame *fEventPlaySpeedFrame;
409 TGCompositeFrame *fEventListFrame;
410 TGCompositeFrame *fEventListTextFrame;
411 TGCompositeFrame *fEventListContentFrame;
413 TGCompositeFrame *fAutoFrame;
414 TGCompositeFrame *fAutoTextFrame;
416 TGCompositeFrame *fViewFrame;
417 TGCompositeFrame *fViewTextFrame;
418 TGCompositeFrame *fViewContentFrame;
419 TGCompositeFrame *fViewContent1Frame;
420 TGCompositeFrame *fViewContent2Frame;
421 TGCompositeFrame *fViewContent3Frame;
422 TGCompositeFrame *fViewAngleFrame;
423 TGCompositeFrame *fViewAngleThetaFrame;
424 TGCompositeFrame *fViewAnglePhiFrame;
425 TGCompositeFrame *fViewAnglePsiFrame;
427 TGNumberEntry *fNumEntryRunNo;
428 TGNumberEntry *fNumEntryEventNo;
429 TGNumberEntry *fNumEntryEventPlaySpeed;
432 TGLabel *fEventControlTextLabel;
433 TGLabel *fBesLabelRun;
434 TGLabel *fBesLabelEvent;
435 TGLabel *fEventPlayTextLabel;
436 TGLabel *fEventPlaySpeedLabel;
437 TGLabel *fEventListTextLabel;
438 TGLabel *fViewTextLabel;
439 TGLabel *fAutoTextLabel;
441 TGHSlider *fEventPlaySlider;
458 TGVSlider *fViewAngleThetaSlider;
459 TGNumberEntryField *fViewAngleThetaNumber;
460 TGLabel *fViewAngleThetaLabel;
464 TGVSlider *fViewAnglePhiSlider;
465 TGNumberEntryField *fViewAnglePhiNumber;
466 TGLabel *fViewAnglePhiLabel;
470 TGVSlider *fViewAnglePsiSlider;
471 TGNumberEntryField *fViewAnglePsiNumber;
472 TGLabel *fViewAnglePsiLabel;
474 TGCompositeFrame *fRotateStepFrame;
475 TGLabel *fRotateStepLabel;
476 TGNumberEntryField *fNumEntryRotateStep;
477 TGLabel *fRotateStepUnitLabel;
479 TGGroupFrame *fFrameAutoRotate;
480 TGCheckButton *fChkBtnAutoRotate;
482 TGCompositeFrame *fRotateSpeedFrame;
483 TGNumberEntryField *fNumEntryRotateSpeed;
484 TGLabel *fRotateSpeedLabel;
486 TGCompositeFrame *fRotateFPSFrame;
487 TGNumberEntry *fNumEntryRotateFPS;
488 TGLabel *fRotateFPSLabel;
491 TGStatusBar *fStatusBar;
493 TGGroupFrame *fFrameHeader;
494 TGGroupFrame *fFrameHits;
495 TGGroupFrame *fFrameTracks;
497 TGGroupFrame *fFrameSubDetector;
502 TGGroupFrame *fFrameOthers;
504 TGGroupFrame *fFrameMdcMatch;
505 TGGroupFrame *fFrameTofMatch;
506 TGGroupFrame *fFrameMagnetic;
508 TGHorizontalFrame *fTitleFrame;
509 TGHorizontalFrame *fMainFrame;
511 TGHorizontalFrame *fBesRunFrame;
512 TGHorizontalFrame *fBesEventFrame;
514 TGCheckButton *fChkBtnHeaderGlobal;
516 TGCheckButton *fChkBtnMdcHitsGlobal;
517 TGCheckButton *fChkBtnTofHitsGlobal;
518 TGCheckButton *fChkBtnTofHitsEast;
519 TGCheckButton *fChkBtnTofHitsBarrel;
520 TGCheckButton *fChkBtnTofHitsWest;
521 TGCheckButton *fChkBtnEmcHitsGlobal;
522 TGCheckButton *fChkBtnEmcHitsEast;
523 TGCheckButton *fChkBtnEmcHitsBarrel;
524 TGCheckButton *fChkBtnEmcHitsWest;
525 TGCheckButton *fChkBtnEmcHitsSide;
526 TGCheckButton *fChkBtnMucHitsGlobal;
527 TGCheckButton *fChkBtnMucHitsEast;
528 TGCheckButton *fChkBtnMucHitsBarrel;
529 TGCheckButton *fChkBtnMucHitsWest;
531 TGCheckButton *fChkBtnTracksGlobal;
532 TGCheckButton *fChkBtnTracksMdc;
533 TGCheckButton *fChkBtnTracksTof;
534 TGCheckButton *fChkBtnTracksEmc;
535 TGCheckButton *fChkBtnTracksMuc;
536 TGCheckButton *fChkBtnTracksExt;
538 TGCheckButton *fChkBtnMdcGlobal;
539 TGCheckButton *fChkBtnMdcTubes;
540 TGCheckButton *fChkBtnMdcWires;
541 TGCheckButton *fChkBtnTofGlobal;
542 TGCheckButton *fChkBtnTofEast;
543 TGCheckButton *fChkBtnTofBarrel;
544 TGCheckButton *fChkBtnTofWest;
545 TGCheckButton *fChkBtnEmcGlobal;
546 TGCheckButton *fChkBtnEmcEast;
547 TGCheckButton *fChkBtnEmcBarrel;
548 TGCheckButton *fChkBtnEmcWest;
549 TGCheckButton *fChkBtnEmcSide;
550 TGCheckButton *fChkBtnMucGlobal;
551 TGCheckButton *fChkBtnMucEast;
552 TGCheckButton *fChkBtnMucBarrel;
553 TGCheckButton *fChkBtnMucWest;
554 TGCheckButton *fChkBtnMucStrips;
556 TGCheckButton *fChkBtnBeamPipe;
557 TGCheckButton *fChkBtnZRPlaneOnXY;
558 TGCheckButton *fChkBtnAxis;
560 TGCheckButton *fChkBtnMdcTOverflowGlobal;
561 TGCheckButton *fChkBtnMdcQOverflowGlobal;
562 TGCheckButton *fChkBtnMdcTMatchGlobal;
563 TGCheckButton *fChkBtnMdcQMatchGlobal;
564 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
565 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
566 TGCheckButton *fChkBtnTofTMatchGlobal;
567 TGCheckButton *fChkBtnTofQMatchGlobal;
569 TGNumberEntry *fNumEntryMagnetic;
574 Long64_t fBesEventNo;
575 Long64_t fCurrentEvent;
576 Int_t fEventPlaySpeed;
577 Bool_t fAutoDisplayEvent;
578 TTimer *fAutoDisplayEventTimer;
580 Double_t fMoveFactor;
581 Double_t fRotateStep;
583 Double_t fRotateSpeed;
585 TTimer *fAutoRotateTimer;
586 Int_t fAutoRotateClockWise;
587 Int_t fAutoRotateTheta;
588 Int_t fAutoRotatePhi;
589 Int_t fAutoRotatePsi;
593 Double_t fViewThetaPreStep;
594 Double_t fViewPhiPreStep;
596 Double_t fHomeX[3], fHomeY[3];
602 TGLayoutHints *fLayout;
613 std::string f_HelpText;
623 void SetMdcQNotOverflow(Bool_t input);
624 void SetMdcTFire(Bool_t input);
625 void SetMdcQFire(Bool_t input);
626 void SetMdcColorfulWire(Bool_t input);
627 void SetMdcTimeSubEvTime(Bool_t input);
628 void SetTofTMatch(Bool_t input);
629 void SetTofQMatch(Bool_t input);
632 BesClient(
const TGWindow *p,
const char*
title, UInt_t width, UInt_t height, Option_t *option =
"", Int_t argc = 0,
char **argv = 0);
688 virtual Bool_t
GetEvent(Long64_t i,
bool openfile =
false,
bool sel_geom =
false);
704 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
725 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
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel)
virtual void CreateStatusBar()
virtual void CreateUpButtonBar()
Int_t GetEventPlaySpeed()
virtual Bool_t FileExists(TString fname)
virtual void RotateTheta(int pn)
virtual void HandleEventList(TGListTreeItem *entry, Int_t btn)
virtual void CreateWidget(const char *title, UInt_t width, UInt_t height)
virtual void InitGeoSelector(const char *geomsel_file)
virtual void UpdateAllView()
virtual Bool_t GetRecEvent()
BesClient(const TGWindow *p, const char *title, UInt_t width, UInt_t height, Option_t *option="", Int_t argc=0, char **argv=0)
virtual void OpenGeoFile(TString filename)
virtual void CreateMainFrame()
virtual void HandleError(const char *msg)
virtual void SetRange(Double_t &input, Double_t min, Double_t max)
virtual void SetAllDisplayModeButtonUnHL()
virtual void LoadMyConfig()
virtual void UpdateStatus()
virtual void HandleMenu(Int_t id)
virtual void UpdateCurrentPad()
virtual Bool_t FirstEvent()
virtual void LoadMdcPalette()
virtual Bool_t LastEvent()
virtual void SaveMyConfig()
virtual void CreateCanvas()
virtual void ExecuteReturn()
virtual void CreateDisplayModeBar()
virtual void HandleInfoBar(const char *msg)
virtual void HandleViewOptionMenu(Int_t id)
virtual void HandleStatusBar(const char *msg)
virtual void InitParameter()
virtual void RotateClockWise(int clockwise)
virtual void HandleButtons(Int_t id=-1)
virtual void InitConnections()
virtual const char * GetCurrentPadString()
virtual void UpdateBesInputFields()
virtual Pixmap_t GetPic(const char *file)
virtual void AutoRotateCommand()
virtual Bool_t NextEvent()
virtual void RotatePhi(int pn)
virtual void CreateTabs()
virtual void AutoRotate()
virtual void ChangeFocus()
virtual Bool_t PrevEvent()
virtual void RotatePsi(int pn)
virtual void CloseWindow()
virtual void AutoDisplayEventCommand()
virtual void HandleSliders(Int_t id)
virtual void SetState(Int_t id=-1)
virtual Bool_t GetEvent(Long64_t i, bool openfile=false, bool sel_geom=false)
virtual void CreateHorizontalRuler()
virtual void OpenEventFile()
virtual void AutoDisplayEvent()
virtual void SavePicAsPS()
virtual void CreateTitleBar()
virtual void OpenEventFile(TString filename, bool auto_sel_geom=false)
Double_t GetRotateSpeed()
virtual void LoadGeoFile()
virtual void CreateMenuBar()
virtual void CreateToolBar()