00001 #ifndef BES_Client_H
00002 #define BES_Client_H
00003
00004 #include <stdio.h>
00005 #include <unistd.h>
00006 #include <stdlib.h>
00007 #include <sys/sem.h>
00008 #include <sys/types.h>
00009 #include <sys/ipc.h>
00010
00011 #include <string.h>
00012
00013 #include <TSystem.h>
00014 #include <TGFrame.h>
00015 #include <TGeometry.h>
00016 #include <TGNumberEntry.h>
00017 #include <TViewerX3D.h>
00018 #include <TTimer.h>
00019 #include <TASImage.h>
00020
00021
00022 #include <stdio.h>
00023 #include <stdlib.h>
00024
00025 #include "BesVisLib/BesGMenuBar.h"
00026 #include "BesVisLib/BesGPictureButton.h"
00027 #include "BesVisLib/BesVisDisplay.h"
00028 #include "BesVisLib/BesEvent.h"
00029 #include "RootEventData/TRecTrackEvent.h"
00030 #include "RootEventData/TDigiEvent.h"
00031 #include "RootEventData/TTrigEvent.h"
00032 #include "RootEventData/TRecEvTime.h"
00033 #include "RootEventData/TRecEmcShower.h"
00034
00035
00036 union semun{
00037 int val;
00038 struct semid_ds *buf;
00039 ushort *array;
00040 };
00041
00042
00043
00044
00045 enum {FREE_SPACE, OUTPUT_STORE};
00046 enum runStatus{RUN_ERROR, RUN_SMOOTH};
00047
00048
00049
00050 #ifndef BES_EZCommand
00051 #define BES_EZCommand
00052 enum EZCommand {
00053 kM_File_LoadGeo,
00054 kM_File_SaveGeoAs,
00055 kM_File_OpenEvent,
00056 kM_File_SavePicAs,
00057 kM_File_Close,
00058 kM_File_Exit,
00059 kM_Edit_Editor,
00060 kM_Option_TimerSpeed,
00061 kM_Option_DefaultPicType,
00062 kM_Help_Content,
00063 kM_Help_About
00064 };
00065 #endif
00066
00067
00068 #ifndef BES_EZButtons
00069 #define BES_EZButtons
00070 enum EZButtons {
00071 kM_Button_LoadGeoFile,
00072 kM_Button_SaveGeoAs,
00073 kM_Button_OpenEventFile,
00074 kM_Button_SavePicAs,
00075 kM_Button_SavePicAsPS,
00076 kM_Button_Refresh,
00077 kM_Button_ResetCurrent,
00078 kM_Button_ResetAll,
00079 kM_Button_CursorPick,
00080 kM_Button_CursorHand,
00081 kM_Button_ZoomIn,
00082 kM_Button_ZoomOut,
00083 kM_Button_ZoomRatioNumber,
00084 kM_Button_SwitchDisplayMode,
00085 kM_Button_SetHome,
00086 kM_Button_GoHome,
00087 kM_Button_SaveMyConfig,
00088 kM_Button_LoadMyConfig,
00089 kM_Button_Palette,
00090 kM_Button_Help,
00091 kM_Button_DisplayMode2D,
00092 kM_Button_DisplayModeXY,
00093 kM_Button_DisplayModeZR,
00094 kM_Button_DisplayMode3D,
00095 kM_Button_DisplayModeAll,
00096 kM_Button_SwitchPad,
00097 kM_Button_ShowInfo,
00098 kM_Button_ShowAxis,
00099 kM_Button_FishEyeView,
00100 kM_Button_ParallelView,
00101 kM_Button_PerspectiveView,
00102 kM_Button_X3D,
00103 kM_Button_OpenGL,
00104 kM_Button_Online,
00105 kM_Button_File,
00106 kM_Button_Down,
00107 kM_Button_Bes,
00108 kM_Slider_EventPlay,
00109 kM_Button_PrevEvent,
00110 kM_Button_NextEvent,
00111 kM_Button_PlayEvent,
00112 kM_Button_FirstEvent,
00113 kM_Button_ViewResetAngle,
00114 kM_Button_ViewCounterClockWise,
00115 kM_Button_ViewClockWise,
00116 kM_Button_ViewMoveUp,
00117 kM_Button_ViewMoveLeft,
00118 kM_Button_ViewMoveRight,
00119 kM_Button_ViewMoveDown,
00120 kM_Button_ViewMoveCenter,
00121 kM_Slider_ViewAngleTheta,
00122 kM_Button_ViewAngleThetaPlus,
00123 kM_Button_ViewAngleThetaMinus,
00124 kM_Button_ViewAngleThetaNumber,
00125 kM_Slider_ViewAnglePhi,
00126 kM_Button_ViewAnglePhiPlus,
00127 kM_Button_ViewAnglePhiMinus,
00128 kM_Button_ViewAnglePhiNumber,
00129 kM_Slider_ViewAnglePsi,
00130 kM_Button_ViewAnglePsiPlus,
00131 kM_Button_ViewAnglePsiMinus,
00132 kM_Button_ViewAnglePsiNumber,
00133 kM_Button_RotateStep,
00134 kM_Button_AutoRotate,
00135 kM_Button_RotateSpeed,
00136 kM_Button_RotateFPS,
00137 kM_Button_BesRun,
00138 kM_Button_BesEvent,
00139 kM_Button_EventPlaySpeed,
00140 kM_Button_BesSamplePos,
00141 kM_Button_BesVar,
00142 kM_Button_BesBit,
00143 kM_Button_BesSample,
00144 kM_Button_BesGet,
00145 kM_Button_BesReset,
00146 kM_Button_DownZED,
00147 kM_Button_DownFZ,
00148 kM_Button_DownMDST,
00149 kM_Button_DownRaw,
00150 kM_Button_DownRawIncl,
00151 kM_Button_DownBrowse,
00152 kM_Button_DownEvents,
00153 kM_Button_DownSkip,
00154 kM_Button_DownGet,
00155 kM_Button_OnlineStart,
00156 kM_Button_OnlineTime,
00157 kM_Button_OnlineTime2,
00158 kM_Button_PRStart,
00159 kM_Button_PRTime,
00160 kM_Button_PRTime2,
00161 kM_Button_Magnetic,
00162 kM_Slider_Zoom
00163 };
00164 #endif
00165
00166
00167 #ifndef BES_EZMode
00168 #define BES_EZMode
00169 enum EZMode {
00170 kModeOnline = BIT(0),
00171 kModeFile = BIT(1),
00172 kModeDown = BIT(2),
00173 kModeBes = BIT(3),
00174 kModePR = BIT(4)
00175 };
00176 #endif
00177
00178 #ifndef BES_EZMenuViewOption
00179 #define BES_EZMenuViewOption
00180 enum EZMenuViewOption {
00181 kM_Header_Global,
00182 kM_Header_On,
00183 kM_Mdc_Global,
00184 kM_Mdc_Tubes,
00185 kM_Mdc_Wires,
00186 kM_Tof_Global,
00187 kM_Tof_East,
00188 kM_Tof_Barrel,
00189 kM_Tof_West,
00190 kM_Emc_Global,
00191 kM_Emc_East,
00192 kM_Emc_Barrel,
00193 kM_Emc_West,
00194 kM_Emc_Side,
00195 kM_Muc_Global,
00196 kM_Muc_East,
00197 kM_Muc_Barrel,
00198 kM_Muc_West,
00199 kM_Muc_Strips,
00200 kM_Full3D_Mdc,
00201 kM_Full3D_Tof,
00202 kM_Full3D_Emc,
00203 kM_Full3D_Muc,
00204 kM_BeamPipe,
00205 kM_ZRPlaneOnXY,
00206 kM_Axis,
00207 kM_MdcHits_Global,
00208 kM_MdcHits_Hits,
00209 kM_TofHits_Global,
00210 kM_TofHits_East,
00211 kM_TofHits_Barrel,
00212 kM_TofHits_West,
00213 kM_EmcHits_Global,
00214 kM_EmcHits_East,
00215 kM_EmcHits_Barrel,
00216 kM_EmcHits_West,
00217 kM_EmcHits_Side,
00218 kM_MucHits_Global,
00219 kM_MucHits_East,
00220 kM_MucHits_Barrel,
00221 kM_MucHits_West,
00222 kM_Tracks_Global,
00223 kM_Tracks_Mdc,
00224 kM_Tracks_Tof,
00225 kM_Tracks_Emc,
00226 kM_Tracks_Muc,
00227 kM_Tracks_Ext,
00228 kM_View_X3D,
00229 kM_View_OpenGL,
00230 kM_Standard_On,
00231 kM_User_On,
00232
00233 kM_Mdc_QNotOverflow_Global,
00234 kM_Mdc_ColorfulWire_Global,
00235 kM_Mdc_MdcTimeSubEvTime_Global,
00236 kM_Mdc_TMatch_Global,
00237 kM_Mdc_QMatch_Global,
00238 kM_Tof_TMatch_Global,
00239 kM_Tof_QMatch_Global
00240 };
00241 #endif
00242
00243 class TList;
00244 class TRootEmbeddedCanvas;
00245 class TApplication;
00246 class TInterpreter;
00247 class TFile;
00248 class TTimer;
00249 class TBranch;
00250 class TTree;
00251 class TGPopupMenu;
00252 class TGStatusBar;
00253 class TGHorizontal3DLine;
00254 class TGLayoutHints;
00255 class TGMenuBar;
00256 class TGNumberEntry;
00257 class TGNumberFormat;
00258 class TGLabel;
00259 class TGHButtonGroup;
00260 class TGRadioButton;
00261 class TGCheckButton;
00262 class TGTextButton;
00263 class TGTextBuffer;
00264 class TGTextEntry;
00265 class TGHProgressBar;
00266 class TGButton;
00267 class TGPictureButton;
00268 class TGFileInfo;
00269 class TGFileDialog;
00270 class TGMsgBox;
00271 class TGGroupFrame;
00272 class TGTab;
00273 class TGVSplitter;
00274 class TGCanvas;
00275 class TGListTree;
00276 class TGListTreeItem;
00277 class TGHSlider;
00278 class TGVSlider;
00279 class TCanvas;
00280 class TView;
00281 class TGListTreeItem;
00282
00283 class BesClient : public TGMainFrame {
00284
00285 private:
00286 runStatus f_runStatus;
00287 TGeometry *fGeometry;
00288 TFile *fGeoFile;
00289 TFile *fEventFile;
00290 TTree *fEventTree;
00291 BesEvent *fEvent;
00292 TEvtHeader *fEvtHeader;
00293 TRecEvTime *fRecEvTime;
00294
00295 TDigiEvent *fDigiEvent;
00296 TRecTrackEvent *fRecEvent_1;
00297 TRecMdcTrack *recTrack1;
00298 TRecMucTrack *muctrk;
00299 TRecTofTrack *tofTrack;
00300
00301 TRecMdcHit *mdchit;
00302 TRecEmcShower *emcshower;
00303
00304
00305 TGLayoutHints *fMenuBarLayout;
00306 TGLayoutHints *fMenuBarFirstItemLayout;
00307 TGLayoutHints *fMenuBarItemLayout;
00308 TGLayoutHints *fMenuBarLastItemLayout;
00309 TGLayoutHints *fECLayout;
00310
00311 BesGMenuBar *fMenuBar;
00312
00313 TGPopupMenu *fMenuFile;
00314 TGPopupMenu *fMenuEdit;
00315 TGPopupMenu *fMenuView;
00316 TGPopupMenu *fMenuHelp;
00317
00318 TGPopupMenu *fMenuViewOptionHeader;
00319 TGPopupMenu *fMenuViewOptionMdc;
00320 TGPopupMenu *fMenuViewOptionTof;
00321 TGPopupMenu *fMenuViewOptionEmc;
00322 TGPopupMenu *fMenuViewOptionMuc;
00323 TGPopupMenu *fMenuViewOptionFull3D;
00324 TGPopupMenu *fMenuViewOptionOthers;
00325 TGPopupMenu *fMenuViewOptionMdcHits;
00326 TGPopupMenu *fMenuViewOptionTofHits;
00327 TGPopupMenu *fMenuViewOptionEmcHits;
00328 TGPopupMenu *fMenuViewOptionMucHits;
00329 TGPopupMenu *fMenuViewOptionTracks;
00330
00331 TGLayoutHints *fUpButtonBarFirstItemLayout;
00332 TGLayoutHints *fUpButtonBarItemLayout;
00333 TGLayoutHints *fUpButtonBarLastItemLayout;
00334 TGCompositeFrame *fUpButtonBarFrame;
00335
00336 static const int kNUpSplitter = 4;
00337 BesGPictureButton *fUpButtonSplitter[kNUpSplitter];
00338 BesGPictureButton *fLoadGeoFileButton;
00339 BesGPictureButton *fOpenEventFileButton;
00340 BesGPictureButton *fSaveGeoAsButton;
00341 BesGPictureButton *fSavePicAsButton;
00342 BesGPictureButton *fSavePicAsPSButton;
00343 static const int kNCursorState = 2;
00344 BesGPictureButton *fRefreshButton;
00345 BesGPictureButton *fResetCurrentButton;
00346 BesGPictureButton *fResetAllButton;
00347 BesGPictureButton *fCursorButton[kNCursorState];
00348 BesGPictureButton *fZoomInButton;
00349 BesGPictureButton *fZoomOutButton;
00350 TGNumberEntryField *fZoomRatioNumber;
00351 BesGPictureButton *fZoomRatioPercentButton;
00352 BesGPictureButton *fSwitchDisplayModeButton;
00353 BesGPictureButton *fSetHomeButton;
00354 BesGPictureButton *fGoHomeButton;
00355 BesGPictureButton *fSaveMyConfigButton;
00356 BesGPictureButton *fLoadMyConfigButton;
00357 BesGPictureButton *fPaletteButton;
00358 BesGPictureButton *fHelpButton;
00359
00360 TGLayoutHints *fDisplayModeBarItemLayout;
00361 TGCompositeFrame *fDisplayModeBarFrame;
00362 static const int kNDisplayMode = 5;
00363 BesGPictureButton *fDisplayModeButton[kNDisplayMode];
00364
00365 TGLayoutHints *fToolBarFirstItemLayout;
00366 TGLayoutHints *fToolBarItemLayout;
00367 TGLayoutHints *fToolBarLastItemLayout;
00368 TGCompositeFrame *fToolBarFrame;
00369
00370 static const int kNToolSplitter = 4;
00371 BesGPictureButton *fToolButtonSplitter[kNToolSplitter];
00372 BesGPictureButton *fSwitchPadButton;
00373 BesGPictureButton *fShowInfoButton;
00374 BesGPictureButton *fShowAxisButton;
00375 BesGPictureButton *fFishEyeViewButton;
00376 BesGPictureButton *fParallelViewButton;
00377 BesGPictureButton *fPerspectiveViewButton;
00378 BesGPictureButton *fX3DButton;
00379 BesGPictureButton *fOpenGLButton;
00380
00381 TGCanvas *fEventListView;
00382 TRootEmbeddedCanvas *fEmbeddedCanvas;
00383 TCanvas *fCanvas;
00384 BesVisDisplay *fDisplay;
00385
00386 TGVerticalFrame *fV1;
00387
00388 TGTab *fTabs;
00389
00390 TGListTree *fEventListTree;
00391 TGListTreeItem *fItem;
00392 TGListTreeItem *fRunItem;
00393
00394
00395 TGCompositeFrame *fEventDownFrame;
00396 TGCompositeFrame *fEventControlFrame;
00397 TGCompositeFrame *fEventControlTextFrame;
00398 TGCompositeFrame *fEventNavFrame;
00399 TGCompositeFrame *fEventPlayTextFrame;
00400 TGCompositeFrame *fEventPlayButtonFrame;
00401 TGCompositeFrame *fEventPlaySpeedFrame;
00402 TGCompositeFrame *fEventListFrame;
00403 TGCompositeFrame *fEventListTextFrame;
00404 TGCompositeFrame *fEventListContentFrame;
00405
00406 TGCompositeFrame *fAutoFrame;
00407 TGCompositeFrame *fAutoTextFrame;
00408
00409 TGCompositeFrame *fViewFrame;
00410 TGCompositeFrame *fViewTextFrame;
00411 TGCompositeFrame *fViewContentFrame;
00412 TGCompositeFrame *fViewContent1Frame;
00413 TGCompositeFrame *fViewContent2Frame;
00414 TGCompositeFrame *fViewContent3Frame;
00415 TGCompositeFrame *fViewAngleFrame;
00416 TGCompositeFrame *fViewAngleThetaFrame;
00417 TGCompositeFrame *fViewAnglePhiFrame;
00418 TGCompositeFrame *fViewAnglePsiFrame;
00419
00420 TGNumberEntry *fNumEntryRunNo;
00421 TGNumberEntry *fNumEntryEventNo;
00422 TGNumberEntry *fNumEntryEventPlaySpeed;
00423
00424
00425 TGLabel *fEventControlTextLabel;
00426 TGLabel *fBesLabelRun;
00427 TGLabel *fBesLabelEvent;
00428 TGLabel *fEventPlayTextLabel;
00429 TGLabel *fEventPlaySpeedLabel;
00430 TGLabel *fEventListTextLabel;
00431 TGLabel *fViewTextLabel;
00432 TGLabel *fAutoTextLabel;
00433
00434 TGHSlider *fEventPlaySlider;
00435 BesGPictureButton *fPrevEventButton;
00436 BesGPictureButton *fNextEventButton;
00437 BesGPictureButton *fPlayEventButton;
00438 BesGPictureButton *fFirstEventButton;
00439
00440 BesGPictureButton *fViewResetAngleButton;
00441 BesGPictureButton *fViewCounterClockWiseButton;
00442 BesGPictureButton *fViewClockWiseButton;
00443 BesGPictureButton *fViewMoveUpButton;
00444 BesGPictureButton *fViewMoveLeftButton;
00445 BesGPictureButton *fViewMoveRightButton;
00446 BesGPictureButton *fViewMoveDownButton;
00447 BesGPictureButton *fViewMoveCenterButton;
00448
00449 BesGPictureButton *fViewAngleThetaPlusButton;
00450 BesGPictureButton *fViewAngleThetaMinusButton;
00451 TGVSlider *fViewAngleThetaSlider;
00452 TGNumberEntryField *fViewAngleThetaNumber;
00453 TGLabel *fViewAngleThetaLabel;
00454
00455 BesGPictureButton *fViewAnglePhiPlusButton;
00456 BesGPictureButton *fViewAnglePhiMinusButton;
00457 TGVSlider *fViewAnglePhiSlider;
00458 TGNumberEntryField *fViewAnglePhiNumber;
00459 TGLabel *fViewAnglePhiLabel;
00460
00461 BesGPictureButton *fViewAnglePsiPlusButton;
00462 BesGPictureButton *fViewAnglePsiMinusButton;
00463 TGVSlider *fViewAnglePsiSlider;
00464 TGNumberEntryField *fViewAnglePsiNumber;
00465 TGLabel *fViewAnglePsiLabel;
00466
00467 TGCompositeFrame *fRotateStepFrame;
00468 TGLabel *fRotateStepLabel;
00469 TGNumberEntryField *fNumEntryRotateStep;
00470 TGLabel *fRotateStepUnitLabel;
00471
00472 TGGroupFrame *fFrameAutoRotate;
00473 TGCheckButton *fChkBtnAutoRotate;
00474
00475 TGCompositeFrame *fRotateSpeedFrame;
00476 TGNumberEntryField *fNumEntryRotateSpeed;
00477 TGLabel *fRotateSpeedLabel;
00478
00479 TGCompositeFrame *fRotateFPSFrame;
00480 TGNumberEntry *fNumEntryRotateFPS;
00481 TGLabel *fRotateFPSLabel;
00482
00483
00484 TGStatusBar *fStatusBar;
00485
00486 TGGroupFrame *fFrameHeader;
00487 TGGroupFrame *fFrameHits;
00488 TGGroupFrame *fFrameTracks;
00489
00490 TGGroupFrame *fFrameSubDetector;
00491
00492
00493
00494
00495 TGGroupFrame *fFrameOthers;
00496
00497 TGGroupFrame *fFrameMdcMatch;
00498 TGGroupFrame *fFrameTofMatch;
00499 TGGroupFrame *fFrameMagnetic;
00500
00501 TGHorizontalFrame *fTitleFrame;
00502 TGHorizontalFrame *fMainFrame;
00503
00504 TGHorizontalFrame *fBesRunFrame;
00505 TGHorizontalFrame *fBesEventFrame;
00506
00507 TGCheckButton *fChkBtnHeaderGlobal;
00508
00509 TGCheckButton *fChkBtnMdcHitsGlobal;
00510 TGCheckButton *fChkBtnTofHitsGlobal;
00511 TGCheckButton *fChkBtnTofHitsEast;
00512 TGCheckButton *fChkBtnTofHitsBarrel;
00513 TGCheckButton *fChkBtnTofHitsWest;
00514 TGCheckButton *fChkBtnEmcHitsGlobal;
00515 TGCheckButton *fChkBtnEmcHitsEast;
00516 TGCheckButton *fChkBtnEmcHitsBarrel;
00517 TGCheckButton *fChkBtnEmcHitsWest;
00518 TGCheckButton *fChkBtnEmcHitsSide;
00519 TGCheckButton *fChkBtnMucHitsGlobal;
00520 TGCheckButton *fChkBtnMucHitsEast;
00521 TGCheckButton *fChkBtnMucHitsBarrel;
00522 TGCheckButton *fChkBtnMucHitsWest;
00523
00524 TGCheckButton *fChkBtnTracksGlobal;
00525 TGCheckButton *fChkBtnTracksMdc;
00526 TGCheckButton *fChkBtnTracksTof;
00527 TGCheckButton *fChkBtnTracksEmc;
00528 TGCheckButton *fChkBtnTracksMuc;
00529 TGCheckButton *fChkBtnTracksExt;
00530
00531 TGCheckButton *fChkBtnMdcGlobal;
00532 TGCheckButton *fChkBtnMdcTubes;
00533 TGCheckButton *fChkBtnMdcWires;
00534 TGCheckButton *fChkBtnTofGlobal;
00535 TGCheckButton *fChkBtnTofEast;
00536 TGCheckButton *fChkBtnTofBarrel;
00537 TGCheckButton *fChkBtnTofWest;
00538 TGCheckButton *fChkBtnEmcGlobal;
00539 TGCheckButton *fChkBtnEmcEast;
00540 TGCheckButton *fChkBtnEmcBarrel;
00541 TGCheckButton *fChkBtnEmcWest;
00542 TGCheckButton *fChkBtnEmcSide;
00543 TGCheckButton *fChkBtnMucGlobal;
00544 TGCheckButton *fChkBtnMucEast;
00545 TGCheckButton *fChkBtnMucBarrel;
00546 TGCheckButton *fChkBtnMucWest;
00547 TGCheckButton *fChkBtnMucStrips;
00548
00549 TGCheckButton *fChkBtnBeamPipe;
00550 TGCheckButton *fChkBtnZRPlaneOnXY;
00551 TGCheckButton *fChkBtnAxis;
00552
00553 TGCheckButton *fChkBtnMdcTOverflowGlobal;
00554 TGCheckButton *fChkBtnMdcQOverflowGlobal;
00555 TGCheckButton *fChkBtnMdcTMatchGlobal;
00556 TGCheckButton *fChkBtnMdcQMatchGlobal;
00557 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
00558 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
00559 TGCheckButton *fChkBtnTofTMatchGlobal;
00560 TGCheckButton *fChkBtnTofQMatchGlobal;
00561
00562 TGNumberEntry *fNumEntryMagnetic;
00563
00564 TString fBesVisPath;
00565
00566 Long64_t fBesRunNo;
00567 Long64_t fBesEventNo;
00568 Long64_t fCurrentEvent;
00569 Int_t fEventPlaySpeed;
00570 Bool_t fAutoDisplayEvent;
00571 TTimer *fAutoDisplayEventTimer;
00572
00573 Double_t fMoveFactor;
00574 Double_t fRotateStep;
00575 Int_t fRotateFPS;
00576 Double_t fRotateSpeed;
00577 Bool_t fAutoRotate;
00578 TTimer *fAutoRotateTimer;
00579 Int_t fAutoRotateClockWise;
00580 Int_t fAutoRotateTheta;
00581 Int_t fAutoRotatePhi;
00582 Int_t fAutoRotatePsi;
00583
00584 Int_t fViewer3DMode;
00585
00586 Double_t fViewThetaPreStep;
00587 Double_t fViewPhiPreStep;
00588
00589 Double_t fHomeX[3], fHomeY[3];
00590
00591 Int_t fWindowWidth;
00592 Int_t fWindowHeight;
00593
00594 TList *fWidgets;
00595 TGLayoutHints *fLayout;
00596
00597
00598 TString f_evtFile;
00599 TString f_geoFile;
00600 Bool_t f_bossMode;
00601 Int_t f_pid;
00602 TString f_evtFile_1;
00603
00604 private:
00605
00606 void SetMdcQNotOverflow(Bool_t input);
00607 void SetMdcTFire(Bool_t input);
00608 void SetMdcQFire(Bool_t input);
00609 void SetMdcColorfulWire(Bool_t input);
00610 void SetMdcTimeSubEvTime(Bool_t input);
00611 void SetTofTMatch(Bool_t input);
00612 void SetTofQMatch(Bool_t input);
00613
00614 public:
00615 BesClient(const TGWindow *p, const char* title, UInt_t width, UInt_t height, Option_t *option = "", Int_t argc = 0, char **argv = 0);
00616 virtual ~BesClient();
00617 virtual void InitLocal();
00618 virtual void InitParameter();
00619 virtual void InitConnections();
00620
00621 virtual void CreateWidget(const char* title, UInt_t width, UInt_t height);
00622 virtual void CreateHorizontalRuler();
00623 virtual void CreateMenuBar();
00624 virtual void CreateUpButtonBar();
00625 virtual void CreateDisplayModeBar();
00626 virtual void CreateToolBar();
00627 virtual void CreateTitleBar();
00628 virtual void CreateStatusBar();
00629 virtual void CreateMainFrame();
00630 virtual void CreateCanvas();
00631 virtual void CreateTabs();
00632
00633 virtual void HandleMenu(Int_t id);
00634 virtual void HandleViewOptionMenu(Int_t id);
00635 virtual void HandleError(const char* msg);
00636 virtual void HandleInfoBar(const char* msg);
00637 virtual void HandleStatusBar(const char* msg);
00638 virtual void HandleButtons(Int_t id=-1);
00639 virtual void HandleSliders(Int_t id);
00640 virtual void HandleEventList(TGListTreeItem *entry, Int_t btn);
00641 virtual void UpdateBesInputFields();
00642
00643 virtual void LoadGeoFile();
00644 virtual void OpenGeoFile(TString filename);
00645 virtual void SaveGeoAs();
00646 virtual void OpenEventFile();
00647 virtual void OpenEventFile(TString filename);
00648 virtual void SavePicAs();
00649 virtual void SavePicAsPS();
00650 virtual void SetHome();
00651 virtual void GoHome();
00652 virtual void SaveMyConfig();
00653 virtual void LoadMyConfig();
00654 virtual void LoadMdcPalette();
00655 virtual void Help();
00656
00657 virtual void SetAllDisplayModeButtonUnHL();
00658
00659 virtual void X3D();
00660 virtual void OpenGL();
00661
00662 virtual void Show();
00663 virtual void CloseWindow();
00664
00665 virtual Bool_t GetEvent(Long64_t i);
00666 virtual Bool_t GetRecEvent();
00667 virtual Bool_t NextEvent();
00668 virtual Bool_t PrevEvent();
00669 virtual void AutoDisplayEvent();
00670 virtual void AutoDisplayEventCommand();
00671 virtual Bool_t FirstEvent();
00672
00673 virtual void RotateClockWise(int clockwise);
00674 virtual void RotateTheta(int pn);
00675 virtual void RotatePhi(int pn);
00676 virtual void RotatePsi(int pn);
00677 virtual void AutoRotate();
00678 virtual void AutoRotateCommand();
00679
00680 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
00681 virtual void SetState(Int_t id = -1);
00682 virtual void UpdateStatus();
00683 virtual void UpdateAllView();
00684 virtual void UpdateCurrentPad();
00685 virtual void ChangeFocus();
00686 virtual void ExecuteReturn();
00687
00688 virtual Pixmap_t GetPic(const char *file);
00689 virtual Bool_t FileExists(TString fname);
00690 virtual void SetRange(Double_t &input, Double_t min, Double_t max);
00691
00692 inline Long64_t GetBesRunNo() { return fBesRunNo; }
00693 inline Long64_t GetBesEventNo() { return fBesEventNo; }
00694 inline Int_t GetEventPlaySpeed() { return fEventPlaySpeed; }
00695
00696 inline Int_t GetRotateFPS() { return fRotateFPS; }
00697 inline Double_t GetRotateSpeed() { return fRotateSpeed; }
00698 inline Double_t GetRotateStep() { return fRotateStep; }
00699 inline void SetRotateSpeed() { fRotateSpeed = fRotateStep * fRotateFPS; }
00700 inline void SetRotateStep() { if (fRotateFPS != 0) fRotateStep = fRotateSpeed/fRotateFPS; else fRotateStep = 0.0; }
00701
00702 ClassDef(BesClient,0)
00703 };
00704
00705 #endif