BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
BesClient.h
Go to the documentation of this file.
1#ifndef BES_Client_H
2#define BES_Client_H
3
4#include <cstdio> //Long Peixun's update: stdio.h -> cstdio
5#include <unistd.h>
6#include <cstdlib> //Long Peixun's update: stdlib.h -> cstdlib
7#include <sys/sem.h>
8#include <sys/types.h>
9#include <sys/ipc.h>
10//#include <wait.h>
11#include <cstring> //Long Peixun's update: string.h -> cstring
12#include <string> //Long Peixun's update: std::string class
13
14#include <TSystem.h>
15#include <TGFrame.h>
16#include <TGeometry.h>
17#include <TGNumberEntry.h>
18#include <TViewerX3D.h>
19#include <TTimer.h>
20#include <TASImage.h>
21
22//Long Peixun's update: remove redundant include
23// #include <stdio.h>
24// #include <stdlib.h>
25
26//Long Peixun's update: for geometry selection
27#include "BesGeoSelector.h"
31#include "BesVisLib/BesEvent.h"
37#include "RootEventData/TDstEvent.h" //Long Peixun's update: for dst file
39
40// semphore
41union semun{
42 int val;
43 struct semid_ds *buf;
44 ushort *array;
45};
46
47//struct sembuf acquire = {0, -1, SEM_UNDO};
48//struct sembuf release = {0, 1, SEM_UNDO};
49
52
53
54// BesVis GUI command IDs
55#ifndef BES_EZCommand
56#define BES_EZCommand
69};
70#endif
71
72// Bes button command IDs
73#ifndef BES_EZButtons
74#define BES_EZButtons
169#endif
170
171// BesVis running modes
172#ifndef BES_EZMode
173#define BES_EZMode
174enum EZMode {
175 kModeOnline = BIT(0),
176 kModeFile = BIT(1),
177 kModeDown = BIT(2),
178 kModeBes = BIT(3),
179 kModePR = BIT(4)
181#endif
182
183#ifndef BES_EZMenuViewOption
184#define BES_EZMenuViewOption
187 //kM_Header_On, //Long Peixun's update: remove kM_Header_On, because we just need kM_Header_Global
239 //kM_Mdc_TOverflow_Global,
248#endif
249
250class TList;
251class TRootEmbeddedCanvas;
252class TApplication;
253class TInterpreter;
254class TFile;
255class TTimer;
256class TBranch;
257class TTree;
258class TGPopupMenu;
259class TGStatusBar;
260class TGHorizontal3DLine;
261class TGLayoutHints;
262class TGMenuBar;
263class TGNumberEntry;
264class TGNumberFormat;
265class TGLabel;
266class TGHButtonGroup;
267class TGRadioButton;
268class TGCheckButton;
269class TGTextButton;
270class TGTextBuffer;
271class TGTextEntry;
272class TGHProgressBar;
273class TGButton;
274class TGPictureButton;
275class TGFileInfo;
276class TGFileDialog;
277class TGMsgBox;
278class TGGroupFrame;
279class TGTab;
280class TGVSplitter;
281class TGCanvas;
282class TGListTree;
283class TGListTreeItem;
284class TGHSlider;
285class TGVSlider;
286class TCanvas;
287class TView;
288class TGListTreeItem;
289
290class BesClient : public TGMainFrame {
291
292 private:
293 runStatus f_runStatus;
294 TGeometry *fGeometry; // Bes geometry
295 TFile *fGeoFile; // ROOT geometry file contains volBes
296 TFile *fEventFile; // Current event file
297 TTree *fEventTree; // Current event tree
298 BesEvent *fEvent; // Current Bes event
299 TEvtHeader *fEvtHeader;
300 TRecEvTime *fRecEvTime;
301 //TTrigEvent *fTrigEvent;
302 TDigiEvent *fDigiEvent;
303 TRecTrackEvent *fRecEvent_1;
304 TRecMdcTrack *recTrack1;
305 TRecMucTrack *muctrk;
306 TRecTofTrack *tofTrack;
307 //TRecMdcKalTrack *kalTrack;
308 TRecMdcHit *mdchit;
309 TRecEmcShower *emcshower;
310 TDstEvent* fDstEvent; //Long Peixun's update: for tracks from dst file
311 Bool_t isRecEvent; //Long Peixun's update: is this event rec event?
312 TMcEvent* fMcEvent;
313
314 Int_t NCluster; //...
315
316 TGLayoutHints *fMenuBarLayout; // Menu bar layout
317 TGLayoutHints *fMenuBarFirstItemLayout; // First Item popup menu layout
318 TGLayoutHints *fMenuBarItemLayout; // Item popup menu layout
319 TGLayoutHints *fMenuBarLastItemLayout; // Last Item popup menu layout
320 TGLayoutHints *fECLayout; // Embedded canvas layout
321
322 BesGMenuBar *fMenuBar; // Menu bar
323
324 TGPopupMenu *fMenuFile; // File menu
325 TGPopupMenu *fMenuEdit; // Edit menu
326 TGPopupMenu *fMenuView; // View menu
327 TGPopupMenu *fMenuHelp; // Help menu
328
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;
342
343 TGLayoutHints *fUpButtonBarFirstItemLayout; // Up button bar first button layout
344 TGLayoutHints *fUpButtonBarItemLayout; // Up button bar button layout
345 TGLayoutHints *fUpButtonBarLastItemLayout; // Up button bar last button layout
346 TGCompositeFrame *fUpButtonBarFrame; // Up button bar frame
347
348 static const int kNUpSplitter = 4;
349 BesGPictureButton *fUpButtonSplitter[kNUpSplitter]; // Up button bar splitter
350 BesGPictureButton *fLoadGeoFileButton; // load geometry file
351 BesGPictureButton *fOpenEventFileButton; // open event file
352 BesGPictureButton *fSaveGeoAsButton; // save geometry as root file
353 BesGPictureButton *fSavePicAsButton; // save picture as
354 BesGPictureButton *fSavePicAsPSButton; // save picture as pdf
355 static const int kNCursorState = 2;
356 BesGPictureButton *fRefreshButton; // Refresh
357 BesGPictureButton *fResetCurrentButton; // Reset current pad
358 BesGPictureButton *fResetAllButton; // Reset all pad
359 BesGPictureButton *fCursorButton[kNCursorState]; // cursor state, pick or hand
360 BesGPictureButton *fZoomInButton; // ZoomIn
361 BesGPictureButton *fZoomOutButton; // ZoomOut
362 TGNumberEntryField *fZoomRatioNumber; // ZoomRatio number
363 BesGPictureButton *fZoomRatioPercentButton; // "%" picture
364 BesGPictureButton *fSwitchDisplayModeButton; // button to switch among display modes
365 BesGPictureButton *fSetHomeButton; // Set home position
366 BesGPictureButton *fGoHomeButton; // Go to home position
367 BesGPictureButton *fSaveMyConfigButton; // Save my style
368 BesGPictureButton *fLoadMyConfigButton; // Load my style
369 BesGPictureButton *fPaletteButton; // Display palette axis
370 BesGPictureButton *fHelpButton; // Help
371
372 TGLayoutHints *fDisplayModeBarItemLayout; // Display mode bar button layout
373 TGCompositeFrame *fDisplayModeBarFrame; // Display mode bar frame
374 static const int kNDisplayMode = 5;
375 BesGPictureButton *fDisplayModeButton[kNDisplayMode]; // button to switch among display modes
376
377 TGLayoutHints *fToolBarFirstItemLayout; // Tool bar first button layout
378 TGLayoutHints *fToolBarItemLayout; // Tool bar button layout
379 TGLayoutHints *fToolBarLastItemLayout; // Tool bar last button layout
380 TGCompositeFrame *fToolBarFrame; // Tool bar frame
381
382 static const int kNToolSplitter = 4;
383 BesGPictureButton *fToolButtonSplitter[kNToolSplitter]; // Tool button bar splitter
384 BesGPictureButton *fSwitchPadButton; // button to switch among pads
385 BesGPictureButton *fShowInfoButton; // Show info or not
386 BesGPictureButton *fShowAxisButton; // Show axis or not
387 BesGPictureButton *fFishEyeViewButton; // FishEye view
388 BesGPictureButton *fParallelViewButton; // Parallel view
389 BesGPictureButton *fPerspectiveViewButton; // Perspective view
390 BesGPictureButton *fX3DButton; // X3D view
391 BesGPictureButton *fOpenGLButton; // OpenGL view
392
393 TGCanvas *fEventListView; // Canvas for event list tree
394 TRootEmbeddedCanvas *fEmbeddedCanvas; // Embedded Canvas
395 TCanvas *fCanvas;
396 BesVisDisplay *fDisplay;
397
398 TGVerticalFrame *fV1; // Splitter for tabs
399
400 TGTab *fTabs; // Tabs for event
401
402 TGListTree *fEventListTree; // Event list tree
403 TGListTreeItem *fItem; // Active event list tree item
404 TGListTreeItem *fRunItem; // Active run list tree item
405
406
407 TGCompositeFrame *fEventDownFrame; // tab fame for download mode
408 TGCompositeFrame *fEventControlFrame; // Frame for event control
409 TGCompositeFrame *fEventControlTextFrame; // Frame for label "Event Control"
410 TGCompositeFrame *fEventNavFrame; // Frame for Event navigation
411 TGCompositeFrame *fEventPlayTextFrame; // Frame for label "Event Play"
412 TGCompositeFrame *fEventPlayButtonFrame; // Frame for buttons "prev, next, play, stop"
413 TGCompositeFrame *fEventPlaySpeedFrame; // Frame for set event play speed
414 TGCompositeFrame *fEventListFrame; // Frame for event list browser
415 TGCompositeFrame *fEventListTextFrame; // Frame for label "Event file list"
416 TGCompositeFrame *fEventListContentFrame; // Frame for event list content
417
418 TGCompositeFrame *fAutoFrame; // Frame for auto control
419 TGCompositeFrame *fAutoTextFrame; // Frame for label "Auto Control"
420
421 TGCompositeFrame *fViewFrame; // Frame for view control
422 TGCompositeFrame *fViewTextFrame; // Frame for label "View Control"
423 TGCompositeFrame *fViewContentFrame; // Frame for view content
424 TGCompositeFrame *fViewContent1Frame; // Frame for view content first line
425 TGCompositeFrame *fViewContent2Frame; // Frame for view content seconde line
426 TGCompositeFrame *fViewContent3Frame; // Frame for view content third line
427 TGCompositeFrame *fViewAngleFrame; // Frame for view angles
428 TGCompositeFrame *fViewAngleThetaFrame; // Frame for view theta
429 TGCompositeFrame *fViewAnglePhiFrame; // Frame for view phi
430 TGCompositeFrame *fViewAnglePsiFrame; // Frame for view psi
431
432 TGNumberEntry *fNumEntryRunNo; // Bes input of run number
433 TGNumberEntry *fNumEntryEventNo; // Bes input of event number
434 TGNumberEntry *fNumEntryEventPlaySpeed; // event play speed number
435 //TGNumberEntry *fBesSamplePos; // Bes input of sample position
436
437 TGLabel *fEventControlTextLabel; // Label "Event control"
438 TGLabel *fBesLabelRun; // Label "Run : "
439 TGLabel *fBesLabelEvent; // Label "Event : "
440 TGLabel *fEventPlayTextLabel; // Label "Event Play"
441 TGLabel *fEventPlaySpeedLabel; // Label "Play Speed : "
442 TGLabel *fEventListTextLabel; // Label "Event file list"
443 TGLabel *fViewTextLabel; // Label "View control"
444 TGLabel *fAutoTextLabel; // Label "Auto control"
445
446 TGHSlider *fEventPlaySlider; // slider for event play
447 BesGPictureButton *fPrevEventButton; // next event button
448 BesGPictureButton *fNextEventButton; // prev event button
449 BesGPictureButton *fPlayEventButton; // next event button
450 BesGPictureButton *fFirstEventButton; // prev event button
451
452 BesGPictureButton *fViewResetAngleButton; // View reset angle button
453 BesGPictureButton *fViewCounterClockWiseButton; // View CounterClockWise button
454 BesGPictureButton *fViewClockWiseButton; // View ClockWise button
455 BesGPictureButton *fViewMoveUpButton; // View MoveUp button
456 BesGPictureButton *fViewMoveLeftButton; // View MoveLeft button
457 BesGPictureButton *fViewMoveRightButton; // View MoveRight button
458 BesGPictureButton *fViewMoveDownButton; // View MoveDown button
459 BesGPictureButton *fViewMoveCenterButton; // View MoveCenter button
460
461 BesGPictureButton *fViewAngleThetaPlusButton; // View AngleTheta + button
462 BesGPictureButton *fViewAngleThetaMinusButton; // View AngleTheta - button
463 TGVSlider *fViewAngleThetaSlider; // View AngleTheta slider
464 TGNumberEntryField *fViewAngleThetaNumber; // View AngleTheta number
465 TGLabel *fViewAngleThetaLabel; // Label "Theta"
466
467 BesGPictureButton *fViewAnglePhiPlusButton; // View AnglePhi + button
468 BesGPictureButton *fViewAnglePhiMinusButton; // View AnglePhi - button
469 TGVSlider *fViewAnglePhiSlider; // View AnglePhi slider
470 TGNumberEntryField *fViewAnglePhiNumber; // View AnglePhi number
471 TGLabel *fViewAnglePhiLabel; // Label "Phi"
472
473 BesGPictureButton *fViewAnglePsiPlusButton; // View AnglePsi + button
474 BesGPictureButton *fViewAnglePsiMinusButton; // View AnglePsi - button
475 TGVSlider *fViewAnglePsiSlider; // View AnglePsi slider
476 TGNumberEntryField *fViewAnglePsiNumber; // View AnglePsi number
477 TGLabel *fViewAnglePsiLabel; // Label "Psi"
478
479 TGCompositeFrame *fRotateStepFrame; // Frame for RotateStep
480 TGLabel *fRotateStepLabel; // Label "Deg"
481 TGNumberEntryField *fNumEntryRotateStep; // Rotate step
482 TGLabel *fRotateStepUnitLabel; // Label "Deg"
483
484 TGGroupFrame *fFrameAutoRotate; // Frame for AutoRotate
485 TGCheckButton *fChkBtnAutoRotate; // CheckButton AutoRotate;
486
487 TGCompositeFrame *fRotateSpeedFrame; // Frame for RotateSpeed
488 TGNumberEntryField *fNumEntryRotateSpeed; // Auto Rotate speed number
489 TGLabel *fRotateSpeedLabel; // Label "Deg/Sec"
490
491 TGCompositeFrame *fRotateFPSFrame; // Frame for RotateFPS
492 TGNumberEntry *fNumEntryRotateFPS; // Auto Rotate fps number
493 TGLabel *fRotateFPSLabel; // Label "fps"
494
495
496 TGStatusBar *fStatusBar; // Status bar
497
498 TGGroupFrame *fFrameHeader; // Frame for Header
499 TGGroupFrame *fFrameHits; // Frame for Hits
500 TGGroupFrame *fFrameTracks; // Frame for Tracks
501
502 TGGroupFrame *fFrameSubDetector;
503 //TGGroupFrame *fFrameMdc;
504 //TGGroupFrame *fFrameTof;
505 //TGGroupFrame *fFrameEmc;
506 //TGGroupFrame *fFrameMuc;
507 TGGroupFrame *fFrameOthers;
508
509 TGGroupFrame *fFrameMdcMatch; // Frame for TQMatch
510 TGGroupFrame *fFrameTofMatch; // Frame for TQMatch
511 TGGroupFrame *fFrameMagnetic; // Frame for magnetic field
512
513 TGHorizontalFrame *fTitleFrame; // Title frame
514 TGHorizontalFrame *fMainFrame; // Main frame
515
516 TGHorizontalFrame *fBesRunFrame; // Bes Run nr input frame
517 TGHorizontalFrame *fBesEventFrame; // Bes Event nr input frame
518
519 TGCheckButton *fChkBtnHeaderGlobal;
520
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;
535
536 TGCheckButton *fChkBtnTracksGlobal;
537 TGCheckButton *fChkBtnTracksMdc;
538 TGCheckButton *fChkBtnTracksIdeal; // added by wangll
539 TGCheckButton *fChkBtnTracksTof;
540 TGCheckButton *fChkBtnTracksEmc;
541 TGCheckButton *fChkBtnTracksMuc;
542 TGCheckButton *fChkBtnTracksExt;
543 TGCheckButton *fChkBtnMCTruthTrack;
544
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;
562
563 TGCheckButton *fChkBtnBeamPipe;
564 TGCheckButton *fChkBtnZRPlaneOnXY;
565 TGCheckButton *fChkBtnAxis;
566
567 TGCheckButton *fChkBtnMdcTOverflowGlobal;
568 TGCheckButton *fChkBtnMdcQOverflowGlobal;
569 TGCheckButton *fChkBtnMdcTMatchGlobal;
570 TGCheckButton *fChkBtnMdcQMatchGlobal;
571 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
572 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
573 TGCheckButton *fChkBtnTofTMatchGlobal;
574 TGCheckButton *fChkBtnTofQMatchGlobal;
575
576 TGNumberEntry *fNumEntryMagnetic; // magnetic number
577
578 TString fBesVisPath;
579
580 Long64_t fBesRunNo; // run number of BES request
581 Long64_t fBesEventNo; // event number of BES request
582 Long64_t fCurrentEvent;
583 Int_t fEventPlaySpeed; // event play speed
584 Bool_t fAutoDisplayEvent; // auto display event
585 TTimer *fAutoDisplayEventTimer;
586
587 Double_t fMoveFactor; // factor of move
588 Double_t fRotateStep; // rotate angle in each step
589 Int_t fRotateFPS; // rotae fps, frame per second, 24? 10?
590 Double_t fRotateSpeed; // rotate angle per second, deg/sec
591 Bool_t fAutoRotate; // auto rotate flag
592 TTimer *fAutoRotateTimer; // auto rotate timer
593 Int_t fAutoRotateClockWise; // auto rotate clockwise flag
594 Int_t fAutoRotateTheta; // auto rotate theta flag
595 Int_t fAutoRotatePhi; // auto rotate phi flag
596 Int_t fAutoRotatePsi; // auto rotate psi flag
597
598 Int_t fViewer3DMode; // Mode of Viewer3D, 1:x3d, 2:OpenGL
599 //TViewerX3D *fx3d;
600 Double_t fViewThetaPreStep;
601 Double_t fViewPhiPreStep;
602
603 Double_t fHomeX[3], fHomeY[3]; // Home position of three pads
604
605 Int_t fWindowWidth; // zevis window width
606 Int_t fWindowHeight; // zevis window height
607
608 TList *fWidgets; // list to hold TGLayoutHints for destruction
609 TGLayoutHints *fLayout; // dummy TGLayoutHints;
610
611 // added by tianhl to add besvis to bossframework
612 TString f_evtFile;
613 TString f_geoFile;
614 Bool_t f_bossMode;
615 Int_t f_pid;
616 //Long Peixun's update: remove useless variable
617 //TString f_evtFile_1; //huangb add
618
619 //Long Peixun's update: Help text loaded from help.txt
620 std::string f_HelpText;
621 //Long Peixun's update: for geometry selection
622 BesGeoSelector fSelector;
623 //Long Peixun's update: current geometry file (for default geom)
624 TString fCurGeom;
625 //Long Peixun's update: whether current geometry is selected automatically
626 Bool_t fAutoGeom;
627 //Long Peixun's update: prime title text
628 TString fTitleText;
629
630 private:
631 //void SetMdcTOverflow(Bool_t input);
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);
639
640 public:
641 BesClient(const TGWindow *p, const char* title, UInt_t width, UInt_t height, Option_t *option = "", Int_t argc = 0, char **argv = 0);
642 virtual ~BesClient();
643 virtual void InitLocal();
644 virtual void InitParameter();
645 virtual void InitConnections();
646 //Long Peixun's update: Initialization of geometry selector
647 virtual void InitGeoSelector(const char* geomsel_file);
648
649 virtual void CreateWidget(const char* title, UInt_t width, UInt_t height);
650 virtual void CreateHorizontalRuler();
651 virtual void CreateMenuBar();
652 virtual void CreateUpButtonBar();
653 virtual void CreateDisplayModeBar();
654 virtual void CreateToolBar();
655 virtual void CreateTitleBar();
656 virtual void CreateStatusBar();
657 virtual void CreateMainFrame();
658 virtual void CreateCanvas();
659 virtual void CreateTabs();
660
661 virtual void HandleMenu(Int_t id);
662 virtual void HandleViewOptionMenu(Int_t id);
663 virtual void HandleError(const char* msg);
664 virtual void HandleInfoBar(const char* msg);
665 virtual void HandleStatusBar(const char* msg);
666 virtual void HandleButtons(Int_t id=-1);
667 virtual void HandleSliders(Int_t id);
668 virtual void HandleEventList(TGListTreeItem *entry, Int_t btn);
669 virtual void UpdateBesInputFields();
670
671 virtual void LoadGeoFile();
672 virtual void OpenGeoFile(TString filename);
673 virtual void SaveGeoAs();
674
675 //Long Peixun's update: Add a parameter to determine whether choose a detector geometry automatically when open an event file.
676 virtual void OpenEventFile();
677 virtual void OpenEventFile(TString filename, bool auto_sel_geom = false);
678
679 virtual void SavePicAs();
680 virtual void SavePicAsPS();
681 virtual void SetHome();
682 virtual void GoHome();
683 virtual void SaveMyConfig();
684 virtual void LoadMyConfig();
685 virtual void LoadMdcPalette();
686 virtual void Help();
687
688 virtual void SetAllDisplayModeButtonUnHL();
689
690 virtual void X3D();
691 virtual void OpenGL();
692
693 virtual void Show();
694 virtual void CloseWindow();
695
696 //Long Peixun's update: Get run number and choose a detector geometry automatically when in need.
697 virtual Bool_t GetEvent(Long64_t i, bool openfile = false, bool sel_geom = false);
698 virtual Bool_t GetRecEvent();
699 virtual Bool_t NextEvent();
700 virtual Bool_t PrevEvent();
701 virtual void AutoDisplayEvent();
702 virtual void AutoDisplayEventCommand();
703 virtual Bool_t FirstEvent();
704 virtual Bool_t LastEvent(); //Long Peixun's update: Get last event
705
706 virtual void RotateClockWise(int clockwise);
707 virtual void RotateTheta(int pn);
708 virtual void RotatePhi(int pn);
709 virtual void RotatePsi(int pn);
710 virtual void AutoRotate();
711 virtual void AutoRotateCommand();
712
713 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
714 virtual void SetState(Int_t id = -1);
715 virtual void UpdateStatus();
716 virtual void UpdateAllView();
717 virtual void UpdateCurrentPad();
718 virtual void ChangeFocus();
719 virtual void ExecuteReturn();
720
721 virtual Pixmap_t GetPic(const char *file);
722 virtual Bool_t FileExists(TString fname);
723 virtual void SetRange(Double_t &input, Double_t min, Double_t max);
724 virtual const char* GetCurrentPadString(); //Long Peixun's update: Return current pad hint string
725
726 inline Long64_t GetBesRunNo() { return fBesRunNo; }
727 inline Long64_t GetBesEventNo() { return fBesEventNo; }
728 inline Int_t GetEventPlaySpeed() { return fEventPlaySpeed; }
729
730 inline Int_t GetRotateFPS() { return fRotateFPS; }
731 inline Double_t GetRotateSpeed() { return fRotateSpeed; }
732 inline Double_t GetRotateStep() { return fRotateStep; }
733 inline void SetRotateSpeed() { fRotateSpeed = fRotateStep * fRotateFPS; }
734 inline void SetRotateStep() { if (fRotateFPS != 0) fRotateStep = fRotateSpeed/fRotateFPS; else fRotateStep = 0.0; }
735
736 ClassDef(BesClient,0) // Bes client
737};
738
739#endif
EZMenuViewOption
Definition: BesClient.h:185
@ kM_Tof_Barrel
Definition: BesClient.h:193
@ kM_Mdc_Tubes
Definition: BesClient.h:189
@ kM_Tracks_Tof
Definition: BesClient.h:229
@ kM_Muc_Barrel
Definition: BesClient.h:202
@ kM_TofHits_East
Definition: BesClient.h:215
@ kM_Standard_On
Definition: BesClient.h:237
@ kM_Header_Global
Definition: BesClient.h:186
@ kM_Muc_East
Definition: BesClient.h:201
@ kM_EmcHits_East
Definition: BesClient.h:219
@ kM_Emc_Side
Definition: BesClient.h:199
@ kM_User_On
Definition: BesClient.h:238
@ kM_Muc_Strips
Definition: BesClient.h:204
@ kM_Tracks_Mdc
Definition: BesClient.h:228
@ kM_Mdc_QNotOverflow_Global
Definition: BesClient.h:240
@ kM_Full3D_Tof
Definition: BesClient.h:206
@ kM_TofHits_Global
Definition: BesClient.h:214
@ kM_MucHits_East
Definition: BesClient.h:224
@ kM_Tof_QMatch_Global
Definition: BesClient.h:246
@ kM_Tracks_Emc
Definition: BesClient.h:230
@ kM_Emc_East
Definition: BesClient.h:196
@ kM_MucHits_Barrel
Definition: BesClient.h:225
@ kM_Muc_West
Definition: BesClient.h:203
@ kM_Emc_Global
Definition: BesClient.h:195
@ kM_TofHits_Barrel
Definition: BesClient.h:216
@ kM_Mdc_QMatch_Global
Definition: BesClient.h:244
@ kM_Tracks_Ideal
Definition: BesClient.h:234
@ kM_Tof_East
Definition: BesClient.h:192
@ kM_Mdc_Global
Definition: BesClient.h:188
@ kM_MucHits_West
Definition: BesClient.h:226
@ kM_MdcHits_Hits
Definition: BesClient.h:213
@ kM_Mdc_Wires
Definition: BesClient.h:190
@ kM_Mdc_ColorfulWire_Global
Definition: BesClient.h:241
@ kM_Full3D_Muc
Definition: BesClient.h:208
@ kM_EmcHits_Barrel
Definition: BesClient.h:220
@ kM_Tracks_Muc
Definition: BesClient.h:231
@ kM_Mdc_TMatch_Global
Definition: BesClient.h:243
@ kM_BeamPipe
Definition: BesClient.h:209
@ kM_ZRPlaneOnXY
Definition: BesClient.h:210
@ kM_MucHits_Global
Definition: BesClient.h:223
@ kM_Emc_West
Definition: BesClient.h:198
@ kM_EmcHits_West
Definition: BesClient.h:221
@ kM_Emc_Barrel
Definition: BesClient.h:197
@ kM_Tof_TMatch_Global
Definition: BesClient.h:245
@ kM_View_OpenGL
Definition: BesClient.h:236
@ kM_View_X3D
Definition: BesClient.h:235
@ kM_EmcHits_Global
Definition: BesClient.h:218
@ kM_Tof_Global
Definition: BesClient.h:191
@ kM_EmcHits_Side
Definition: BesClient.h:222
@ kM_Tracks_Ext
Definition: BesClient.h:232
@ kM_Tracks_Global
Definition: BesClient.h:227
@ kM_Muc_Global
Definition: BesClient.h:200
@ kM_Tof_West
Definition: BesClient.h:194
@ kM_Axis
Definition: BesClient.h:211
@ kM_Mdc_MdcTimeSubEvTime_Global
Definition: BesClient.h:242
@ kM_TofHits_West
Definition: BesClient.h:217
@ kM_MdcHits_Global
Definition: BesClient.h:212
@ kM_Full3D_Emc
Definition: BesClient.h:207
@ kM_Full3D_Mdc
Definition: BesClient.h:205
@ kM_MC_TruthTrack
Definition: BesClient.h:233
EZMode
Definition: BesClient.h:174
@ kModeFile
Definition: BesClient.h:176
@ kModePR
Definition: BesClient.h:179
@ kModeDown
Definition: BesClient.h:177
@ kModeBes
Definition: BesClient.h:178
@ kModeOnline
Definition: BesClient.h:175
@ FREE_SPACE
Definition: BesClient.h:50
@ OUTPUT_STORE
Definition: BesClient.h:50
EZCommand
Definition: BesClient.h:57
@ kM_Option_TimerSpeed
Definition: BesClient.h:65
@ kM_Help_About
Definition: BesClient.h:68
@ kM_File_SaveGeoAs
Definition: BesClient.h:59
@ kM_Option_DefaultPicType
Definition: BesClient.h:66
@ kM_Edit_Editor
Definition: BesClient.h:64
@ kM_File_Exit
Definition: BesClient.h:63
@ kM_File_SavePicAs
Definition: BesClient.h:61
@ kM_File_OpenEvent
Definition: BesClient.h:60
@ kM_Help_Content
Definition: BesClient.h:67
@ kM_File_Close
Definition: BesClient.h:62
@ kM_File_LoadGeo
Definition: BesClient.h:58
EZButtons
Definition: BesClient.h:75
@ kM_Button_SwitchDisplayMode
Definition: BesClient.h:89
@ kM_Button_BesRun
Definition: BesClient.h:142
@ kM_Button_ShowAxis
Definition: BesClient.h:103
@ kM_Button_PrevEvent
Definition: BesClient.h:114
@ kM_Button_RotateStep
Definition: BesClient.h:138
@ kM_Button_DownBrowse
Definition: BesClient.h:156
@ kM_Button_NextEvent
Definition: BesClient.h:115
@ kM_Button_DownRaw
Definition: BesClient.h:154
@ kM_Button_Online
Definition: BesClient.h:109
@ kM_Button_ViewAnglePhiMinus
Definition: BesClient.h:132
@ kM_Button_Refresh
Definition: BesClient.h:81
@ kM_Slider_Zoom
Definition: BesClient.h:167
@ kM_Button_LoadGeoFile
Definition: BesClient.h:76
@ kM_Button_ViewAnglePsiNumber
Definition: BesClient.h:137
@ kM_Button_ResetCurrent
Definition: BesClient.h:82
@ kM_Button_ViewAnglePhiNumber
Definition: BesClient.h:133
@ kM_Button_SaveMyConfig
Definition: BesClient.h:92
@ kM_Button_ViewResetAngle
Definition: BesClient.h:118
@ kM_Button_Down
Definition: BesClient.h:111
@ kM_Button_DownFZ
Definition: BesClient.h:152
@ kM_Button_SavePicAs
Definition: BesClient.h:79
@ kM_Button_Bes
Definition: BesClient.h:112
@ kM_Button_CursorPick
Definition: BesClient.h:84
@ kM_Button_ZoomIn
Definition: BesClient.h:86
@ kM_Slider_ViewAngleTheta
Definition: BesClient.h:126
@ kM_Button_OpenEventFile
Definition: BesClient.h:78
@ kM_Button_ViewAnglePhiPlus
Definition: BesClient.h:131
@ kM_Button_OnlineTime
Definition: BesClient.h:161
@ kM_Button_RotateFPS
Definition: BesClient.h:141
@ kM_Button_DisplayMode2D
Definition: BesClient.h:96
@ kM_Button_Help
Definition: BesClient.h:95
@ kM_Button_ViewMoveLeft
Definition: BesClient.h:122
@ kM_Button_PRTime2
Definition: BesClient.h:165
@ kM_Button_PRTime
Definition: BesClient.h:164
@ kM_Button_DownZED
Definition: BesClient.h:151
@ kM_Button_DisplayModeZR
Definition: BesClient.h:98
@ kM_Button_PlayEvent
Definition: BesClient.h:116
@ kM_Button_DownMDST
Definition: BesClient.h:153
@ kM_Button_File
Definition: BesClient.h:110
@ kM_Button_ZoomRatioNumber
Definition: BesClient.h:88
@ kM_Button_SavePicAsPS
Definition: BesClient.h:80
@ kM_Slider_ViewAnglePsi
Definition: BesClient.h:134
@ kM_Button_AutoRotate
Definition: BesClient.h:139
@ kM_Button_BesGet
Definition: BesClient.h:149
@ kM_Button_ViewMoveRight
Definition: BesClient.h:123
@ kM_Button_DisplayMode3D
Definition: BesClient.h:99
@ kM_Button_ViewMoveCenter
Definition: BesClient.h:125
@ kM_Button_EventPlaySpeed
Definition: BesClient.h:144
@ kM_Button_ViewClockWise
Definition: BesClient.h:120
@ kM_Button_FirstEvent
Definition: BesClient.h:117
@ kM_Button_ParallelView
Definition: BesClient.h:105
@ kM_Button_BesReset
Definition: BesClient.h:150
@ kM_Button_ViewAngleThetaMinus
Definition: BesClient.h:128
@ kM_Button_ViewAnglePsiMinus
Definition: BesClient.h:136
@ kM_Button_RotateSpeed
Definition: BesClient.h:140
@ kM_Button_GoHome
Definition: BesClient.h:91
@ kM_Button_SetHome
Definition: BesClient.h:90
@ kM_Button_ViewAnglePsiPlus
Definition: BesClient.h:135
@ kM_Slider_EventPlay
Definition: BesClient.h:113
@ kM_Button_ShowInfo
Definition: BesClient.h:102
@ kM_Button_DisplayModeXY
Definition: BesClient.h:97
@ kM_Button_ZoomOut
Definition: BesClient.h:87
@ kM_Button_PerspectiveView
Definition: BesClient.h:106
@ kM_Button_DisplayModeAll
Definition: BesClient.h:100
@ kM_Button_ResetAll
Definition: BesClient.h:83
@ kM_Button_DownEvents
Definition: BesClient.h:157
@ kM_Button_BesVar
Definition: BesClient.h:146
@ kM_Button_PRStart
Definition: BesClient.h:163
@ kM_Button_ViewCounterClockWise
Definition: BesClient.h:119
@ kM_Button_BesSample
Definition: BesClient.h:148
@ kM_Button_DownGet
Definition: BesClient.h:159
@ kM_Button_ViewAngleThetaPlus
Definition: BesClient.h:127
@ kM_Button_CursorHand
Definition: BesClient.h:85
@ kM_Button_BesEvent
Definition: BesClient.h:143
@ kM_Button_ViewMoveDown
Definition: BesClient.h:124
@ kM_Button_BesBit
Definition: BesClient.h:147
@ kM_Button_OnlineStart
Definition: BesClient.h:160
@ kM_Button_Magnetic
Definition: BesClient.h:166
@ kM_Button_SwitchPad
Definition: BesClient.h:101
@ kM_Button_X3D
Definition: BesClient.h:107
@ kM_Button_OnlineTime2
Definition: BesClient.h:162
@ kM_Button_ViewAngleThetaNumber
Definition: BesClient.h:129
@ kM_Button_BesSamplePos
Definition: BesClient.h:145
@ kM_Slider_ViewAnglePhi
Definition: BesClient.h:130
@ kM_Button_DownSkip
Definition: BesClient.h:158
@ kM_Button_FishEyeView
Definition: BesClient.h:104
@ kM_Button_DownRawIncl
Definition: BesClient.h:155
@ kM_Button_LoadMyConfig
Definition: BesClient.h:93
@ kM_Button_Palette
Definition: BesClient.h:94
@ kM_Button_ViewMoveUp
Definition: BesClient.h:121
@ kM_Button_OpenGL
Definition: BesClient.h:108
@ kM_Button_SaveGeoAs
Definition: BesClient.h:77
runStatus
Definition: BesClient.h:51
@ RUN_ERROR
Definition: BesClient.h:51
@ RUN_SMOOTH
Definition: BesClient.h:51
char * file
Definition: DQA_TO_DB.cxx:15
titledef title[20]
Int_t GetEventPlaySpeed()
Definition: BesClient.h:728
virtual void X3D()
Definition: BesClient.cxx:3574
virtual void GoHome()
Definition: BesClient.cxx:3379
virtual void CreateMainFrame()
Definition: BesClient.cxx:1099
virtual void CreateTitleBar()
Definition: BesClient.cxx:1070
virtual void UpdateAllView()
Definition: BesClient.cxx:5643
virtual void HandleMenu(Int_t id)
Definition: BesClient.cxx:2388
virtual void SetAllDisplayModeButtonUnHL()
Definition: BesClient.cxx:3561
virtual void CreateToolBar()
Definition: BesClient.cxx:940
virtual Bool_t GetEvent(Long64_t i, bool openfile=false, bool sel_geom=false)
Definition: BesClient.cxx:3661
virtual void SavePicAsPS()
Definition: BesClient.cxx:3331
virtual void CreateDisplayModeBar()
Definition: BesClient.cxx:899
virtual void HandleSliders(Int_t id)
Definition: BesClient.cxx:5596
virtual void CreateTabs()
Definition: BesClient.cxx:1156
virtual Bool_t LastEvent()
Definition: BesClient.cxx:4187
virtual void SaveMyConfig()
Definition: BesClient.cxx:3399
virtual void RotatePsi(int pn)
Definition: BesClient.cxx:4358
virtual void Show()
Definition: BesClient.cxx:2972
virtual void SetHome()
Definition: BesClient.cxx:3361
virtual void RotateClockWise(int clockwise)
Definition: BesClient.cxx:4299
Double_t GetRotateStep()
Definition: BesClient.h:732
virtual void CreateMenuBar()
Definition: BesClient.cxx:397
virtual void RotateTheta(int pn)
Definition: BesClient.cxx:4326
virtual ~BesClient()
Definition: BesClient.cxx:301
Long64_t GetBesRunNo()
Definition: BesClient.h:726
virtual void RotatePhi(int pn)
Definition: BesClient.cxx:4342
virtual void HandleViewOptionMenu(Int_t id)
Definition: BesClient.cxx:2438
virtual void OpenGL()
Definition: BesClient.cxx:3613
virtual void HandleEventList(TGListTreeItem *entry, Int_t btn)
Definition: BesClient.cxx:4374
virtual void OpenEventFile()
Definition: BesClient.cxx:3151
virtual void SavePicAs()
Definition: BesClient.cxx:3272
virtual void HandleStatusBar(const char *msg)
Definition: BesClient.cxx:2964
virtual Pixmap_t GetPic(const char *file)
Definition: BesClient.cxx:5889
virtual void AutoRotateCommand()
Definition: BesClient.cxx:4257
virtual void UpdateStatus()
Definition: BesClient.cxx:4751
virtual void CreateWidget(const char *title, UInt_t width, UInt_t height)
Definition: BesClient.cxx:314
virtual void CloseWindow()
Definition: BesClient.cxx:3649
virtual void CreateHorizontalRuler()
Definition: BesClient.cxx:386
virtual void InitGeoSelector(const char *geomsel_file)
Definition: BesClient.cxx:2334
virtual void InitConnections()
Definition: BesClient.cxx:2373
virtual void UpdateCurrentPad()
Definition: BesClient.cxx:5687
virtual void HandleError(const char *msg)
Definition: BesClient.cxx:2945
virtual void SaveGeoAs()
Definition: BesClient.cxx:3102
virtual void InitLocal()
Definition: BesClient.cxx:2239
virtual void CreateCanvas()
Definition: BesClient.cxx:1137
virtual void HandleInfoBar(const char *msg)
Definition: BesClient.cxx:2956
void SetRotateSpeed()
Definition: BesClient.h:733
virtual Bool_t FirstEvent()
Definition: BesClient.cxx:4171
virtual void LoadMdcPalette()
Definition: BesClient.cxx:3536
virtual Bool_t GetRecEvent()
Definition: BesClient.cxx:3957
virtual void SetRange(Double_t &input, Double_t min, Double_t max)
Definition: BesClient.cxx:5908
virtual void AutoDisplayEvent()
Definition: BesClient.cxx:4203
virtual Bool_t NextEvent()
Definition: BesClient.cxx:4129
virtual void CreateStatusBar()
Definition: BesClient.cxx:1080
virtual void CreateUpButtonBar()
Definition: BesClient.cxx:636
virtual void AutoDisplayEventCommand()
Definition: BesClient.cxx:4230
Long64_t GetBesEventNo()
Definition: BesClient.h:727
void SetRotateStep()
Definition: BesClient.h:734
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel)
Definition: BesClient.cxx:4409
virtual void Help()
Definition: BesClient.cxx:3548
virtual void ExecuteReturn()
Definition: BesClient.cxx:5811
virtual void LoadMyConfig()
Definition: BesClient.cxx:3471
virtual Bool_t PrevEvent()
Definition: BesClient.cxx:4150
virtual void HandleButtons(Int_t id=-1)
Definition: BesClient.cxx:5185
virtual Bool_t FileExists(TString fname)
Definition: BesClient.cxx:5901
Int_t GetRotateFPS()
Definition: BesClient.h:730
virtual void SetState(Int_t id=-1)
Definition: BesClient.cxx:4522
virtual void AutoRotate()
Definition: BesClient.cxx:4238
virtual void OpenGeoFile(TString filename)
Definition: BesClient.cxx:3009
virtual void ChangeFocus()
Definition: BesClient.cxx:5790
virtual const char * GetCurrentPadString()
Definition: BesClient.cxx:5927
Double_t GetRotateSpeed()
Definition: BesClient.h:731
virtual void InitParameter()
Definition: BesClient.cxx:2277
virtual void UpdateBesInputFields()
Definition: BesClient.cxx:5756
virtual void LoadGeoFile()
Definition: BesClient.cxx:2981
ushort * array
Definition: BesVisAlg.h:143
struct semid_ds * buf
Definition: BesVisAlg.h:142
int val
Definition: BesVisAlg.h:141